mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 963945 - Add about:addons URI as whitelisted so that it can be refocused instead of opening duplicate tabs in private browsing. r=jdm
This commit is contained in:
parent
c49d96cb02
commit
209ecfe36b
@ -7476,6 +7476,7 @@ function switchToTabHavingURI(aURI, aOpenNew, aOpenParams={}) {
|
||||
// Certain URLs can be switched to irrespective of the source or destination
|
||||
// window being in private browsing mode:
|
||||
const kPrivateBrowsingWhitelist = new Set([
|
||||
"about:addons",
|
||||
"about:customizing",
|
||||
]);
|
||||
|
||||
|
@ -486,3 +486,4 @@ skip-if = e10s # bug 1100687 - test directly manipulates content (content.docume
|
||||
[browser_mcb_redirect.js]
|
||||
skip-if = e10s # bug 1084504 - [e10s] Mixed content detection does not take redirection into account
|
||||
[browser_windowactivation.js]
|
||||
[browser_bug963945.js]
|
||||
|
30
browser/base/content/test/general/browser_bug963945.js
Normal file
30
browser/base/content/test/general/browser_bug963945.js
Normal file
@ -0,0 +1,30 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
/*
|
||||
* This test ensures the about:addons tab is only
|
||||
* opened one time when in private browsing.
|
||||
*/
|
||||
|
||||
function test() {
|
||||
waitForExplicitFinish();
|
||||
|
||||
var win = OpenBrowserWindow({private: true});
|
||||
|
||||
whenDelayedStartupFinished(win, function() {
|
||||
win.gBrowser.loadURI("about:addons");
|
||||
|
||||
waitForFocus(function() {
|
||||
EventUtils.synthesizeKey("a", { ctrlKey: true, shiftKey: true }, win);
|
||||
|
||||
is(win.gBrowser.tabs.length, 1, "about:addons tab was re-focused.");
|
||||
is(win.gBrowser.currentURI.spec, "about:addons", "Addons tab was opened.");
|
||||
|
||||
win.close();
|
||||
finish();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user