web-ext
web-ext copied to clipboard
feat: Add `--chromium-pref` flag
Overview
This closes #2899.
Add a new parameter, --chromium-pref
, which lets users configure some profile settings when running the web-ext run
command. For default preferences, I set extensions.ui.developer_mode=true
so you don't have to toggle the developer mode switch every time you run an extension on chromium.
https://github.com/mozilla/web-ext/blob/9d0512a1a5c3d9100764ff4bfec037c23e44ed15/src/extension-runners/chromium.js#L30-L32
Manual Testing
Here's the commands I ran to do manual testing:
# Default, dev mode should be enabled at chrome://extensions
node .\bin\web-ext.js run -s .\tests\fixtures\minimal-web-ext\ -t chromium
# Disable dev mode, change download dir (chrome://settings/downloads)
node .\bin\web-ext.js run -s .\tests\fixtures\minimal-web-ext\ -t chromium --chromium-pref extensions.ui.developer_mode=false --chromium-pref download.default_directory="C:\Users\Aaron\Downloads\test"
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 99.31%. Comparing base (
17d1c4b
) to head (b1779d9
).
:exclamation: Current head b1779d9 differs from pull request most recent head 61e8a86
Please upload reports for the commit 61e8a86 to get more accurate results.
Additional details and impacted files
@@ Coverage Diff @@
## master #2912 +/- ##
===========================================
+ Coverage 0 99.31% +99.31%
===========================================
Files 0 32 +32
Lines 0 1759 +1759
===========================================
+ Hits 0 1747 +1747
- Misses 0 12 +12
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Rebased and fixed merge conflicts
Rebased and fixed conflicts
No conflicts present with Branch
@aklinker1 why not merge this pr? I still encounter the content script source map issues
Only maintainers can merge PRs, and this hasn't been approved by one.
@VersoriumX I appreciate your approvals, but since you're not a maintainer, you approving this more than once doesn't really help
Sorry for the delay here - I've put this on my list of tasks to review. We are supportive of the requested capability here.
@Rob--W no worries! Thanks for the update
@Rob--W Thanks for the review! I'll update this branch and make the suggested changes once chrome-launcher
is updated. I created a PR: https://github.com/mozilla/web-ext/pull/3200