Bug 543278 - Try to use a more robust way of making sure that the main browser window is focused before running the next browser-chrome test; r=Mossop

This commit is contained in:
Ehsan Akhgari 2010-05-12 18:51:04 -04:00
Родитель 128f14ac51
Коммит 6e92407dc0
1 изменённых файлов: 4 добавлений и 14 удалений

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

@ -89,20 +89,10 @@ Tester.prototype = {
}
// Make sure the window is raised before each test.
if (this._fm.activeWindow != window) {
this.dumper.dump("TEST-INFO | (browser-test.js) | Waiting for window activation...\n");
let self = this;
window.addEventListener("activate", function () {
window.removeEventListener("activate", arguments.callee, false);
setTimeout(function () {
aCallback.apply(self);
}, 0);
}, false);
window.focus();
return;
}
aCallback.apply(this);
let self = this;
this.SimpleTest.waitForFocus(function() {
aCallback.apply(self);
});
},
finish: function Tester_finish(aSkipSummary) {