test_bug398289.html 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <!DOCTYPE html>
  2. <html style="height: 100%">
  3. <head>
  4. <title>Test for bug 398289</title>
  5. <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
  6. <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/WindowSnapshot.js"></script>
  7. <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
  8. </head>
  9. <body style="height: 100%" onload="setTimeout(onBodyLoad, 0);">
  10. <iframe id="test" src="398289-resource.xul" width="100%" height="100%">
  11. </iframe>
  12. <script class="testbody" type="text/javascript">
  13. var snap1, snap2;
  14. SimpleTest.waitForExplicitFinish();
  15. function onBodyLoad() {
  16. window.frames[0].document.getElementById("test").selectedIndex = 0;
  17. window.frames[0].document.getElementById("test").selectedIndex = 1;
  18. snap1 = snapshotWindow(window);
  19. document.getElementById("test").onload = onFrameLoad;
  20. window.frames[0].location.reload();
  21. }
  22. function onFrameLoad() {
  23. snap2 = snapshotWindow(window);
  24. var equal, str1, str2;
  25. [equal, str1, str2] = compareSnapshots(snap1, snap2, true);
  26. ok(equal, "persistent attribute in tab box broken, expected: "+str1+" got: "+str2);
  27. SimpleTest.finish();
  28. }
  29. </script>
  30. </body>
  31. </html>