Bug 599253 - TEST-UNEXPECTED-FAIL | browser_586068-cascaded_restore.js | Test timed out. Possible fix for intermittent orange. r=zpao, a=test-only

This commit is contained in:
Dan Witte 2010-11-16 09:37:09 -08:00
parent 5ef44c8570
commit 4725048bd9

View File

@ -69,10 +69,20 @@ function runNextTest() {
// set an empty state & run the next test, or finish
if (tests.length) {
// Enumerate windows and close everything but our primary window. We can't
// use waitForFocus() because apparently it's buggy. See bug 599253.
var windowsEnum = Services.wm.getEnumerator("navigator:browser");
while (windowsEnum.hasMoreElements()) {
var currentWindow = windowsEnum.getNext();
if (currentWindow != window) {
currentWindow.close();
}
}
ss.setBrowserState(JSON.stringify({ windows: [{ tabs: [{ url: 'about:blank' }] }] }));
let test = tests.shift();
info("running " + test.name);
executeSoon(test);
let currentTest = tests.shift();
info("running " + currentTest.name);
executeSoon(currentTest);
}
else {
ss.setBrowserState(stateBackup);