Bug 1662325 - Use EqualsIgnoringFPD to compare originAttributes in nsFrameLoader::SwapWithOtherRemoteLoader. r=emilio,nika

Differential Revision: https://phabricator.services.mozilla.com/D89528
This commit is contained in:
Hiroyuki Ikezoe 2020-09-09 23:57:28 +00:00
parent 013ad7db46
commit f911529508
2 changed files with 27 additions and 8 deletions

View File

@ -1223,7 +1223,7 @@ nsresult nsFrameLoader::SwapWithOtherRemoteLoader(
rv = aOther->PopulateOriginContextIdsFromAttributes(otherOriginAttributes);
NS_ENSURE_SUCCESS(rv, rv);
if (ourOriginAttributes != otherOriginAttributes) {
if (!ourOriginAttributes.EqualsIgnoringFPD(otherOriginAttributes)) {
return NS_ERROR_NOT_IMPLEMENTED;
}

View File

@ -8,13 +8,7 @@ const TEST_PATH = getRootDirectory(gTestPath).replace(
"https://example.com"
);
add_task(async function test() {
// window.print() only shows print preview when print.tab_modal.enabled is
// true.
await SpecialPowers.pushPrefEnv({
set: [["print.tab_modal.enabled", true]],
});
async function runTest() {
is(
document.querySelector(".printPreviewBrowser"),
null,
@ -38,4 +32,29 @@ add_task(async function test() {
});
ok(contentFound, "We should find the preview content.");
BrowserTestUtils.removeTab(gBrowser.selectedTab);
}
add_task(async function test_in_container() {
// window.print() only shows print preview when print.tab_modal.enabled is
// true.
await SpecialPowers.pushPrefEnv({
set: [
["print.tab_modal.enabled", true],
["privacy.firstparty.isolate", false],
],
});
await runTest();
});
add_task(async function test_with_fpi() {
// window.print() only shows print preview when print.tab_modal.enabled is
// true.
await SpecialPowers.pushPrefEnv({
set: [
["print.tab_modal.enabled", true],
["privacy.firstparty.isolate", true],
],
});
await runTest();
});