зеркало из https://github.com/mozilla/gecko-dev.git
Backed out 2 changesets (bug 1818313, bug 1818583) for causing bustage in UrlClassifierFeatureEmailTrackingProtection.cpp CLOSED TREE
Backed out changeset 18e789b52610 (bug 1818313) Backed out changeset 61ba31a1183a (bug 1818583)
This commit is contained in:
Родитель
976c5c450b
Коммит
0fd7e95ed7
|
@ -993,18 +993,6 @@ export var Policies = {
|
|||
param.Locked
|
||||
);
|
||||
}
|
||||
if ("EmailTracking" in param) {
|
||||
PoliciesUtils.setDefaultPref(
|
||||
"privacy.trackingprotection.emailtracking.enabled",
|
||||
param.EmailTracking,
|
||||
param.Locked
|
||||
);
|
||||
PoliciesUtils.setDefaultPref(
|
||||
"privacy.trackingprotection.emailtracking.pbmode.enabled",
|
||||
param.EmailTracking,
|
||||
param.Locked
|
||||
);
|
||||
}
|
||||
if ("Exceptions" in param) {
|
||||
addAllowDenyPermissions("trackingprotection", param.Exceptions);
|
||||
}
|
||||
|
|
|
@ -448,9 +448,6 @@
|
|||
"Fingerprinting": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"EmailTracking": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"Exceptions": {
|
||||
"type": "array",
|
||||
"strict": false,
|
||||
|
|
|
@ -95,15 +95,12 @@ const POLICIES_TESTS = [
|
|||
EnableTrackingProtection: {
|
||||
Cryptomining: true,
|
||||
Fingerprinting: true,
|
||||
EmailTracking: true,
|
||||
Locked: true,
|
||||
},
|
||||
},
|
||||
lockedPrefs: {
|
||||
"privacy.trackingprotection.cryptomining.enabled": true,
|
||||
"privacy.trackingprotection.fingerprinting.enabled": true,
|
||||
"privacy.trackingprotection.emailtracking.enabled": true,
|
||||
"privacy.trackingprotection.emailtracking.pbmode.enabled": true,
|
||||
},
|
||||
},
|
||||
|
||||
|
|
|
@ -12737,18 +12737,12 @@
|
|||
value: true
|
||||
mirror: always
|
||||
|
||||
# Block 3rd party emailtracking resources in all mode.
|
||||
# Block 3rd party emailtracking resources.
|
||||
- name: privacy.trackingprotection.emailtracking.enabled
|
||||
type: bool
|
||||
value: @IS_NIGHTLY_BUILD@
|
||||
mirror: always
|
||||
|
||||
# Block 3rd party emailtracking resources in Private Browsing mode.
|
||||
- name: privacy.trackingprotection.emailtracking.pbmode.enabled
|
||||
type: bool
|
||||
value: true
|
||||
mirror: always
|
||||
|
||||
# Collecting 3rd party emailtracking telemetry.
|
||||
- name: privacy.trackingprotection.emailtracking.data_collection.enabled
|
||||
type: bool
|
||||
|
|
|
@ -91,10 +91,7 @@ UrlClassifierFeatureEmailTrackingProtection::MaybeCreate(nsIChannel* aChannel) {
|
|||
aChannel));
|
||||
|
||||
// Check if the email tracking protection is enabled.
|
||||
if (!StaticPrefs::privacy_trackingprotection_emailtracking_enabled() &&
|
||||
!(NS_UsePrivateBrowsing(aChannel) &&
|
||||
StaticPrefs::
|
||||
privacy_trackingprotection_emailtracking_pbmode_enabled())) {
|
||||
if (!StaticPrefs::privacy_trackingprotection_emailtracking_enabled()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@ add_setup(async function() {
|
|||
await SpecialPowers.pushPrefEnv({
|
||||
set: [
|
||||
["privacy.trackingprotection.enabled", false],
|
||||
["privacy.trackingprotection.pbmode.enabled", false],
|
||||
["privacy.trackingprotection.annotate_channels", false],
|
||||
["privacy.trackingprotection.cryptomining.enabled", false],
|
||||
["privacy.trackingprotection.emailtracking.enabled", true],
|
||||
|
@ -49,24 +48,12 @@ function runTest(obj) {
|
|||
"privacy.trackingprotection.emailtracking.enabled",
|
||||
obj.protectionEnabled,
|
||||
],
|
||||
[
|
||||
"privacy.trackingprotection.emailtracking.pbmode.enabled",
|
||||
obj.protectionPrivateEnabled,
|
||||
],
|
||||
],
|
||||
});
|
||||
|
||||
let win;
|
||||
|
||||
if (obj.testPrivate) {
|
||||
win = await BrowserTestUtils.openNewBrowserWindow({ private: true });
|
||||
} else {
|
||||
win = window;
|
||||
}
|
||||
|
||||
info("Creating a non-tracker top-level context");
|
||||
let tab = BrowserTestUtils.addTab(win.gBrowser, TEST_TOP_PAGE);
|
||||
let browser = tab.linkedBrowser;
|
||||
let tab = BrowserTestUtils.addTab(gBrowser, TEST_TOP_PAGE);
|
||||
let browser = gBrowser.getBrowserForTab(tab);
|
||||
await BrowserTestUtils.browserLoaded(browser);
|
||||
|
||||
info("The non-tracker page opens an email tracker iframe");
|
||||
|
@ -122,9 +109,6 @@ function runTest(obj) {
|
|||
}
|
||||
|
||||
BrowserTestUtils.removeTab(tab);
|
||||
if (obj.testPrivate) {
|
||||
await BrowserTestUtils.closeWindow(win);
|
||||
}
|
||||
await SpecialPowers.popPrefEnv();
|
||||
});
|
||||
}
|
||||
|
@ -133,7 +117,6 @@ runTest({
|
|||
testName:
|
||||
"EmailTracking-dataCollection feature enabled but not considered for tracking detection.",
|
||||
protectionEnabled: false,
|
||||
protectionPrivateEnabled: false,
|
||||
loading: true,
|
||||
expectedLogItems: [
|
||||
[
|
||||
|
@ -147,36 +130,8 @@ runTest({
|
|||
runTest({
|
||||
testName: "Emailtracking-protection feature enabled.",
|
||||
protectionEnabled: true,
|
||||
protectionPrivateEnabled: true,
|
||||
loading: false,
|
||||
expectedLogItems: [
|
||||
[Ci.nsIWebProgressListener.STATE_BLOCKED_EMAILTRACKING_CONTENT, true, 2],
|
||||
],
|
||||
});
|
||||
|
||||
runTest({
|
||||
testName:
|
||||
"Emailtracking-protection feature enabled for private windows and doesn't block in normal windows",
|
||||
protectionEnabled: false,
|
||||
protectionPrivateEnabled: true,
|
||||
loading: true,
|
||||
expectedLogItems: [
|
||||
[
|
||||
Ci.nsIWebProgressListener.STATE_LOADED_EMAILTRACKING_LEVEL_1_CONTENT,
|
||||
true,
|
||||
2,
|
||||
],
|
||||
],
|
||||
});
|
||||
|
||||
runTest({
|
||||
testName:
|
||||
"Emailtracking-protection feature enabled for private windows and block in private windows",
|
||||
testPrivate: true,
|
||||
protectionEnabled: true,
|
||||
protectionPrivateEnabled: true,
|
||||
loading: false,
|
||||
expectedLogItems: [
|
||||
[Ci.nsIWebProgressListener.STATE_BLOCKED_EMAILTRACKING_CONTENT, true, 1],
|
||||
],
|
||||
});
|
||||
|
|
|
@ -260,15 +260,9 @@ const FEATURES = [
|
|||
"urlclassifier.features.emailtracking.allowlistTables",
|
||||
],
|
||||
enabled() {
|
||||
return (
|
||||
Services.prefs.getBoolPref(
|
||||
"privacy.trackingprotection.emailtracking.enabled",
|
||||
false
|
||||
) ||
|
||||
Services.prefs.getBoolPref(
|
||||
"privacy.trackingprotection.emailtracking.pbmode.enabled",
|
||||
false
|
||||
)
|
||||
return Services.prefs.getBoolPref(
|
||||
"privacy.trackingprotection.emailtracking.enabled",
|
||||
false
|
||||
);
|
||||
},
|
||||
update() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче