Skip to content
This repository has been archived by the owner on Oct 14, 2020. It is now read-only.

[develop] Start of version 5 - WebExtension Experiments #120

Merged
merged 50 commits into from
Apr 3, 2018

Conversation

motin
Copy link
Contributor

@motin motin commented Mar 23, 2018

Work in progress for the necessary changes to leave legacy extensions behind and ship study add-ons using bundled WebExtension experiments.

Used by the new WebExtension Experiments-based template / example study in https://github.com/mozilla/shield-studies-addon-template.

Includes the following PRs in the following order:

Thus, reviewing this PR will be less noisy after having accepted the above PRs against the develop branch.

Copy link
Contributor

@gregglind gregglind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine to me as a base.

motin added 25 commits April 3, 2018 07:47
…m + readme updated to reflect this + files moved to their proper location
…ck require instead of ChromeUtils.import(context.extension.getURL(...))
motin added 5 commits April 3, 2018 11:18
…+ restored some initial tests:

    ✓ should be able to access window.browser from the extension page for tests (1450ms)
    ✓ should be able to access study WebExtensions API from the extension page for tests (67ms)
    ✓ should return the correct variation based on specific weightedVariations (165ms)
@@ -54,9 +54,11 @@ async function initiateStudy() {
studySetup.expired = await Study.hasExpired();
// Ensure we have configured study and are supposed to run our feature
await browser.study.configure(studySetup);
// Get study variation
// Run the startup study checks
await browser.study.startup();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what effects / side effects does this have?

@@ -5,14 +5,18 @@ set -o errexit

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

soon, let's make this into a node script.

@gregglind
Copy link
Contributor

@motin please hold off on more commits on this branch until we can actually read this and land it.

@gregglind gregglind merged commit aa1f884 into mozilla:develop Apr 3, 2018
@gregglind gregglind mentioned this pull request Apr 4, 2018
biancadanforth added a commit to biancadanforth/shield-study-webextension-experiment-template that referenced this pull request Apr 5, 2018
Based on prior work in the Shield Studies Addon Template repo (mozilla/shield-studies-addon-template#55) and Shield Studies Addon Utils repo (mozilla/shield-studies-addon-utils#120).

This was just a proof-of-concept for me to understand the basics of creating experimental APIs for use in WebExtension Experiments (WEEs).

This WEE simply sets the "browser.privatebrowsing.autostart" boolean preference to "true" via an experimental "prefchange" WebExtension API.
@motin motin deleted the v5-init branch April 5, 2018 15:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants