Backed out changeset 398c921e372c (bug 1586725) for browser-chrome failures at browser/components/originattributes/test/browser/browser_firstPartyIsolation_js_uri.js

This commit is contained in:
Coroiu Cristina
2019-10-25 13:05:06 +03:00
parent 677c3e8d66
commit 624b09b238
2 changed files with 11 additions and 15 deletions

View File

@@ -74,6 +74,7 @@ skip-if = debug #Bug 1345346
[browser_firstPartyIsolation_aboutPages.js]
[browser_firstPartyIsolation_blobURI.js]
[browser_firstPartyIsolation_js_uri.js]
skip-if = fission
[browser_firstPartyIsolation_saveAs.js]
skip-if = fission
[browser_localStorageIsolation.js]

View File

@@ -13,11 +13,8 @@ add_task(async function test_remote_window_open_js_uri() {
Assert.ok(browser.isRemoteBrowser, "should be a remote browser");
BrowserTestUtils.loadURI(browser, `javascript:1;`);
await BrowserTestUtils.browserLoaded(browser);
await SpecialPowers.spawn(browser, [], async function() {
Assert.ok(true, "origin " + content.document.nodePrincipal.origin);
await ContentTask.spawn(browser, {}, async function() {
info("origin " + content.document.nodePrincipal.origin);
Assert.ok(
content.document.nodePrincipal.isNullPrincipal,
@@ -50,7 +47,7 @@ add_task(async function test_remote_window_open_js_uri2() {
iframe.src = "http://example.com";
iframe.id = "iframe1";
document.body.appendChild(iframe);
void(0);
alert("connect to http://example.com");
`
);
@@ -59,8 +56,8 @@ add_task(async function test_remote_window_open_js_uri2() {
return url == "http://example.com/";
});
await SpecialPowers.spawn(browser, [], async function() {
Assert.ok(true, "origin " + content.document.nodePrincipal.origin);
await ContentTask.spawn(browser, {}, async function() {
info("origin " + content.document.nodePrincipal.origin);
Assert.ok(
content.document.nodePrincipal.isNullPrincipal,
@@ -77,13 +74,11 @@ add_task(async function test_remote_window_open_js_uri2() {
);
let iframe = content.document.getElementById("iframe1");
await SpecialPowers.spawn(iframe, [expectDomain], function(domain) {
Assert.equal(
content.document.nodePrincipal.originAttributes.firstPartyDomain,
domain,
"iframe should have firstPartyDomain set to " + domain
);
});
Assert.equal(
iframe.contentDocument.nodePrincipal.originAttributes.firstPartyDomain,
expectDomain,
"iframe should have firstPartyDomain set to " + expectDomain
);
});
win.close();