mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 15:25:52 +00:00
Bug 1634303 - make test support BEHAVIOR_REJECT_TRACKER_AND_PARTITION_FOREIGN
; r=johannh
Differential Revision: https://phabricator.services.mozilla.com/D73257
This commit is contained in:
parent
fae0df7eaf
commit
16a940c040
@ -140,9 +140,10 @@ function areTrackersBlocked(isPrivateBrowsing) {
|
||||
let blockedByTP = Services.prefs.getBoolPref(
|
||||
isPrivateBrowsing ? TP_PB_PREF : TP_PREF
|
||||
);
|
||||
let blockedByTPC =
|
||||
Services.prefs.getIntPref(TPC_PREF) ==
|
||||
Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER;
|
||||
let blockedByTPC = [
|
||||
Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER,
|
||||
Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER_AND_PARTITION_FOREIGN,
|
||||
].includes(Services.prefs.getIntPref(TPC_PREF));
|
||||
return blockedByTP || blockedByTPC;
|
||||
}
|
||||
|
||||
@ -371,8 +372,10 @@ add_task(async function testThirdPartyCookies() {
|
||||
ok(ThirdPartyCookies, "TP is attached to the browser window");
|
||||
is(
|
||||
ThirdPartyCookies.enabled,
|
||||
Services.prefs.getIntPref(TPC_PREF) ==
|
||||
[
|
||||
Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER,
|
||||
Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER_AND_PARTITION_FOREIGN,
|
||||
].includes(Services.prefs.getIntPref(TPC_PREF)),
|
||||
"TPC.enabled is based on the original pref value"
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user