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: Allow inspection of specific shared workers #19793
Conversation
@JohnPop117 please add the release notes |
spec/api-web-contents-spec.js
Outdated
contents[0].once('devtools-closed', () => { | ||
done() | ||
}) | ||
contents[0].inspectSharedWorkerById(vectorOfWorkers[0].id) |
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.
This assumes that vectorOfWorkers
has been initialized before running this test.
Please make the test self-contained.
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.
This test will still fail if the previous test hasn't been run. Tests should not depend on each other. Please make vectorOfWorkers
a local variable of each test.
And please avoid using the word "vector", this concept doesn't exist in JavaScript. It's ok to call it simply sharedWorkers
.
spec/api-web-contents-spec.js
Outdated
}) | ||
|
||
it('can inspect a specific shared worker', (done) => { | ||
const contents = webContents.getAllWebContents() |
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.
Should be const contents = remote.getCurrentWebContents()
.
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.
Looks good expect that one tests issue (see above).
|
@JohnPop117 can you rebase this PR against the latest from master? |
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.
Needs rebase from master
This appears to have had a bad rebase |
d8e2c2c
to
279d5c9
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.
Thanks for rebasing - much easier to see the changes now! Can we enable the new test?
81bfc78
to
f8fcab4
Compare
@JohnPop117 can you check and see if you are following your fork on CircleCI? For some reason CircleCI builds are not being triggered and according to this article if you are following the project fork on their personal account rather than the project itself on CircleCI, builds will not be triggered: |
Taking over due to lack of activity. This PR is not a personal contribution, but MS one. Replacement PR #20389 |
Description of Change
Added APIs to allow electron to get a list of shared web workers and then inspect
a shared worker based on its ID.
Checklist
npm test
passesRelease Notes
Notes: Added ability to inspect specific shared workers