зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1547813 - Part 10: Add support for nsICookieService.BEHAVIOR_REJECT_TRACKER_AND_PARTITION_FOREIGN to the content blocking category pref; r=ewright
Differential Revision: https://phabricator.services.mozilla.com/D30119 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
a5fe850945
Коммит
75c04ff5b5
|
@ -1609,6 +1609,7 @@ pref("browser.contentblocking.fingerprinting.preferences.ui.enabled", true);
|
|||
// "cookieBehavior2": cookie behaviour BEHAVIOR_REJECT
|
||||
// "cookieBehavior3": cookie behaviour BEHAVIOR_LIMIT_FOREIGN
|
||||
// "cookieBehavior4": cookie behaviour BEHAVIOR_REJECT_TRACKER
|
||||
// "cookieBehavior5": cookie behaviour BEHAVIOR_REJECT_TRACKER_AND_PARTITION_FOREIGN
|
||||
// One value from each section must be included in the browser.contentblocking.features.strict pref.
|
||||
pref("browser.contentblocking.features.strict", "tp,tpPrivate,cookieBehavior4,cm,fp");
|
||||
|
||||
|
|
|
@ -3116,6 +3116,9 @@ var ContentBlockingCategoriesPrefs = {
|
|||
case "cookieBehavior4":
|
||||
this.CATEGORY_PREFS[type]["network.cookie.cookieBehavior"] = Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER;
|
||||
break;
|
||||
case "cookieBehavior5":
|
||||
this.CATEGORY_PREFS[type]["network.cookie.cookieBehavior"] = Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER_AND_PARTITION_FOREIGN;
|
||||
break;
|
||||
default:
|
||||
Cu.reportError(`Error: Unknown rule observed ${item}`);
|
||||
}
|
||||
|
|
|
@ -591,6 +591,9 @@ var gPrivacyPane = {
|
|||
case "cookieBehavior4":
|
||||
document.querySelector(selector + " .third-party-tracking-cookies-option").hidden = false;
|
||||
break;
|
||||
case "cookieBehavior5":
|
||||
// No UI support for this cookie policy yet
|
||||
break;
|
||||
}
|
||||
}
|
||||
// Hide the "tracking protection in private browsing" list item
|
||||
|
|
|
@ -273,6 +273,9 @@ add_task(async function testContentBlockingStrictCategory() {
|
|||
case "cookieBehavior4":
|
||||
is(Services.prefs.getIntPref(NCB_PREF), Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER, `${NCB_PREF} has been set to ${Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER}`);
|
||||
break;
|
||||
case "cookieBehavior5":
|
||||
is(Services.prefs.getIntPref(NCB_PREF), Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER_AND_PARTITION_FOREIGN, `${NCB_PREF} has been set to ${Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER_AND_PARTITION_FOREIGN}`);
|
||||
break;
|
||||
default:
|
||||
ok(false, "unknown option was added to the strict pref");
|
||||
break;
|
||||
|
@ -325,6 +328,7 @@ add_task(async function testContentBlockingCustomCategory() {
|
|||
nonDefaultNCB = Ci.nsICookieService.BEHAVIOR_REJECT;
|
||||
break;
|
||||
case Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER:
|
||||
case Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER_AND_PARTITION_FOREIGN:
|
||||
nonDefaultNCB = Ci.nsICookieService.BEHAVIOR_ACCEPT;
|
||||
break;
|
||||
default:
|
||||
|
|
Загрузка…
Ссылка в новой задаче