зеркало из https://github.com/mozilla/gecko-dev.git
Merge backout; a=orange
This commit is contained in:
Коммит
3a3102657c
|
@ -1252,9 +1252,6 @@ function BrowserStartup() {
|
||||||
|
|
||||||
BookmarksMenuButton.init();
|
BookmarksMenuButton.init();
|
||||||
|
|
||||||
// initialize the private browsing UI
|
|
||||||
gPrivateBrowsingUI.init();
|
|
||||||
|
|
||||||
setTimeout(delayedStartup, 0, isLoadingBlank, mustLoadSidebar);
|
setTimeout(delayedStartup, 0, isLoadingBlank, mustLoadSidebar);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1540,6 +1537,9 @@ function delayedStartup(isLoadingBlank, mustLoadSidebar) {
|
||||||
placesContext.addEventListener("popuphiding", updateEditUIVisibility, false);
|
placesContext.addEventListener("popuphiding", updateEditUIVisibility, false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// initialize the private browsing UI
|
||||||
|
gPrivateBrowsingUI.init();
|
||||||
|
|
||||||
gBrowser.mPanelContainer.addEventListener("InstallBrowserTheme", LightWeightThemeWebInstaller, false, true);
|
gBrowser.mPanelContainer.addEventListener("InstallBrowserTheme", LightWeightThemeWebInstaller, false, true);
|
||||||
gBrowser.mPanelContainer.addEventListener("PreviewBrowserTheme", LightWeightThemeWebInstaller, false, true);
|
gBrowser.mPanelContainer.addEventListener("PreviewBrowserTheme", LightWeightThemeWebInstaller, false, true);
|
||||||
gBrowser.mPanelContainer.addEventListener("ResetBrowserThemePreview", LightWeightThemeWebInstaller, false, true);
|
gBrowser.mPanelContainer.addEventListener("ResetBrowserThemePreview", LightWeightThemeWebInstaller, false, true);
|
||||||
|
|
|
@ -47,16 +47,17 @@ function test() {
|
||||||
pb.privateBrowsingEnabled = true;
|
pb.privateBrowsingEnabled = true;
|
||||||
|
|
||||||
let win = OpenBrowserWindow();
|
let win = OpenBrowserWindow();
|
||||||
win.addEventListener("load", function() {
|
Services.obs.addObserver(function(subject, topic, data) {
|
||||||
win.removeEventListener("load", arguments.callee, false);
|
Services.obs.removeObserver(arguments.callee, "browser-delayed-startup-finished");
|
||||||
executeSoon(function() {
|
var notifiedWin = subject.QueryInterface(Ci.nsIDOMWindow);
|
||||||
let cmd = win.document.getElementById("Tools:PrivateBrowsing");
|
is(win, notifiedWin, "sanity check");
|
||||||
ok(!cmd.hasAttribute("disabled"),
|
|
||||||
"The Private Browsing command in a new window should be enabled");
|
|
||||||
|
|
||||||
win.close();
|
let cmd = win.document.getElementById("Tools:PrivateBrowsing");
|
||||||
pb.privateBrowsingEnabled = false;
|
ok(!cmd.hasAttribute("disabled"),
|
||||||
finish();
|
"The Private Browsing command in a new window should be enabled");
|
||||||
});
|
|
||||||
}, false);
|
win.close();
|
||||||
|
pb.privateBrowsingEnabled = false;
|
||||||
|
finish();
|
||||||
|
}, "browser-delayed-startup-finished", false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,14 +93,19 @@ function test() {
|
||||||
win.addEventListener("load", function() {
|
win.addEventListener("load", function() {
|
||||||
win.removeEventListener("load", arguments.callee, false);
|
win.removeEventListener("load", arguments.callee, false);
|
||||||
|
|
||||||
executeSoon(function() {
|
// ensure that the test is run after delayedStartup
|
||||||
|
let _delayedStartup = win.delayedStartup;
|
||||||
|
win.delayedStartup = function() {
|
||||||
|
_delayedStartup.apply(win, arguments);
|
||||||
|
win.delayedStartup = _delayedStartup;
|
||||||
|
|
||||||
is(win.document.title, expected_title, "The window title for " + url +
|
is(win.document.title, expected_title, "The window title for " + url +
|
||||||
" detached tab is correct (" + (insidePB ? "inside" : "outside") +
|
" detached tab is correct (" + (insidePB ? "inside" : "outside") +
|
||||||
" private browsing mode)");
|
" private browsing mode)");
|
||||||
win.close();
|
win.close();
|
||||||
|
|
||||||
setTimeout(funcNext, 0);
|
setTimeout(funcNext, 0);
|
||||||
});
|
};
|
||||||
}, false);
|
}, false);
|
||||||
});
|
});
|
||||||
}, false);
|
}, false);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче