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-15 13:26:21 +00:00
Родитель 427e8a4906
Коммит e0cfd50914
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, // the iframe containing this page is isolated from first-party storage access,
// which isolates BroadcastChannel communication. // which isolates BroadcastChannel communication.
SpecialPowers.wrap(document).notifyUserGestureActivation(); SpecialPowers.wrap(document).notifyUserGestureActivation();
SpecialPowers.addPermission("storageAccessAPI", true, window.location.href).then(() =>{ SpecialPowers.pushPrefEnv({
SpecialPowers.wrap(document).requestStorageAccess().then(() => { set: [["privacy.partition.always_partition_third_party_non_cookie_storage", false]],
executeTest(); }).then(() => {
SpecialPowers.addPermission("storageAccessAPI", true, window.location.href).then(() => {
SpecialPowers.wrap(document).requestStorageAccess().then(() => {
executeTest();
});
}); });
}); });
} else { } else {