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:
Ehsan Akhgari 2011-08-18 11:09:16 -04:00
Родитель 84774ab4ac
Коммит 3c1768b9c5
1 изменённых файлов: 13 добавлений и 1 удалений

Просмотреть файл

@ -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();
}
/**