forked from mirrors/gecko-dev
Bug 1888695 - Add a pref for the iframe XFO/CSP Open In New Window button. r=dveditz
Differential Revision: https://phabricator.services.mozilla.com/D206911
This commit is contained in:
parent
292449038b
commit
b566e47150
5 changed files with 12 additions and 1 deletions
|
|
@ -8,6 +8,10 @@ const BLOCKED_PAGE =
|
|||
"http://example.org:8000/browser/browser/base/content/test/about/csp_iframe.sjs";
|
||||
|
||||
add_task(async function test_csp() {
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
set: [["security.xfocsp.hideOpenInNewWindow", false]],
|
||||
});
|
||||
|
||||
let { iframePageTab, blockedPageTab } = await setupPage(
|
||||
"iframe_page_csp.html",
|
||||
BLOCKED_PAGE
|
||||
|
|
|
|||
|
|
@ -8,6 +8,10 @@ const BLOCKED_PAGE =
|
|||
"http://example.org:8000/browser/browser/base/content/test/about/xfo_iframe.sjs";
|
||||
|
||||
add_task(async function test_xfo_iframe() {
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
set: [["security.xfocsp.hideOpenInNewWindow", false]],
|
||||
});
|
||||
|
||||
let { iframePageTab, blockedPageTab } = await setupPage(
|
||||
"iframe_page_xfo.html",
|
||||
BLOCKED_PAGE
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ pref("security.signed_app_signatures.policy", 2);
|
|||
|
||||
pref("security.xfocsp.errorReporting.enabled", true);
|
||||
pref("security.xfocsp.errorReporting.automatic", false);
|
||||
pref("security.xfocsp.hideOpenInNewWindow", true);
|
||||
|
||||
// Issuer we use to detect MitM proxies. Set to the issuer of the cert of the
|
||||
// Firefox update service. The string format is whatever NSS uses to print a DN.
|
||||
|
|
|
|||
|
|
@ -396,7 +396,8 @@ function initPage() {
|
|||
});
|
||||
longDesc = null;
|
||||
|
||||
document.getElementById("openInNewWindowContainer").hidden = false;
|
||||
document.getElementById("openInNewWindowContainer").hidden =
|
||||
RPMGetBoolPref("security.xfocsp.hideOpenInNewWindow");
|
||||
|
||||
const openInNewWindowButton = document.getElementById(
|
||||
"openInNewWindowButton"
|
||||
|
|
|
|||
|
|
@ -103,6 +103,7 @@ export let RemotePageAccessManager = {
|
|||
"security.certerror.hideAddException",
|
||||
"security.xfocsp.errorReporting.automatic",
|
||||
"security.xfocsp.errorReporting.enabled",
|
||||
"security.xfocsp.hideOpenInNewWindow",
|
||||
"network.trr.display_fallback_warning",
|
||||
],
|
||||
RPMSetPref: [
|
||||
|
|
|
|||
Loading…
Reference in a new issue