The cookie behavior was changed in bug 1918342. Lets update the constant name to reflect the new behavior. This adds new string constants for enterprise policy while keeping the old constant for backwards compatibilty. "reject-tracker-and-partition-foreign" is now deprecated and aliases to the new "partition-foreign" Addons API keeps the current "reject_trackers_and_partition_foreign"[1] string constant for compatibility. [1]: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/privacy/websites#cookieconfig Differential Revision: https://phabricator.services.mozilla.com/D300794
39 lines
1.0 KiB
JavaScript
39 lines
1.0 KiB
JavaScript
/* Any copyright is dedicated to the Public Domain.
|
|
http://creativecommons.org/publicdomain/zero/1.0/ */
|
|
|
|
"use strict";
|
|
|
|
add_task(async function test_aboutblankInIframe() {
|
|
await SpecialPowers.pushPrefEnv({
|
|
set: [
|
|
["network.cookie.cookieBehavior", BEHAVIOR_PARTITION_FOREIGN],
|
|
["network.cookie.cookieBehavior.pbmode", BEHAVIOR_PARTITION_FOREIGN],
|
|
],
|
|
});
|
|
|
|
let tab = await BrowserTestUtils.openNewForegroundTab(
|
|
gBrowser,
|
|
TEST_TOP_PAGE
|
|
);
|
|
let browser = tab.linkedBrowser;
|
|
|
|
await SpecialPowers.spawn(browser, [], async function () {
|
|
let ifr = content.document.createElement("iframe");
|
|
let loading = new content.Promise(resolve => {
|
|
ifr.onload = resolve;
|
|
});
|
|
ifr.src = "about:blank";
|
|
content.document.body.appendChild(ifr);
|
|
await loading;
|
|
|
|
await SpecialPowers.spawn(ifr, [], async function () {
|
|
ok(
|
|
content.navigator.cookieEnabled,
|
|
"Cookie should be enabled in about blank"
|
|
);
|
|
});
|
|
});
|
|
|
|
BrowserTestUtils.removeTab(tab);
|
|
});
|