зеркало из https://github.com/mozilla/gecko-dev.git
Bug 950342 - Random failures in toolkit/components/places/tests/browser/browser_visituri_privatebrowsing_perwindowpb.js, r=ehsan
--HG-- extra : rebase_source : c1965dc68e125f1523ee102900afa77ed57ff922
This commit is contained in:
Родитель
fbb2a33ead
Коммит
1aad93b696
|
@ -18,6 +18,10 @@ function test() {
|
|||
|
||||
function doTest(aIsPrivateMode, aWindow, aTestURI, aCallback) {
|
||||
aWindow.gBrowser.selectedBrowser.addEventListener("load", function onLoad() {
|
||||
if (aWindow.gBrowser.selectedBrowser.contentWindow.location != aTestURI) {
|
||||
aWindow.gBrowser.selectedBrowser.contentWindow.location = aTestURI;
|
||||
return;
|
||||
}
|
||||
aWindow.gBrowser.selectedBrowser.removeEventListener("load", onLoad, true);
|
||||
|
||||
if (aCallback) {
|
||||
|
|
|
@ -340,12 +340,18 @@ function DBConn(aForceNewConnection) {
|
|||
return gDBConn.connectionReady ? gDBConn : null;
|
||||
}
|
||||
|
||||
function whenDelayedStartupFinished(aWindow, aCallback) {
|
||||
Services.obs.addObserver(function observer(aSubject, aTopic) {
|
||||
if (aWindow == aSubject) {
|
||||
Services.obs.removeObserver(observer, aTopic);
|
||||
executeSoon(function() { aCallback(aWindow); });
|
||||
}
|
||||
}, "browser-delayed-startup-finished", false);
|
||||
}
|
||||
|
||||
function whenNewWindowLoaded(aOptions, aCallback) {
|
||||
let win = OpenBrowserWindow(aOptions);
|
||||
win.addEventListener("load", function onLoad() {
|
||||
win.removeEventListener("load", onLoad, false);
|
||||
aCallback(win);
|
||||
}, false);
|
||||
whenDelayedStartupFinished(win, aCallback);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче