Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Support chromium-based browsers as web-ext run targets #1392

Merged
merged 11 commits into from
Aug 27, 2019

Conversation

rpl
Copy link
Member

@rpl rpl commented Nov 3, 2018

This PR introduces a new 'chromium' target and a new --chromium-binary cli option
(which covers #809 and part of #1130).

Internally it uses the chrome-launcher npm package to manage the chromium instance and so by default it tries to discover and launch the Chrome or Chromium version installed in the system.

Nevertheless other Chromium-based browsers that support extensions (like Opera and Vivaldi) can be launched using this target (with the addition of the --chromium-binary option):

Quick demo of the web-ext run used to run an extension on Chrome, Opera and Vivaldi

TODO:

  • add tests for the chromium extension-runner module

@rpl rpl force-pushed the feat/chrome-extension-runner branch from 20d7194 to 12f0998 Compare November 3, 2018 18:37
@coveralls
Copy link

coveralls commented Nov 3, 2018

Coverage Status

Coverage remained the same at 100.0% when pulling 6ac949e on rpl:feat/chrome-extension-runner into 21aa78b on mozilla:master.

@rpl rpl force-pushed the feat/chrome-extension-runner branch from 12f0998 to ff49ae4 Compare November 3, 2018 18:53
Rob--W
Rob--W previously requested changes Nov 7, 2018
src/extension-runners/chromium.js Outdated Show resolved Hide resolved
src/extension-runners/chromium.js Outdated Show resolved Hide resolved
src/extension-runners/base.js Outdated Show resolved Hide resolved
src/extension-runners/chromium.js Outdated Show resolved Hide resolved
src/extension-runners/chromium.js Outdated Show resolved Hide resolved
src/extension-runners/chromium.js Outdated Show resolved Hide resolved
src/program.js Outdated Show resolved Hide resolved
src/extension-runners/chromium.js Show resolved Hide resolved
src/extension-runners/chromium.js Outdated Show resolved Hide resolved
src/extension-runners/chromium.js Outdated Show resolved Hide resolved
@rpl rpl force-pushed the feat/chrome-extension-runner branch from ff49ae4 to cfd3c56 Compare June 30, 2019 17:15
@rpl rpl requested a review from Rob--W June 30, 2019 17:18
@rpl rpl force-pushed the feat/chrome-extension-runner branch from fb74caf to 437fe65 Compare July 1, 2019 11:15
@rpl rpl force-pushed the feat/chrome-extension-runner branch from 437fe65 to 7d8a147 Compare August 2, 2019 16:03
@rpl rpl dismissed Rob--W’s stale review August 2, 2019 17:17

patch rebased as agreed, clearing the existing pending review requests

@rpl
Copy link
Member Author

rpl commented Aug 2, 2019

@Rob--W as we agreed I've rebased and adapted this patch on top of the changes introduced in #1645 (and also looked into making the change to the package-lock.json file small and limited to just the new dependencies).

package.json Outdated Show resolved Hide resolved
src/extension-runners/chromium.js Show resolved Hide resolved
tests/functional/test.cli.run.js Show resolved Hide resolved
src/extension-runners/chromium.js Outdated Show resolved Hide resolved
src/extension-runners/chromium.js Show resolved Hide resolved
src/extension-runners/chromium.js Outdated Show resolved Hide resolved
src/extension-runners/chromium.js Outdated Show resolved Hide resolved
Copy link
Member

@Rob--W Rob--W left a comment

Choose a reason for hiding this comment

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

Looks mostly good; just a few minor comments.

@rpl
Copy link
Member Author

rpl commented Aug 26, 2019

I'm going to rebase this PR on top of #1685 (because the CI job will fail for the eslint-utils security vulnerability detected in the npm audit step).

@rpl rpl force-pushed the feat/chrome-extension-runner branch from 837195f to d6168a6 Compare August 26, 2019 16:59
tests/unit/test-extension-runners/test.chromium.js Outdated Show resolved Hide resolved
src/extension-runners/chromium.js Outdated Show resolved Hide resolved
@rpl rpl merged commit 961da0c into mozilla:master Aug 27, 2019
rbrishabh added a commit to rbrishabh/web-ext that referenced this pull request Sep 3, 2019
Created helper fn and fixed flow

small fix

small fix

Correcting flow

ES LINT

rewriting tests

updating test case

Squashing all commits

small fix

small fix

Correcting flow

ES LINT

rewriting tests

updating test case

requested changes

rebasing

changed fake-firefox-binary

changed fake-firefox-binary

chore(deps): update dependency babel-plugin-istanbul to v5.2.0 (mozilla#1667)

chore(deps): update dependency eslint-plugin-flowtype to v3.12.2 (mozilla#1668)

chore(deps): update dependency conventional-changelog-cli to v2.0.23 (mozilla#1670)

chore(deps): update dependency webpack to v4.39.0 (mozilla#1651)

fix(deps): update dependency source-map-support to v0.5.13 (mozilla#1671)

chore(deps): update dependency webpack to v4.39.1 (mozilla#1672)

chore(deps): update dependency eslint-plugin-flowtype to v3.13.0 (mozilla#1673)

chore(deps): update dependency coveralls to v3.0.6 (mozilla#1677)

chore(deps): update dependency sinon to v7.4.1 (mozilla#1676)

chore(deps): update dependency eslint-plugin-flowtype to v4 (mozilla#1678)

chore: Update eslint to v6.2.2 and babel-eslint to v.1.0.3 (mozilla#1685)

- eslint 6.2.2 fix a CI failure due to vulnerable eslint-utils dependency
- babel-eslint 1.0.3 fix issues with no-unused vars false positive
  (See eslint/eslint#12117 and
  babel/babel-eslint#791)

feat: Support chromium-based browsers as web-ext run targets (mozilla#1392)
rbrishabh added a commit to rbrishabh/web-ext that referenced this pull request Sep 3, 2019
…556fffa13cc56

parent 5622838
author Rishabh Budhiraja <rishabh.budhiraja@gmail.com> 1564321912 +0530
committer Rishabh Budhiraja <rishabh.budhiraja@gmail.com> 1567513919 +0530

# This is a combination of 3 commits.tree 6d3c63a3b96959cabfa8294f37e556fffa13cc56
parent 5622838
author Rishabh Budhiraja <rishabh.budhiraja@gmail.com> 1564321912 +0530
committer Rishabh Budhiraja <rishabh.budhiraja@gmail.com> 1567513781 +0530

# This is a combination of 2 commits.
# This is the 1st commit message:

Fixes method for finding default port

Created helper fn and fixed flow

small fix

small fix

Correcting flow

ES LINT

rewriting tests

updating test case

Squashing all commits

small fix

small fix

Correcting flow

ES LINT

rewriting tests

updating test case

requested changes

rebasing

changed fake-firefox-binary

changed fake-firefox-binary

chore(deps): update dependency babel-plugin-istanbul to v5.2.0 (mozilla#1667)

chore(deps): update dependency eslint-plugin-flowtype to v3.12.2 (mozilla#1668)

chore(deps): update dependency conventional-changelog-cli to v2.0.23 (mozilla#1670)

chore(deps): update dependency webpack to v4.39.0 (mozilla#1651)

fix(deps): update dependency source-map-support to v0.5.13 (mozilla#1671)

chore(deps): update dependency webpack to v4.39.1 (mozilla#1672)

chore(deps): update dependency eslint-plugin-flowtype to v3.13.0 (mozilla#1673)

chore(deps): update dependency coveralls to v3.0.6 (mozilla#1677)

chore(deps): update dependency sinon to v7.4.1 (mozilla#1676)

chore(deps): update dependency eslint-plugin-flowtype to v4 (mozilla#1678)

chore: Update eslint to v6.2.2 and babel-eslint to v.1.0.3 (mozilla#1685)

- eslint 6.2.2 fix a CI failure due to vulnerable eslint-utils dependency
- babel-eslint 1.0.3 fix issues with no-unused vars false positive
  (See eslint/eslint#12117 and
  babel/babel-eslint#791)

feat: Support chromium-based browsers as web-ext run targets (mozilla#1392)

# This is the commit message mozilla#2:

chore(deps): update dependency babel-plugin-istanbul to v5.2.0 (mozilla#1667)


# This is the commit message mozilla#3:

chore(deps): update dependency conventional-changelog-cli to v2.0.23 (mozilla#1670)


# This is the commit message mozilla#5:

fix(deps): update dependency source-map-support to v0.5.13 (mozilla#1671)
rbrishabh added a commit to rbrishabh/web-ext that referenced this pull request Sep 3, 2019
parent 5622838
author Rishabh Budhiraja <rishabh.budhiraja@gmail.com> 1564321912 +0530
committer Rishabh Budhiraja <rishabh.budhiraja@gmail.com> 1567514055 +0530

# This is a combination of 5 commits.tree 6d3c63a3b96959cabfa8294f37e556fffa13cc56
parent 5622838
author Rishabh Budhiraja <rishabh.budhiraja@gmail.com> 1564321912 +0530
committer Rishabh Budhiraja <rishabh.budhiraja@gmail.com> 1567513919 +0530

# This is a combination of 3 commits.tree 6d3c63a3b96959cabfa8294f37e556fffa13cc56
parent 5622838
author Rishabh Budhiraja <rishabh.budhiraja@gmail.com> 1564321912 +0530
committer Rishabh Budhiraja <rishabh.budhiraja@gmail.com> 1567513781 +0530

# This is a combination of 2 commits.
# This is the 1st commit message:

Fixes method for finding default port

Created helper fn and fixed flow

small fix

small fix

Correcting flow

ES LINT

rewriting tests

updating test case

Squashing all commits

small fix

small fix

Correcting flow

ES LINT

rewriting tests

updating test case

requested changes

rebasing

changed fake-firefox-binary

changed fake-firefox-binary

chore(deps): update dependency babel-plugin-istanbul to v5.2.0 (mozilla#1667)

chore(deps): update dependency eslint-plugin-flowtype to v3.12.2 (mozilla#1668)

chore(deps): update dependency conventional-changelog-cli to v2.0.23 (mozilla#1670)

chore(deps): update dependency webpack to v4.39.0 (mozilla#1651)

fix(deps): update dependency source-map-support to v0.5.13 (mozilla#1671)

chore(deps): update dependency webpack to v4.39.1 (mozilla#1672)

chore(deps): update dependency eslint-plugin-flowtype to v3.13.0 (mozilla#1673)

chore(deps): update dependency coveralls to v3.0.6 (mozilla#1677)

chore(deps): update dependency sinon to v7.4.1 (mozilla#1676)

chore(deps): update dependency eslint-plugin-flowtype to v4 (mozilla#1678)

chore: Update eslint to v6.2.2 and babel-eslint to v.1.0.3 (mozilla#1685)

- eslint 6.2.2 fix a CI failure due to vulnerable eslint-utils dependency
- babel-eslint 1.0.3 fix issues with no-unused vars false positive
  (See eslint/eslint#12117 and
  babel/babel-eslint#791)

feat: Support chromium-based browsers as web-ext run targets (mozilla#1392)

# This is the commit message mozilla#2:

chore(deps): update dependency babel-plugin-istanbul to v5.2.0 (mozilla#1667)


# This is the commit message mozilla#3:

chore(deps): update dependency conventional-changelog-cli to v2.0.23 (mozilla#1670)


# This is the commit message mozilla#5:

fix(deps): update dependency source-map-support to v0.5.13 (mozilla#1671)


# This is the commit message mozilla#7:

chore(deps): update dependency eslint-plugin-flowtype to v3.13.0 (mozilla#1673)


# This is the commit message mozilla#9:

chore(deps): update dependency coveralls to v3.0.6 (mozilla#1677)


# This is the commit message mozilla#10:

chore(deps): update dependency sinon to v7.4.1 (mozilla#1676)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants