зеркало из https://github.com/mozilla/gecko-dev.git
Bug 675201 - Wait until the window opened by layout/generic/test/test_bug514732.html is closed before running the next test, hopefully fixing the intermittent orange in layout/generic/test/test_bug632379.xul; r=volkmar
This commit is contained in:
Родитель
84774ab4ac
Коммит
3c1768b9c5
|
@ -323,8 +323,20 @@ function finish() {
|
|||
|
||||
// Close the test window and signal the framework that the test is done.
|
||||
let opener = window.opener;
|
||||
let SimpleTest = opener.wrappedJSObject.SimpleTest;
|
||||
|
||||
// Wait for the window to be closed before finishing the test
|
||||
let ww = Cc["@mozilla.org/embedcomp/window-watcher;1"].getService(Ci.nsIWindowWatcher);
|
||||
ww.registerNotification(function(subject, topic, data) {
|
||||
if (topic == "domwindowclosed") {
|
||||
ww.unregisterNotification(arguments.callee);
|
||||
SimpleTest.waitForFocus(function() {
|
||||
SimpleTest.finish();
|
||||
}, opener);
|
||||
}
|
||||
});
|
||||
|
||||
window.close();
|
||||
opener.wrappedJSObject.SimpleTest.finish();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче