Repository navigation
test: add coverage for DevTools embedder messages - #55940
Merged
MarshallOfSound merged 3 commits intoNov 19, 2026
Merged
MarshallOfSound merged 3 commits into
MarshallOfSound merged 3 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NayLZkUudSeUBJhCBEjMmi Co-authored-by: Claude <[email protected]>
The loadNetworkResource spec looked up the response header in lowercase, but the embedder reports header names as the server sent them (the same as Chrome's DevToolsUIBindings), so check the name the test server uses. Also add one helper that builds DevTools frontend calls with JSON-escaped arguments, one for indexing a path and waiting for it, and reuse the match found while waiting for a frontend callback. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NayLZkUudSeUBJhCBEjMmi Co-authored-by: Claude <[email protected]>
6 tasks done
The backported DevTools embedder message specs use randomUUID and the freshDevToolsPartition helper, which exist on main but not on this release branch, so tsc and the specs failed with "Cannot find name". Import randomUUID and add the helper. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KX1hkPKsGqCANPWsM5YGfg
Contributor
There was a problem hiding this comment.
LGTM. The latest commit fixes the missing randomUUID import and freshDevToolsPartition helper I flagged before, and I found nothing else.
What was reviewed (from a standalone clone of the electron repo only):
- Every identifier the new block uses is now defined or imported. That includes
randomUUID,freshDevToolsPartition,waitUntil,defer,listen,closeAllWindows,url,osandWebContents. - Cleanup: each test closes its windows through
afterEach(closeAllWindows). Temp workspaces, the file: URL test directory and theprotocol.handleregistration are all removed throughdefer. The http server is closed inafterAll. - spec/CLAUDE.md rules: the
devtools-closedlistener only sets a flag, which is checked later in the test body. Assertions use vitest matchers. The window-count check only covers windows in this process, so specs running in parallel don't affect it. - I didn't run the specs, so whether the DevTools frontend and embedder behave as these tests expect is left to CI.
Extended reasoning...
This is a test-only backport. It adds one 346-line describe block to spec/api-web-contents.spec.ts and changes no shipped code, so it touches no security-sensitive surface. The one issue raised earlier, ReferenceErrors from the missing randomUUID import and freshDevToolsPartition helper, is fixed in commit 2dd370d, and both are now defined. CODEOWNERS covers nothing under spec/. The timeline shows no other reviewer's objections.
dsanders11
approved these changes
Nov 19, 2026
MarshallOfSound
approved these changes
Nov 19, 2026
MarshallOfSound
enabled auto-merge (squash)
November 19, 2026 04:41
MarshallOfSound
deleted the
trop/45-x-y-bp-test-add-coverage-for-devtools-embedder-messages-1795041818483
branch
November 19, 2026 04:41
|
No Release Notes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #55932
See that PR for details.
Notes: none