Перейти к файлу
Johann Hofmann b051960265
Merge pull request #96 from Mozilla-GitHub-Standards/master
Add Mozilla Code of Conduct
2019-04-01 12:26:59 +02:00
.circleci Not running CI tests on branded releases 2018-07-05 11:46:30 +02:00
dist Using dist/ as build output directory 2018-04-25 09:36:30 -05:00
docs add third branch that blocks all third party cookies 2018-09-12 10:26:58 -04:00
src increment to version 1.0.5 2018-09-14 12:48:19 -04:00
test fix tests for doorhanger 2018-09-14 12:11:07 -04:00
.babelrc Code coverage for unit tests 2018-06-09 00:34:07 -07:00
.eslintignore Updated eslintignore to not lint get-firefox artifacts 2018-06-19 09:46:06 +03:00
.eslintrc.js Update dependencies 2018-09-06 09:31:30 -07:00
.gitignore Restored ci tests 2018-06-19 10:39:55 +03:00
CODE_OF_CONDUCT.md Add Mozilla Code of Conduct file 2019-03-30 00:01:14 -07:00
LICENSE Added default license file to template 2018-03-09 23:23:16 +02:00
README.md add third branch that blocks all third party cookies 2018-09-12 10:26:58 -04:00
data-review.txt how we will analyze data 2018-09-06 13:27:48 -05:00
package-lock.json update npm packages 2018-11-27 09:55:43 -05:00
package.json update npm packages 2018-11-27 09:55:43 -05:00
web-ext-config.js Run in Nightly by default and update docs. 2018-08-30 10:50:19 +02:00

README.md

Cookie Restrictions Shield Study

This repository is a Shield Study based on the Shield Studies Add-on Template.

About This Add-on

By default, cookies and site data can be set by all websites. We would like to change this default to instead block cookies and site data when they are accessed or set by third parties that are identified as trackers by Disconnects Tracking Protection List.

Cookie Restrictions make it difficult for trackers to track users across different websites. A third party resource identified as a tracker on a first party page will not get to read any cookies or site data from their site stored in Firefox. They will not get to set any cookies or site data, and document.cookie will not return any data. If the third party is opened with a window.open in a new tab that the user interacts with, the third party will get exempted from the restriction on the previous tab. If the user opens Control Center and “Disables protection for this site”, the first party website will get whitelisted and all trackers within it will get full cookie and site data access when embedded by that whitelisted first party.

Development

You must run the study with Firefox Nightly

See Getting Started for instructions to install, run, lint, and build the add-on.

You should be able to npm start -- -f Nightly

Tests

We currently have functional tests, you can find them under test/functional/. Please test your new code and make sure to run the tests before committing.

To run the tests, use

npm run build
npm run test:func

Note that you have to re-run npm run build when making changes to study code because the tests use a bundled version of the add-on.

Running Variations

First, be sure you go through the Development steps and are able to npm start -- -f Nightly

To run a specific variation, you will pass the variation name to the start command with --pref.

Variations

There are a 2 variations to study features and heuristics:

  • Control
  • CookiesBlocked

You can run a specific variation like so:

npm start -- -f Nightly --pref=extensions.cookie-restrictions_shield_mozilla_org.test.variationName=CookiesBlocked

User Scenarios

In both variations:

  • Nothing different should happen in Private Browsing or Safe Mode operation.
  • Panel Behaviour:
    • If the user refreshes a page they have a chance of being shown a panel notification: "Did you reload this page to resolve loading issues?". This chance is 100% by the 6th refresh.
    • If the panel is ignored it will not show up again on the next refreshes. Once the user navigates, on the next refresh there is once again a chance the panel will show up. And the chance that it might show up on the same etld+1 is once again possible.
    • If "yes" or "no" is clicked on the panel, it will never show up again for that etld+1.
    • The panel should not dismiss until interacted with, or until the user navigates or refreshes the page
    • If "yes" is clicked we will add an exception for this page for content blocking
  • Telemetry Behaviour:
    • Telemetry will be sent upon page unload.

Control

In a Control variation:

  • There are no differences for Control branches from the behaviours described for all variations
npm start -- -f Nightly --pref=extensions.cookie-restrictions_shield_mozilla_org.
test.variationName=Control
npm start -- -f Nightly --pref=extensions.cookie-restrictions_shield_mozilla_org.
test.variationName=CookiesBlocked

In a Cookies Blocked variation:

  • The user should see the "How Tracking Protection works" onboarding experience when they first visit a site with trackers detected.
  • The "Content Blocking" panel should show "Trackers: Blocked", "Slow-loading Trackers: Add blocking...", and "Disable Blocking for This Site"

All Third Party Cookies Blocked

npm start -- -f Nightly --pref=extensions.cookie-restrictions_shield_mozilla_org.test.variationName=AllThirdPartyCookiesBlocked

In a AllThirdPartyCookiesBlocked variation:

  • 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.

npm start -- -f Nightly --pref=extensions.cookie-restrictions_shield_mozilla_org.test.variationName=CookiesBlocked --pref=shieldStudy.logLevel=all

After Study Survey

There is a breadcrumb pref at extensions.cookie-restrictions.wasEnabled a string containing the variation name is the value of the pref. Heartbeat will be used to target and survey users.