Bug 1882465 - Update .hg-annotate-ignore-revs and .git-blame-ignore-revs to reflect...
[gecko.git] / dom / xul / test / test_bug583948.xhtml
blob2cab13a4ac1c7c64488f0ab782efa6c64c0a51fb
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"?>
6 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
8 <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
10 <body xmlns="http://www.w3.org/1999/xhtml">
11 <div id="content" style="display: none"/>
12 </body>
14 <script>
15 SimpleTest.waitForExplicitFinish();
17 let chromeWindow = window.browsingContext.topChromeWindow;
19 var attempts = 0;
21 chromeWindow.update = function () {
22 // without the crash fix, this usually crashes after 2 to 4 reloads
23 if (++attempts == 6) {
24 ok(true, "didn't crash after 6 attempts");
25 otherWindow.close();
26 SimpleTest.waitForFocus(function() {
27 chromeWindow.update = null;
28 SimpleTest.finish();
29 });
30 } else {
31 otherWindow.document.commandDispatcher.updateCommands('');
32 setTimeout(function() {
33 otherWindow.location.reload()
34 }, 0);
38 var otherWindow = chromeWindow.open("window_bug583948.xhtml", "_blank", "chrome");
39 </script>
41 </window>