mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 658738 - observe browser-delayed-startup-finished instead of replacing delayedStartup
This commit is contained in:
parent
4004fc4ed4
commit
ccf200872f
@ -26,25 +26,22 @@ function next() {
|
||||
|
||||
function detach() {
|
||||
var win = gBrowser.replaceTabWithWindow(tab);
|
||||
win.addEventListener("load", function () {
|
||||
win.removeEventListener("load", arguments.callee, false);
|
||||
|
||||
var _delayedStartup = win.delayedStartup;
|
||||
win.delayedStartup = function delayedStartup() {
|
||||
_delayedStartup.apply(win, arguments);
|
||||
win.delayedStartup = _delayedStartup;
|
||||
Services.obs.addObserver(function (subject, topic, data) {
|
||||
if (subject != win)
|
||||
return;
|
||||
Services.obs.removeObserver(arguments.callee, topic);
|
||||
|
||||
is(win.gBrowser.currentURI.spec, uri, uri + ": uri loaded in detached tab");
|
||||
is(win.document.activeElement, win.gBrowser.selectedBrowser, uri + ": browser is focused");
|
||||
is(win.gURLBar.value, "", uri + ": urlbar is empty");
|
||||
ok(win.gURLBar.placeholder, uri + ": placeholder text is present");
|
||||
is(win.gBrowser.currentURI.spec, uri, uri + ": uri loaded in detached tab");
|
||||
is(win.document.activeElement, win.gBrowser.selectedBrowser, uri + ": browser is focused");
|
||||
is(win.gURLBar.value, "", uri + ": urlbar is empty");
|
||||
ok(win.gURLBar.placeholder, uri + ": placeholder text is present");
|
||||
|
||||
win.close();
|
||||
if (uris.length)
|
||||
next();
|
||||
else
|
||||
executeSoon(finish);
|
||||
};
|
||||
}, false);
|
||||
win.close();
|
||||
if (uris.length)
|
||||
next();
|
||||
else
|
||||
executeSoon(finish);
|
||||
}, "browser-delayed-startup-finished", false);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user