add third branch that blocks all third party cookies
This commit is contained in:
Родитель
2f84c91b3c
Коммит
dc73d1be1b
11
README.md
11
README.md
|
@ -96,7 +96,16 @@ In a Cookies Blocked [variation](#variations):
|
|||
* The "Content Blocking" panel should show "Trackers: Blocked",
|
||||
"Slow-loading Trackers: Add blocking...", and "Disable Blocking for This
|
||||
Site"
|
||||
|
||||
|
||||
### All Third Party Cookies Blocked
|
||||
|
||||
```shell
|
||||
npm start -- -f Nightly --pref=extensions.cookie-restrictions_shield_mozilla_org.test.variationName=AllThirdPartyCookiesBlocked
|
||||
```
|
||||
|
||||
In a AllThirdPartyCookiesBlocked [variation](#variations):
|
||||
|
||||
* Behaviour should be the same as CookiesBlocked, but with stricter cookie blocking.
|
||||
|
||||
### Testing Guide
|
||||
|
||||
|
|
|
@ -50,6 +50,7 @@ There are a 2 variations to study features and heuristics:
|
|||
|
||||
* `Control`
|
||||
* `CookiesBlocked`
|
||||
* `AllThirdPartyCookiesBlocked`
|
||||
|
||||
You can run a specific variation like so:
|
||||
|
||||
|
@ -85,10 +86,10 @@ In a Control [variation](#variations):
|
|||
npm start -- -f Nightly --pref=extensions.cookie-restrictions_shield_mozilla_org.test.variationName=Control
|
||||
```
|
||||
|
||||
### Tracking Protection
|
||||
### Cookies Blocked
|
||||
|
||||
```shell
|
||||
npm start -- -f Nightly --pref=extensions.cookie-restrictions_shield_mozilla_org.test.variationName=
|
||||
npm start -- -f Nightly --pref=extensions.cookie-restrictions_shield_mozilla_org.test.variationName=CookiesBlocked
|
||||
```
|
||||
|
||||
In a CookiesBlocked [variation](#variations):
|
||||
|
@ -99,6 +100,16 @@ npm start -- -f Nightly --pref=extensions.cookie-restrictions_shield_mozilla_org
|
|||
"Slow-loading Trackers: Add blocking...", and "Disable Blocking for This
|
||||
Site"
|
||||
|
||||
### All Third Party Cookies Blocked
|
||||
|
||||
```shell
|
||||
npm start -- -f Nightly --pref=extensions.cookie-restrictions_shield_mozilla_org.test.variationName=AllThirdPartyCookiesBlocked
|
||||
```
|
||||
|
||||
In a AllThirdPartyCookiesBlocked [variation](#variations):
|
||||
|
||||
* Behaviour should be the same as CookiesBlocked, but with stricter cookie blocking.
|
||||
|
||||
### Testing Guide
|
||||
|
||||
In combination with the above instructions, add the pref `shieldStudy.logLevel=all` to the command to see extra logging. The logging will show the contents of the Telemetry ping, and the variation.
|
||||
|
|
|
@ -35,4 +35,31 @@ window.VARIATIONS = {
|
|||
"urlclassifier.trackingAnnotationWhitelistTable": "test-trackwhite-simple,mozstd-trackwhite-digest256",
|
||||
},
|
||||
},
|
||||
|
||||
"AllThirdPartyCookiesBlocked": {
|
||||
weight: 1,
|
||||
prefs: {
|
||||
"network.cookie.cookieBehavior": 1,
|
||||
|
||||
// Fastblock and Tracking Protection UI should be disabled.
|
||||
"browser.contentblocking.trackingprotection.ui.enabled": false,
|
||||
"browser.fastblock.enabled": false,
|
||||
"browser.contentblocking.fastblock.ui.enabled": false,
|
||||
"browser.contentblocking.fastblock.control-center.ui.enabled": false,
|
||||
"browser.contentblocking.trackingprotection.control-center.ui.enabled": false,
|
||||
|
||||
// Make sure we're not affected by the Symantec distrust.
|
||||
"security.pki.distrust_ca_policy": 1,
|
||||
|
||||
"browser.contentblocking.enabled": true,
|
||||
"browser.contentblocking.ui.enabled": true,
|
||||
"browser.contentblocking.rejecttrackers.ui.recommended": true,
|
||||
"browser.contentblocking.rejecttrackers.control-center.ui.enabled": true,
|
||||
"browser.contentblocking.cookies-site-data.ui.reject-trackers.recommended": true,
|
||||
"browser.contentblocking.cookies-site-data.ui.reject-trackers.enabled": true,
|
||||
"browser.contentblocking.reportBreakage.enabled": true,
|
||||
"urlclassifier.trackingAnnotationTable": "test-track-simple,base-track-digest256",
|
||||
"urlclassifier.trackingAnnotationWhitelistTable": "test-trackwhite-simple,mozstd-trackwhite-digest256",
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -84,11 +84,60 @@ describe("setup and teardown", function() {
|
|||
|
||||
it("has the correct prefs after install", async () => {
|
||||
await checkPrefs(driver, {
|
||||
"security.pki.distrust_ca_policy": 1,
|
||||
"browser.contentblocking.trackingprotection.ui.enabled": false,
|
||||
"browser.contentblocking.fastblock.ui.enabled": false,
|
||||
"browser.fastblock.enabled": false,
|
||||
"network.cookie.cookieBehavior": 4,
|
||||
"browser.contentblocking.trackingprotection.ui.enabled": false,
|
||||
"browser.fastblock.enabled": false,
|
||||
"browser.contentblocking.fastblock.ui.enabled": false,
|
||||
"browser.contentblocking.fastblock.control-center.ui.enabled": false,
|
||||
"browser.contentblocking.trackingprotection.control-center.ui.enabled": false,
|
||||
"security.pki.distrust_ca_policy": 1,
|
||||
"browser.contentblocking.enabled": true,
|
||||
"browser.contentblocking.ui.enabled": true,
|
||||
"browser.contentblocking.rejecttrackers.ui.recommended": true,
|
||||
"browser.contentblocking.rejecttrackers.control-center.ui.enabled": true,
|
||||
"browser.contentblocking.cookies-site-data.ui.reject-trackers.recommended": true,
|
||||
"browser.contentblocking.cookies-site-data.ui.reject-trackers.enabled": true,
|
||||
"browser.contentblocking.reportBreakage.enabled": true,
|
||||
"urlclassifier.trackingAnnotationTable": "test-track-simple,base-track-digest256",
|
||||
"urlclassifier.trackingAnnotationWhitelistTable": "test-trackwhite-simple,mozstd-trackwhite-digest256",
|
||||
});
|
||||
});
|
||||
|
||||
it("has the correct prefs after uninstall", async () => {
|
||||
await utils.setupWebdriver.uninstallAddon(driver, addonId);
|
||||
await checkPrefs(driver, {});
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
await utils.clearPreference(driver, "extensions.cookie-restrictions_shield_mozilla_org.test.variationName");
|
||||
});
|
||||
});
|
||||
|
||||
describe("sets the correct prefs for variation AllThirdPartyCookiesBlocked", () => {
|
||||
before(async () => {
|
||||
await utils.setPreference(driver, "extensions.cookie-restrictions_shield_mozilla_org.test.variationName", "AllThirdPartyCookiesBlocked");
|
||||
addonId = await utils.setupWebdriver.installAddon(driver);
|
||||
await driver.sleep(SETUP_DELAY);
|
||||
});
|
||||
|
||||
it("has the correct prefs after install", async () => {
|
||||
await checkPrefs(driver, {
|
||||
"network.cookie.cookieBehavior": 1,
|
||||
"browser.contentblocking.trackingprotection.ui.enabled": false,
|
||||
"browser.fastblock.enabled": false,
|
||||
"browser.contentblocking.fastblock.ui.enabled": false,
|
||||
"browser.contentblocking.fastblock.control-center.ui.enabled": false,
|
||||
"browser.contentblocking.trackingprotection.control-center.ui.enabled": false,
|
||||
"security.pki.distrust_ca_policy": 1,
|
||||
"browser.contentblocking.enabled": true,
|
||||
"browser.contentblocking.ui.enabled": true,
|
||||
"browser.contentblocking.rejecttrackers.ui.recommended": true,
|
||||
"browser.contentblocking.rejecttrackers.control-center.ui.enabled": true,
|
||||
"browser.contentblocking.cookies-site-data.ui.reject-trackers.recommended": true,
|
||||
"browser.contentblocking.cookies-site-data.ui.reject-trackers.enabled": true,
|
||||
"browser.contentblocking.reportBreakage.enabled": true,
|
||||
"urlclassifier.trackingAnnotationTable": "test-track-simple,base-track-digest256",
|
||||
"urlclassifier.trackingAnnotationWhitelistTable": "test-trackwhite-simple,mozstd-trackwhite-digest256",
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче