mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
Bug 772823: try to work around intermittent failure of this test on Linux by avoiding closing the window during onload
--HG-- extra : transplant_source : %3C%2B%B3%3A%F5S%AF%97t%80%DC%D4%C4%F1%26%8A%E6%8A%B5%B7
This commit is contained in:
parent
814db613bf
commit
53f692e76c
@ -32,19 +32,23 @@
|
||||
SimpleTest.is(getDocShellType(typeContentFrame), Ci.nsIDocShellTreeItem.typeContent,
|
||||
"iframe with mozFrameType='content' in chrome document is typeContent");
|
||||
|
||||
// Wait for the window to be closed before finishing the test
|
||||
let ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
|
||||
.getService(Components.interfaces.nsIWindowWatcher);
|
||||
ww.registerNotification(function(subject, topic, data) {
|
||||
if (topic == "domwindowclosed") {
|
||||
ww.unregisterNotification(arguments.callee);
|
||||
SimpleTest.waitForFocus(function() {
|
||||
SimpleTest.finish();
|
||||
}, opener);
|
||||
}
|
||||
});
|
||||
// avoid closing the window from within the onload event handler to see
|
||||
// whether that fixes the intermittent orange in bug 772823
|
||||
SimpleTest.executeSoon(function () {
|
||||
// Wait for the window to be closed before finishing the test
|
||||
let ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
|
||||
.getService(Components.interfaces.nsIWindowWatcher);
|
||||
ww.registerNotification(function windowObs(subject, topic, data) {
|
||||
if (topic == "domwindowclosed") {
|
||||
ww.unregisterNotification(windowObs);
|
||||
SimpleTest.waitForFocus(function() {
|
||||
SimpleTest.finish();
|
||||
}, opener);
|
||||
}
|
||||
});
|
||||
|
||||
window.close();
|
||||
window.close();
|
||||
});
|
||||
}
|
||||
]]></script>
|
||||
</window>
|
||||
|
Loading…
Reference in New Issue
Block a user