Commit Graph

115 Commits

Author SHA1 Message Date
Luca Greco 06ebcbd07f
fix(travis): Added xvfb service to travis config (#203) 2019-09-24 21:20:42 +02:00
ExE Boss 04a9e3a223 chore: Add `.editorconfig` (#188) 2019-09-08 15:38:25 +02:00
Shubham Chinda 3929b9f760 fix: Remove runtime.getBrowserInfo() (#200) 2019-08-01 19:01:38 +02:00
Federico Brigante 44a473db5d docs(README): Add suggested webpack usage (#194) 2019-08-01 18:53:23 +02:00
Luca Greco 6b8e7e18ed
chore(deps): Updated chromedriver to version 76.0.0 (#199) 2019-08-01 17:16:24 +02:00
Siddharth M 51998c1c64 chore: Fixed typos in README.md file (#197) 2019-08-01 13:30:57 +02:00
Rob Wu ad207a84b9
fix: Throw error when loaded in non-extension contexts (#190)
Fixes #186
2019-07-18 15:21:49 +02:00
Mozilla-GitHub-Standards 10bc37b342 chore: Add Mozilla Code of Conduct file
Fixes #181.

_(Message COC002)_
2019-04-16 11:39:12 +02:00
Rob Wu 6fb04ebc66 docs(README): Clarify why Chrome-only methods have no Promise (#183) 2019-04-09 18:27:08 +02:00
ExE Boss 3aad2418d8 test(devtools): Fix intermittent DevTools API test timeout (#177) 2019-03-20 12:27:09 +01:00
Luca Greco 949f08cc7d chore: bump version for release 0.4.0 2019-02-06 12:40:54 +01:00
Luca Greco 6f178c56da
fix: browser.devtools.inspectedWindow.eval promise should always resolve to an array (#175)
* fix: browser.devtools.inspectedWindow.eval promise should always resolve to an array
* test(integration): Add test for browser.devtools.inspectedWindow.eval API
2019-02-01 08:38:35 +01:00
Luca Greco e6601af79c
doc: Update MSEdge note in README.md (#176) 2019-01-31 16:58:43 +01:00
Luca Greco cdbb3115e8 chore: Small tweaks to the eslint config files (follow-up for #167) 2019-01-28 18:56:40 +01:00
ExE Boss 83ec9e70ad test(integration): Use node for running test scripts (#167)
* test(integration): Use node for running browser smoketests
* test(integration): Use node for running test scripts
2019-01-28 18:49:25 +01:00
serv-inc 34a6ab4559 docs(README): Add reminder to include browser-polyfill.js before other bg scripts (#160) 2018-11-08 15:09:14 +01:00
ExE Boss 7b46d25db2 refactor: Make the `wrapAPIs` function take the `chrome` object as a parameter (#139) 2018-08-27 15:50:40 +02:00
Luca Greco cf135db59e chore: bump version for release 0.3.1 2018-08-21 12:03:52 +02:00
Luca Greco ebd28186a1
fix: Prevent a webpage document element to be detected as the Extension API object (#153) 2018-08-15 22:33:37 +02:00
Mike Frysinger 450eee59a3 doc: fix broken link in README 2018-08-02 09:20:22 +02:00
ExE Boss 26683389ea
chore: Replace post-processed warning message with single-line string literal (#152) 2018-07-27 17:37:29 +02:00
Luca Greco 5e4796c116 chore: bump version for release 0.3.0 2018-07-19 16:48:08 +02:00
Luca Greco e17f1e1763 chore: Fixed npm badge in README.md 2018-07-19 16:43:57 +02:00
Luca Greco 440857e5f8
doc: Rewrite README.md and move build and contribution details into a separate doc file (#147) 2018-07-19 15:56:49 +02:00
Stuart Colville 890a99ae62 chore: Updated npm token in the travis config file (#149) 2018-07-16 13:59:40 +02:00
Rob Wu d77a418537 feat: Support promises in privacy namespace 2018-07-11 18:04:32 +02:00
PoziWorld ea82fbf556 chore: Fixed typos in inline comments (#144) 2018-07-07 17:44:19 +02:00
PoziWorld 33c2afb578 chore: Fixed typo in the README file (#143) 2018-07-07 17:43:17 +02:00
ExE Boss 4712d9274d chore: Fixed build and integration tests when installed using pnpm (#127) 2018-07-04 13:47:41 +02:00
Rob Wu d612352bba fix: resolve to undefined instead of an empty array 2018-07-04 13:17:09 +02:00
Simon Lydell 4e1e98add2 fix: sendMessage promise should resolve to undefined when no listeners reply 2018-07-04 13:06:42 +02:00
Rob Wu 7ff6e8a1dc chore: Stop swallowing errors in .sh tests
The Bash shell scripts ignored errors in all but the last line.
This commit adds `set -eo pipefail` to fix the issue:

`set -e` causes the script to exit as soon as any command exits with a
non-zero exit code. When pipes are used, this flag only applies to the
last command in a pipe. The `set -o pipefail` option ensures that the
script is also exited with a non-zero exit code when any command in the
pipe fails.
2018-06-20 15:29:03 +02:00
ExE Boss c0bf94f2eb chore: Fix the `\n` character preceding `echo` output in shell scripts (#136) 2018-06-20 00:33:12 +02:00
ExE Boss 80f4caf453 chore: Use `delete window.browser` in `setupTestDOMWindow` (#128)
This patch remove a workaround introduced in #2, because it has been fixed upstream and the workaround is not needed anymore (when using a nodejs version >= 8).
2018-06-19 23:36:50 +02:00
ExE Boss 3a6d76a88f chore: Cleaned up travis config (#129)
* Removed duplicate `sudo` entry in `.travis.yml`
* Rephrased log message while running cross-browsers integration tests.
2018-06-19 23:29:35 +02:00
Rob Wu 2537b23837 fix: add tabs.discard 2018-06-15 10:49:53 -07:00
Rob Wu 32863899bd style: alphabetically sort methods in tabs namespace 2018-06-15 10:49:53 -07:00
Rob Wu a3cb260c8e fix: Remove non-existing pageAction.getIcon
- Alphabetically sort keys
- Remove non-existing pageAction.getIcon
  (neither Firefox nor Chrome support this method).
2018-06-15 10:49:53 -07:00
Rob Wu e2754582c7 fix: Add missing management.setEnabled
setEnabled is partially implemented in Firefox:
- https://bugzil.la/1282982
- https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/API/management/setEnabled

The management API has many more methods in Chrome,
Firefox does not support them:
- createAppShortcut
- generateAppForLink
- getPermissionWarningsById
- getPermissionWarningsByManifest
- launchApp
- setLaunchType
- uninstall
2018-06-15 10:49:53 -07:00
Rob Wu 28377724ca style: alphabetically sort history keys 2018-06-15 10:49:53 -07:00
Rob Wu 597788817e fix: Fix downloads schemas
- Alphabetically sort keys
- Add `"fallbackToNoCallback": true` to `open` and `show`
  because these methods do currently not take any callbacks in Chrome:
  https://developer.chrome.com/extensions/downloads#method-open
  https://developer.chrome.com/extensions/downloads#method-show
- Chrome has a `downloads.acceptDanger` method, but Firefox does not,
  so this is not included in the schema.
2018-06-15 10:49:53 -07:00
Rob Wu fc25bd3e4c style: Alphabetically sort keys in contextMenus 2018-06-15 10:49:53 -07:00
Rob Wu 1981c59d94 fix: Add missing browserAction APIs (#99)
Note that the "openPopup" method is only available to the dev channel:
c2b078825a/chrome/common/extensions/api/_api_features.json (178)
https://crbug.com/436489
2018-06-15 10:49:53 -07:00
Rob Wu 5046a3f400 fix: Remove non-existing bookmarks.{export,import}
These APIs are not supported by Firefox:
https://searchfox.org/mozilla-central/rev/292d295d6b084b43b70de26a42e68513bb7b36a3/browser/components/extensions/schemas/bookmarks.json#436-465

In Chrome the APIs are not available either, except to some internal components:
b7963dca6a/chrome/common/extensions/api/_api_features.json (138)

Also moved "getTree" to ensure that the keys are alphabetically sorted.
2018-06-15 10:49:53 -07:00
Rob Wu 4a407da02c feat: Add topSites namespace to metadata
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/topSites#Browser_compatibility
2018-06-15 10:41:08 -07:00
Rob Wu 69e58761a5 feat: Add sessions namespace to metadata
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/sessions#Browser_compatibility

Only `sessions.getRecentlyClosed` and `sessions.restore` are currently
supported by Firefox.

`sessions.getDevices` is included anyway since this method may be added
to Firefox in the future: https://bugzil.la/1308059
2018-06-15 10:41:08 -07:00
Rob Wu f086bc15ac feat: Add permissions namespace to metadata
https://searchfox.org/mozilla-central/rev/292d295d6b084b43b70de26a42e68513bb7b36a3/toolkit/components/extensions/schemas/permissions.json
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/permissions#Browser_compatibility
2018-06-15 10:41:08 -07:00
Rob Wu 9225b2a91b feat: Add browsingData namespace to metadata
The auto-generated output from the metadata generator also includes the
following methods from Chrome. Firefox does not support them, so they
were not included in the metadata:

```
    "removeAppcache": {
      "minArgs": 1,
      "maxArgs": 1
    },
    "removeFileSystems": {
      "minArgs": 1,
      "maxArgs": 1
    },
    "removeIndexedDB": {
      "minArgs": 1,
      "maxArgs": 1
    },
    "removeWebSQL": {
      "minArgs": 1,
      "maxArgs": 1
    },
```

Also see:
https://searchfox.org/mozilla-central/rev/292d295d6b084b43b70de26a42e68513bb7b36a3/browser/components/extensions/schemas/browsing_data.json
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/browsingData#Browser_compatibility
2018-06-15 10:41:08 -07:00
Luca Greco 5d186bae84 test(browsers-smoketests): Run a set of smoke tests on both Chrome and Firefox
This commit introduces tape as the test framework used to define the tests in the
test extension contexts and send them to the nodejs script that orchestrate the
test run.

The nodejs script has also been migrated from mocha to tape, it uses the custom test
helpers provided to setup the test environment (e.g. create a temporary dir
for the test extension, copy the last polyfill build, bundle tape to be used
in the test extension, start the browser which run the test extension
and finally collect the results of the test extension) and then it merges all the
tap logs collected from every test extension into a single "per browser" test suite.

- updated travis nodejs environment to nodejs 8
- uses tape to collect test results from inside the test extension
- added test case to check polyfill 'existing browser API object' detection
- added test for expected rejection on tabs.sendMessage with an invalid tabId
- added test with multiple listeners which resolves to undefined and null
- optionally run chrome smoketests with --enable-features=NativeCrxBindings
2018-06-02 20:59:46 +02:00
Luca Greco 6c8268f6fb feat: Reject sendMessage returned promise when a onMessage listener returns a rejected promise. 2018-06-02 20:59:46 +02:00