The tests for installing and uninstalling an add-on use a webextension,
and if we uninstall the add-on before it finishes starting up, the
async startup process throws an error.
* initial version of an install and uninstall hook
* Generate file:// URI for test XPI in test instead of handling chrome://.
* dropped leftover debug message in test case
* Inlined some functions as per code review and added more assertions into the testcase to verify that the addon was properly installed by checking the value of the addonId
* Cleanup brackets
* Replaced named function with an immediately invoked function to create the closure around the Promise that wraps AddonManager.getAddonByID
* signed the normandy.xpi file
* * reworked the installAddon api to use async functions as per code review
* Reordered the listener and install() invocation to avoid possible race
* double check the addonID after installation
* added a timeout to let the XPI installation complete properly.
* Added a testcase and missing capture of the onDownloadFailed event when installing an addon
added testcase to uninstall invalid addon id
* wrapped functions with sandboxmanager.wrapAsync
dropped "return null"
* Add missing return and refactor tests.
* cleaned up as per review by @gijsk
* Bug 1370652 - Handle more rejections in code exercised by browser-chrome tests.
These fixes are in preparation of making browser-chrome tests fail when there are unhandled Promise rejections.
This is a backport from mozilla-central changeset 985626bc4d9c.
* Bug 1369855 - Update sinon.js to version 2.3.2.
Fixes#809.
* Fix lint issues
* Fix bug 1368977: Remove es2015 and stage-0 preset from Babel.
The minimum Firefox version that we target for both the system add-on
and the website is Firefox 52, which includes support for most es2015
features, including native async/await syntax. This means we can safely
switch to using those features without transpiling them via Babel.
This removes both the es2015 and stage-0 presets from Babel, and
includes a few individual plugins that we still need support for.
This also adds a new Webpack plugin to enable it to parse async/await
syntax while resolving modules.
UglifyJS can't parse async/await syntax, even on the harmony branch, so
this switches to using Babili for minification. We use the webpack
plugin instead of including it in the Babel config so that code inside
node_modules, which is ignored by babel-loader, also gets minified.
* Switch to app user in linting Dockerfile before running npm install.
This is a workaround for a permissions-related npm crash within Docker
on CircleCI. See also:
- https://github.com/npm/npm/issues/16892
- https://github.com/npm/npm/issues/16766
- Similar yarn issue with the workaround:
https://github.com/yarnpkg/yarn/issues/918
typeof null === 'object', which means the check to see if a value is
an object will pass for null attributes. However, calling .map on the
value afterwards will throw if it is null. Instead, this fix uses the
isObject helper from underscore.
The setting controls whether the rule that an approver on an approval
request must not be the same user who created it is enforced or not.
Disabling this setting makes local development (as well as QA in
testing environments) more convenient.