Bug 1607460 - Fix browser_httpCrossOriginOpenerPolicy.js r=michal

Depends on D60481

Differential Revision: https://phabricator.services.mozilla.com/D62896

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Valentin Gosu 2020-02-17 10:15:31 +00:00
parent 44526362dd
commit 1c3fa01428
2 changed files with 3 additions and 18 deletions

View File

@ -268,11 +268,6 @@ add_task(async function test_disabled() {
httpURL("coop_header.sjs?coop=same-origin", "http://example.com"),
false
);
await test_coop(
httpURL("coop_header.sjs?coop=same-origin", "http://example.com"),
httpURL("coop_header.sjs?coop=same-site", "http://example.com"),
false
); // assuming we don't have fission yet :)
});
add_task(async function test_enabled() {
@ -321,13 +316,6 @@ add_task(async function test_enabled() {
checkIsNotCoopRemoteType,
checkIsNotCoopRemoteType
);
await test_coop(
httpURL("coop_header.sjs?coop=same-origin&index=2", "https://example.com"),
httpURL("coop_header.sjs?coop=same-site&index=2", "https://example.org"),
true,
checkIsNotCoopRemoteType,
checkIsNotCoopRemoteType
);
await test_coop(
httpURL("coop_header.sjs", "https://example.com"),
httpURL(
@ -380,14 +368,12 @@ add_task(async function test_download() {
requestLongerTimeout(4);
await setPref();
let initCoopArray = ["", "same-site", "same-origin"];
let initCoopArray = ["", "same-origin"];
let downloadCoopArray = [
"no-coop",
"same-site",
"same-origin",
"same-site%20unsafe-allow-outgoing",
"same-origin%20unsafe-allow-outgoing",
"same-origin-allow-popups",
];
// If the coop mismatch between current page and download link, clicking the

View File

@ -23,8 +23,7 @@ function handleRequest(request, response)
let downloadHTML = "";
if (isDownloadPage) {
[
"no-coop", "same-site", "same-origin", "same-site%20unsafe-allow-outgoing",
"same-origin%20unsafe-allow-outgoing"
"no-coop", "same-origin", "same-origin-allow-popups",
].forEach(coop => {
downloadHTML +=
'<a href="https://example.com/browser/toolkit/components/remotebrowserutils/tests/browser/coop_header.sjs?downloadFile&' +