The purpose of this extension is to visually highlight the share button in the browser toolbar when text from the URL bar is copied, and to serve as a template for new Shield studies.
The share button study is a bootstrapped extension. See Bootstrapped extensions for more information.
As a starting point, you may want to read through extension/bootstrap.js
.
- yarn
- Firefox version 55-56
The first step is to install dependencies with yarn by running yarn install
. Yarn is used to ensure that all dependencies and their sub-dependencies are using the correct versions. If you do not use yarn, you may run into issues.
Once you have installed the dependencies, there are two main ways to add the extension to Firefox: manually or using the manual testing script.
- Go to
about:debugging
. - Click "Load Temporary Add-on".
- Select any file in the
/extension
folder.
The manual testing script (npm run man
) uses the environment variable FIREFOX_BINARY
to determine which version of Firefox to use. For example, a macOS user might run:
export FIREFOX_BINARY='/Applications/Firefox Beta.app/Contents/MacOS/firefox' && npm run man
Once again, you must set the FIREFOX_BINARY
variable to be the path of the Firefox binary you wish to use.
The functional test suite is run using npm run test
.
The test harness, which can be run using node test/test_harness.js
, runs the test suite multiple times and records the outcome to determine which tests are inconsistent. This is useful for improving consistency of Selenium tests, which often have timing issues.
Dockerfile
: the Dockerfile used on CircleCI. Also available on Docker Hub.docker_setup.sh
: Setup script for the Docker image to install dependencies etc. This is not used by CircleCI, which instead uses the CircleCI configuration files to install dependencies.