Bug 1762462 - Make tests in layout/base/tests/ reflect Always Partitioning Storage; r=smaug

Depends on D148058

Differential Revision: https://phabricator.services.mozilla.com/D148059
This commit is contained in:
Thomas Wisniewski 2022-07-14 19:26:30 +00:00
Родитель 800971d7fd
Коммит 1573bf3cdb
1 изменённых файлов: 7 добавлений и 3 удалений

Просмотреть файл

@ -99,9 +99,13 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=607529
// the iframe containing this page is isolated from first-party storage access,
// which isolates BroadcastChannel communication.
SpecialPowers.wrap(document).notifyUserGestureActivation();
SpecialPowers.addPermission("storageAccessAPI", true, window.location.href).then(() =>{
SpecialPowers.wrap(document).requestStorageAccess().then(() => {
executeTest();
SpecialPowers.pushPrefEnv({
set: [["privacy.partition.always_partition_third_party_non_cookie_storage", false]],
}).then(() => {
SpecialPowers.addPermission("storageAccessAPI", true, window.location.href).then(() => {
SpecialPowers.wrap(document).requestStorageAccess().then(() => {
executeTest();
});
});
});
} else {