зеркало из https://github.com/mozilla/gecko-dev.git
Backed out 2 changesets (bug 1486181, bug 1486414) for failures on browser_contentblocking.js on a CLOSED TREE
Backed out changeset 9ddd9b9a9919 (bug 1486414) Backed out changeset 3a11a4848d40 (bug 1486181)
This commit is contained in:
Родитель
03bd411211
Коммит
9ca03066d9
|
@ -1501,8 +1501,6 @@ pref("browser.contentblocking.cookies-site-data.ui.reject-trackers.recommended",
|
|||
pref("browser.contentblocking.fastblock.control-center.ui.enabled", true);
|
||||
pref("browser.contentblocking.trackingprotection.control-center.ui.enabled", true);
|
||||
pref("browser.contentblocking.rejecttrackers.ui.recommended", true);
|
||||
pref("browser.contentblocking.fastblock.ui.enabled", true);
|
||||
pref("browser.contentblocking.trackingprotection.ui.enabled", true);
|
||||
#ifdef NIGHTLY_BUILD
|
||||
pref("browser.contentblocking.ui.enabled", true);
|
||||
pref("browser.contentblocking.cookies-site-data.ui.reject-trackers.enabled", true);
|
||||
|
|
|
@ -132,12 +132,7 @@ var TrackingProtection = {
|
|||
|
||||
var ThirdPartyCookies = {
|
||||
PREF_ENABLED: "network.cookie.cookieBehavior",
|
||||
PREF_ENABLED_VALUES: [
|
||||
// These values match the ones exposed under the Content Blocking section
|
||||
// of the Preferences UI.
|
||||
Ci.nsICookieService.BEHAVIOR_REJECT_FOREIGN, // Block all third-party cookies
|
||||
Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER, // Block third-party cookies from trackers
|
||||
],
|
||||
PREF_ENABLED_VALUE: Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER,
|
||||
PREF_UI_ENABLED: "browser.contentblocking.rejecttrackers.control-center.ui.enabled",
|
||||
|
||||
get categoryItem() {
|
||||
|
@ -152,7 +147,7 @@ var ThirdPartyCookies = {
|
|||
XPCOMUtils.defineLazyPreferenceGetter(this, "visible", this.PREF_UI_ENABLED, false);
|
||||
},
|
||||
get enabled() {
|
||||
return this.PREF_ENABLED_VALUES.includes(this.behaviorPref);
|
||||
return this.behaviorPref == this.PREF_ENABLED_VALUE;
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -29,12 +29,6 @@ XPCOMUtils.defineLazyPreferenceGetter(this, "contentBlockingCookiesAndSiteDataRe
|
|||
XPCOMUtils.defineLazyPreferenceGetter(this, "contentBlockingCookiesAndSiteDataRejectTrackersEnabled",
|
||||
"browser.contentblocking.cookies-site-data.ui.reject-trackers.enabled");
|
||||
|
||||
XPCOMUtils.defineLazyPreferenceGetter(this, "contentBlockingFastBlockUiEnabled",
|
||||
"browser.contentblocking.fastblock.ui.enabled");
|
||||
|
||||
XPCOMUtils.defineLazyPreferenceGetter(this, "contentBlockingTrackingProtectionUiEnabled",
|
||||
"browser.contentblocking.trackingprotection.ui.enabled");
|
||||
|
||||
XPCOMUtils.defineLazyPreferenceGetter(this, "contentBlockingRejectTrackersUiEnabled",
|
||||
"browser.contentblocking.rejecttrackers.ui.enabled");
|
||||
|
||||
|
@ -499,21 +493,11 @@ var gPrivacyPane = {
|
|||
let url = Services.urlFormatter.formatURLPref("app.support.baseURL") + "tracking-protection";
|
||||
link.setAttribute("href", url);
|
||||
|
||||
// Honour our Content Blocking category UI prefs. If each pref is set to false,
|
||||
// Make all descendants of the corresponding selector hidden.
|
||||
let selectorPrefMap = {
|
||||
".fast-block-ui": contentBlockingFastBlockUiEnabled,
|
||||
".tracking-protection-ui": contentBlockingTrackingProtectionUiEnabled,
|
||||
".reject-trackers-ui": contentBlockingRejectTrackersUiEnabled,
|
||||
};
|
||||
|
||||
for (let selector in selectorPrefMap) {
|
||||
let pref = selectorPrefMap[selector];
|
||||
if (!pref) {
|
||||
let elements = document.querySelectorAll(selector);
|
||||
for (let element of elements) {
|
||||
element.hidden = true;
|
||||
}
|
||||
// Disable the Content Blocking Third-Party Cookies UI based on a pref
|
||||
if (!contentBlockingRejectTrackersUiEnabled) {
|
||||
let elements = document.querySelectorAll(".reject-trackers-ui");
|
||||
for (let element of elements) {
|
||||
element.hidden = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -331,7 +331,7 @@
|
|||
</hbox>
|
||||
<vbox id="contentBlockingCategories">
|
||||
<label id="content-blocking-categories-label" data-l10n-id="content-blocking-category-label"/>
|
||||
<hbox class="content-blocking-category fast-block-ui">
|
||||
<hbox class="content-blocking-category">
|
||||
<vbox class="content-blocking-category-checkbox">
|
||||
<checkbox id="contentBlockingFastBlockCheckbox"
|
||||
class="content-blocking-checkbox"
|
||||
|
@ -356,7 +356,7 @@
|
|||
class="extension-controlled-button accessory-button"
|
||||
data-l10n-id="disable-extension"/>
|
||||
</hbox>
|
||||
<hbox class="content-blocking-category tracking-protection-ui">
|
||||
<hbox class="content-blocking-category">
|
||||
<vbox class="content-blocking-category-checkbox">
|
||||
<checkbox id="contentBlockingTrackingProtectionCheckbox" class="content-blocking-checkbox" />
|
||||
</vbox>
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
const CB_PREF = "browser.contentblocking.enabled";
|
||||
const CB_UI_PREF = "browser.contentblocking.ui.enabled";
|
||||
const CB_FB_UI_PREF = "browser.contentblocking.fastblock.ui.enabled";
|
||||
const CB_TP_UI_PREF = "browser.contentblocking.trackingprotection.ui.enabled";
|
||||
const CB_RT_UI_PREF = "browser.contentblocking.rejecttrackers.ui.enabled";
|
||||
const TP_PREF = "privacy.trackingprotection.enabled";
|
||||
const TP_PBM_PREF = "privacy.trackingprotection.pbmode.enabled";
|
||||
|
@ -224,8 +222,6 @@ add_task(async function testContentBlockingDependentControls() {
|
|||
// since the checkbox next to Third-Party Cookies would be unchecked.
|
||||
SpecialPowers.pushPrefEnv({set: [
|
||||
[CB_UI_PREF, true],
|
||||
[CB_FB_UI_PREF, true],
|
||||
[CB_TP_UI_PREF, true],
|
||||
[CB_RT_UI_PREF, true],
|
||||
[NCB_PREF, Ci.nsICookieService.BEHAVIOR_ACCEPT],
|
||||
]});
|
||||
|
@ -248,8 +244,6 @@ add_task(async function testContentBlockingDependentControls() {
|
|||
// radiogroup's disabled status must obey the content blocking enabled state.
|
||||
SpecialPowers.pushPrefEnv({set: [
|
||||
[CB_UI_PREF, true],
|
||||
[CB_FB_UI_PREF, true],
|
||||
[CB_TP_UI_PREF, true],
|
||||
[CB_RT_UI_PREF, true],
|
||||
[NCB_PREF, Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER],
|
||||
]});
|
||||
|
@ -271,8 +265,6 @@ add_task(async function testContentBlockingDependentControls() {
|
|||
add_task(async function testContentBlockingDependentTPControls() {
|
||||
SpecialPowers.pushPrefEnv({set: [
|
||||
[CB_UI_PREF, true],
|
||||
[CB_FB_UI_PREF, true],
|
||||
[CB_TP_UI_PREF, true],
|
||||
[CB_RT_UI_PREF, true],
|
||||
[TP_PREF, false],
|
||||
[TP_PBM_PREF, false],
|
||||
|
@ -308,8 +300,6 @@ add_task(async function testContentBlockingDependentControlsOnSiteDataUI() {
|
|||
for (let value of prefValuesToTest) {
|
||||
await SpecialPowers.pushPrefEnv({set: [
|
||||
[CB_UI_PREF, true],
|
||||
[CB_FB_UI_PREF, true],
|
||||
[CB_TP_UI_PREF, true],
|
||||
[CB_RT_UI_PREF, true],
|
||||
[TP_PREF, false],
|
||||
[TP_PBM_PREF, true],
|
||||
|
@ -344,8 +334,6 @@ add_task(async function testContentBlockingDependentControlsOnSiteDataUI() {
|
|||
for (let value of prefValuesToTest) {
|
||||
await SpecialPowers.pushPrefEnv({set: [
|
||||
[CB_UI_PREF, true],
|
||||
[CB_FB_UI_PREF, true],
|
||||
[CB_TP_UI_PREF, true],
|
||||
[CB_RT_UI_PREF, true],
|
||||
[TP_PREF, false],
|
||||
[TP_PBM_PREF, true],
|
||||
|
@ -377,8 +365,6 @@ add_task(async function testContentBlockingDependentControlsOnSiteDataUI() {
|
|||
for (let value of prefValuesToTest) {
|
||||
await SpecialPowers.pushPrefEnv({set: [
|
||||
[CB_UI_PREF, true],
|
||||
[CB_FB_UI_PREF, true],
|
||||
[CB_TP_UI_PREF, true],
|
||||
[CB_RT_UI_PREF, true],
|
||||
[TP_PREF, false],
|
||||
[TP_PBM_PREF, true],
|
||||
|
@ -408,8 +394,6 @@ add_task(async function testContentBlockingThirdPartyCookiesWarning() {
|
|||
await SpecialPowers.pushPrefEnv({set: [
|
||||
[CB_PREF, true],
|
||||
[CB_UI_PREF, true],
|
||||
[CB_FB_UI_PREF, true],
|
||||
[CB_TP_UI_PREF, true],
|
||||
[CB_RT_UI_PREF, true],
|
||||
]});
|
||||
|
||||
|
|
|
@ -42,8 +42,6 @@ add_task(async function test_change_cookie_settings() {
|
|||
await SpecialPowers.pushPrefEnv({set: [
|
||||
["browser.contentblocking.enabled", true],
|
||||
["browser.contentblocking.ui.enabled", true],
|
||||
["browser.contentblocking.fastblock.ui.enabled", true],
|
||||
["browser.contentblocking.trackingprotection.ui.enabled", true],
|
||||
["browser.contentblocking.rejecttrackers.ui.enabled", true],
|
||||
]});
|
||||
let prefs = await openPreferencesViaOpenPreferencesAPI("privacy-trackingprotection", {leaveOpen: true});
|
||||
|
|
Загрузка…
Ссылка в новой задаче