зеркало из https://github.com/mozilla/pjs.git
Bug 651001 - Test for bug 583948 uses flaky timeouts; r=sicking
This commit is contained in:
Родитель
f3b0e229e2
Коммит
412abc9547
|
@ -18,24 +18,22 @@ SimpleTest.waitForExplicitFinish();
|
|||
var attempts = 0;
|
||||
|
||||
function update() {
|
||||
setTimeout(function() {
|
||||
if (otherWindow.location)
|
||||
otherWindow.location.reload()
|
||||
}, 1);
|
||||
otherWindow.document.commandDispatcher.updateCommands('');
|
||||
// without the crash fix, this usually crashes after 2 to 4 reloads
|
||||
if (++attempts == 6) {
|
||||
ok(true, "didn't crash after 6 attempts");
|
||||
otherWindow.close();
|
||||
SimpleTest.finish();
|
||||
}
|
||||
else {
|
||||
setTimeout(update, 100);
|
||||
SimpleTest.waitForFocus(function() {
|
||||
SimpleTest.finish();
|
||||
});
|
||||
} else {
|
||||
otherWindow.document.commandDispatcher.updateCommands('');
|
||||
setTimeout(function() {
|
||||
otherWindow.location.reload()
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
|
||||
var otherWindow = window.open("window_bug583948.xul", "_new", "chrome");
|
||||
setTimeout(update, 100);
|
||||
</script>
|
||||
|
||||
</window>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml-stylesheet href="chrome://browser/skin/" type="text/css"?>
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" onload="opener.update()">
|
||||
|
||||
<command oncommandupdate="document.removeChild(document.documentElement)" commandupdater="true"/>
|
||||
<box command="c"/>
|
||||
|
|
Загрузка…
Ссылка в новой задаче