зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
128f14ac51
Коммит
6e92407dc0
|
@ -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) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче