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
fix(extensions): implement missing web_request hooks #22655
Conversation
My PR is ready for review. |
e838729
to
89e3517
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sentialx can you rebase your branch on master? It looks like you pulled in a whole bunch of commits that are already in master.
@jkleinsc I think I've reverted the rebase, I don't see those commits anymore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does this interact with Electron's webRequest
API? If a request is intercepted by both an extension and Electron's webRequest
API, does one take precedence? Does the request get passed first through one of those, then the other? Which comes first?
Also, I think this needs a test or two.
BTW, you can download built artifacts from CI, e.g. here's the one for mac from this PR. It's under the 'artifacts' tab on circleci under the 'osx-testing' job under the 'build-mac' check. https://circleci.com/gh/electron/electron/513409#artifacts/containers/0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to see a test for this please! Ideally:
- Test the basic
chrome.webRequest
functionality to make sure it works at all. - Test combining electron's
webRequest
withchrome.webRequest
and assert that electron's webRequest isn't called.
spec-main/extensions-spec.ts
is the place to look for existing tests.
Co-authored-by: Jeremy Apthorp <nornagon@nornagon.net> Co-authored-by: samuelmaddock <samuel.maddock@gmail.com>
Co-authored-by: Jeremy Apthorp <nornagon@nornagon.net> Co-authored-by: samuelmaddock <samuel.maddock@gmail.com>
Co-authored-by: Jeremy Apthorp <nornagon@nornagon.net> Co-authored-by: samuelmaddock <samuel.maddock@gmail.com>
Co-authored-by: Jeremy Apthorp <nornagon@nornagon.net> Co-authored-by: samuelmaddock <samuel.maddock@gmail.com> Co-authored-by: Jeremy Apthorp <nornagon@nornagon.net> Co-authored-by: samuelmaddock <samuel.maddock@gmail.com>
Co-authored-by: Jeremy Apthorp <nornagon@nornagon.net> Co-authored-by: samuelmaddock <samuel.maddock@gmail.com> Co-authored-by: Jeremy Apthorp <nornagon@nornagon.net> Co-authored-by: samuelmaddock <samuel.maddock@gmail.com>
* fix(extensions): implement missing web_request hooks (#22655) Co-authored-by: Jeremy Apthorp <nornagon@nornagon.net> Co-authored-by: samuelmaddock <samuel.maddock@gmail.com> * fix: remove ukm_source_id Co-authored-by: Jeremy Apthorp <nornagon@nornagon.net> Co-authored-by: samuelmaddock <samuel.maddock@gmail.com>
Description of Change
Currently the
chrome.webRequest
listeners don't do anything.This PR adds missing
web_request_api
hooks required for intercepting requests usingchrome.webRequest
.Ref #19447
Checklist
npm test
passesRelease Notes
Notes: Fixed
chrome.webRequest
extensions API not intercepting any requests.