test_bug583948.xul 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?xml version="1.0"?>
  2. <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
  3. <?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css"
  4. type="text/css"?>
  5. <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
  6. <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
  7. <body xmlns="http://www.w3.org/1999/xhtml">
  8. <div id="content" style="display: none"/>
  9. </body>
  10. <script>
  11. SimpleTest.waitForExplicitFinish();
  12. var attempts = 0;
  13. function update() {
  14. // without the crash fix, this usually crashes after 2 to 4 reloads
  15. if (++attempts == 6) {
  16. ok(true, "didn't crash after 6 attempts");
  17. otherWindow.close();
  18. SimpleTest.waitForFocus(function() {
  19. SimpleTest.finish();
  20. });
  21. } else {
  22. otherWindow.document.commandDispatcher.updateCommands('');
  23. setTimeout(function() {
  24. otherWindow.location.reload()
  25. }, 0);
  26. }
  27. }
  28. var otherWindow = window.open("window_bug583948.xul", "_new", "chrome");
  29. </script>
  30. </window>