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
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
3909b4e
Fix the division between dependencies and devDependencies in package.…
motin Mar 9, 2018
ea27ed2
Removed path as dependency (since it is a core package, we should not…
motin Mar 10, 2018
c7777fe
Updated package-lock.json
motin Apr 3, 2018
3e1f545
Npm run format (prettier + eslint --fix + fixpack)
motin Mar 10, 2018
af564c7
Results of npm run format
motin Mar 10, 2018
08ce53e
Version bump to 5.0.0-alpha1
motin Mar 23, 2018
10b430f
Imported js that should be part of study utils rather than the templa…
motin Mar 23, 2018
f882fe9
Using the same eslint configuration as the template (from https://git…
motin Mar 24, 2018
f718c53
Npm run format + linting
motin Mar 24, 2018
efae1b0
Moved make_xpi script to test-addon folder (since it it only used to …
motin Mar 24, 2018
7c0a77c
Inactivated functional tests for now (will be restored after refactor…
motin Mar 24, 2018
0a473ee
Not: Using add-on in package description
motin Mar 24, 2018
1ac3e3f
Cleaned up npm run build / lint commands
motin Mar 24, 2018
f33f312
Build produces a web extensions api js file instead of ShieldUtils.js…
motin Mar 24, 2018
efdbf5c
Package.json nits
motin Mar 24, 2018
d72e3ce
Smaller test clean-up
motin Mar 24, 2018
96188af
Legacy test add-on removed, webextension-based test add-on inserted
motin Mar 24, 2018
6ca70e2
Importing study utils and study utils bootstrap jsm modules via webpa…
motin Mar 24, 2018
7e3ebab
Minor clean-up in src/index.js
motin Mar 24, 2018
c7c1faa
Smaller clean-up in background.js
motin Mar 26, 2018
879dbd0
Renamed config to studyConfig
motin Mar 26, 2018
2e2fc1f
Moved study config from privileged scope to web extension background …
motin Mar 26, 2018
087bf7c
Formatting
motin Mar 26, 2018
aa3b891
Renamed study util js files to match variable names
motin Mar 26, 2018
f4e6c85
Bundle command to reflect that it is no longer necessary to bundle an…
motin Mar 26, 2018
c67c13a
Moved schema-related files to own folder
motin Mar 26, 2018
05b0506
Synchronized names for studySetup variables (was called studySteup, c…
motin Mar 26, 2018
10dea47
Moved web extension api related parts to a separate folder
motin Mar 26, 2018
d9b5ae4
Moved out jsonschema + sampling to separate files. Changed exposed "s…
motin Mar 26, 2018
533291f
Made room for more web extension apis
motin Mar 26, 2018
243b440
Added the prefs api from https://github.com/gregglind/shield-study-we…
motin Mar 26, 2018
228266b
Restored build + moved webpack to where it is used + made a bash scri…
motin Mar 26, 2018
c6c8f75
Formatting
motin Mar 26, 2018
317657b
Added the test utils from the template repo
motin Mar 27, 2018
6758125
Added test for: should be able to access shieldUtils WebExtensions AP…
motin Mar 27, 2018
4f79eda
Test add-on ignores APIs that are bundled from shield-studies-addon-u…
motin Mar 27, 2018
7d04c3c
Formatting
motin Mar 27, 2018
98182dc
Synced example study test utils and test-addon test utils + split tes…
motin Mar 28, 2018
ff31a48
Formatting + a minor grammar nit
motin Mar 29, 2018
4c6242c
Cleaned up background script, clarified extension page and let execut…
motin Mar 29, 2018
7da6b5e
Moved test-addon into example folder and shield-study-helper-addon in…
motin Mar 29, 2018
4b23202
Updated the readme to reflect version 5
motin Mar 29, 2018
6adda92
Corrected npm install command in readme (should be installed as runti…
motin Mar 29, 2018
cb990d2
Changed webextension api namespace from shieldUtils to study
motin Apr 2, 2018
4e01d6e
Smaller improvements
motin Apr 2, 2018
6c69c09
Updated package-lock.json
motin Apr 3, 2018
ffd015a
Restored npm run test after test add-on path change
motin Apr 3, 2018
fd82f92
Smaller method and variable refactoring
motin Apr 3, 2018
41f0679
Added browser.study.deterministicVariation and browser.study.startup …
motin Apr 3, 2018
beda8c2
Removed webExtensionMsg schema since no longer relevant
motin Apr 3, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions examples/test-addon/bin/bundle-shield-studies-addon-utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.

# always run from the repository root directory
script_path=`dirname $0`
cd "$script_path/../../"
cd "$script_path/../../../"

# paths
WEBEXTAPIS_PATH="webExtensionApis"
ADDON_SRC_PATH="examples/test-addon/src"

# bundle the study web extension experiment
mkdir -p test-addon/src/privileged/study
cp webExtensionApis/study/api.js test-addon/src/privileged/study/api.js
cp webExtensionApis/study/schema.json test-addon/src/privileged/study/schema.json
mkdir -p $ADDON_SRC_PATH/privileged/study
cp $WEBEXTAPIS_PATH/study/api.js $ADDON_SRC_PATH/privileged/study/api.js
cp $WEBEXTAPIS_PATH/study/schema.json $ADDON_SRC_PATH/privileged/study/schema.json

# bundle the prefs web extension experiment
mkdir -p test-addon/src/privileged/prefs
cp webExtensionApis/prefs/api.js test-addon/src/privileged/prefs/api.js
cp webExtensionApis/prefs/schema.json test-addon/src/privileged/prefs/schema.json
mkdir -p $ADDON_SRC_PATH/privileged/prefs
cp $WEBEXTAPIS_PATH/prefs/api.js $ADDON_SRC_PATH/privileged/prefs/api.js
cp $WEBEXTAPIS_PATH/prefs/schema.json $ADDON_SRC_PATH/privileged/prefs/schema.json
10 changes: 5 additions & 5 deletions examples/test-addon/test/functional/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ const FIREFOX_PREFERENCES = {
};

// Re-usable test methods from shield-studies-addon-utils
const { executeJs } = require("../../../testUtils/executeJs");
const { nav } = require("../../../testUtils/nav");
const { pings } = require("../../../testUtils/pings");
const { setup } = require("../../../testUtils/setup");
const { ui } = require("../../../testUtils/ui");
const { executeJs } = require("../../../../testUtils/executeJs");
const { nav } = require("../../../../testUtils/nav");
const { pings } = require("../../../../testUtils/pings");
const { setup } = require("../../../../testUtils/setup");
const { ui } = require("../../../../testUtils/ui");

// What we expose to our add-on-specific tests
module.exports = {
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@
"prepack": "fixpack && npm run build",
"pretest": "npm run build && npm run test-addon:bundle-utils && npm run test-addon:build",
"pretest-addon:run": "npm run pretest",
"test": "FIREFOX_BINARY=${FIREFOX_BINARY:-firefox} ADDON_ZIP=test-addon/dist/shield_utils_test_add-on-1.0.0.zip mocha test-addon/test/functional/ --bail",
"test-addon:build": "cd test-addon && web-ext build",
"test-addon:bundle-utils": "test-addon/bin/bundle-shield-studies-addon-utils.sh",
"test-addon:run": "cd test-addon && web-ext run --no-reload"
"test": "FIREFOX_BINARY=${FIREFOX_BINARY:-firefox} ADDON_ZIP=examples/test-addon/dist/shield_utils_test_add-on-1.0.0.zip mocha examples/test-addon/test/functional/ --bail",
"test-addon:build": "cd examples/test-addon && web-ext build",
"test-addon:bundle-utils": "examples/test-addon/bin/bundle-shield-studies-addon-utils.sh",
"test-addon:run": "cd examples/test-addon && web-ext run --no-reload"
}
}