Bug 1556881 - Fix browser_partitionedLocalStorage_events.js to not assume the dom.storage.next_gen pref is live; r=baku

Differential Revision: https://phabricator.services.mozilla.com/D38122

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Ehsan Akhgari 2019-07-16 18:58:22 +00:00
Родитель 826f1ff208
Коммит e62b713e21
1 изменённых файлов: 5 добавлений и 18 удалений

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

@ -5,11 +5,7 @@ function log(test) {
test.withStoragePrincipalEnabled
? "with storage principal enabled"
: "without storage principal"
} ` +
`with the ${
test.lsngEnabled ? "new" : "old"
} localStorage backend and prefValue: ${test.prefValue} ` +
`(Test #${test.iteration + 1})`
} with prefValue: ${test.prefValue} (Test #${test.iteration + 1})`
);
test.iteration++;
} else {
@ -18,7 +14,7 @@ function log(test) {
}
}
function runAllTests(withStoragePrincipalEnabled, lsngEnabled, prefValue) {
function runAllTests(withStoragePrincipalEnabled, prefValue) {
const storagePrincipalTest =
prefValue == Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER;
const dynamicFPITest =
@ -30,7 +26,7 @@ function runAllTests(withStoragePrincipalEnabled, lsngEnabled, prefValue) {
return;
}
const test = { withStoragePrincipalEnabled, lsngEnabled, prefValue };
const test = { withStoragePrincipalEnabled, prefValue };
// For dynamic FPI tests, we want to test the conditions as if
// storage principal was enabled, so from now on we set this variable to
@ -79,7 +75,6 @@ function runAllTests(withStoragePrincipalEnabled, lsngEnabled, prefValue) {
"privacy.storagePrincipal.enabledForTrackers",
storagePrincipalPrefValue,
],
["dom.storage.next_gen", lsngEnabled],
],
});
@ -204,7 +199,6 @@ function runAllTests(withStoragePrincipalEnabled, lsngEnabled, prefValue) {
"privacy.storagePrincipal.enabledForTrackers",
storagePrincipalPrefValue,
],
["dom.storage.next_gen", lsngEnabled],
],
});
@ -325,7 +319,6 @@ function runAllTests(withStoragePrincipalEnabled, lsngEnabled, prefValue) {
"privacy.storagePrincipal.enabledForTrackers",
storagePrincipalPrefValue,
],
["dom.storage.next_gen", lsngEnabled],
],
});
@ -433,7 +426,6 @@ function runAllTests(withStoragePrincipalEnabled, lsngEnabled, prefValue) {
"privacy.storagePrincipal.enabledForTrackers",
storagePrincipalPrefValue,
],
["dom.storage.next_gen", lsngEnabled],
],
});
@ -527,7 +519,6 @@ function runAllTests(withStoragePrincipalEnabled, lsngEnabled, prefValue) {
"privacy.storagePrincipal.enabledForTrackers",
storagePrincipalPrefValue,
],
["dom.storage.next_gen", lsngEnabled],
],
});
@ -618,7 +609,6 @@ function runAllTests(withStoragePrincipalEnabled, lsngEnabled, prefValue) {
"privacy.storagePrincipal.enabledForTrackers",
storagePrincipalPrefValue,
],
["dom.storage.next_gen", lsngEnabled],
],
});
@ -712,7 +702,6 @@ function runAllTests(withStoragePrincipalEnabled, lsngEnabled, prefValue) {
"privacy.storagePrincipal.enabledForTrackers",
storagePrincipalPrefValue,
],
["dom.storage.next_gen", lsngEnabled],
],
});
@ -796,8 +785,6 @@ for (let pref of [
Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER,
Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER_AND_PARTITION_FOREIGN,
]) {
runAllTests(false, true, pref);
runAllTests(false, false, pref);
runAllTests(true, true, pref);
runAllTests(true, false, pref);
runAllTests(false, pref);
runAllTests(true, pref);
}