Repository navigation
test: add coverage for DevTools embedder messages - #55939
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 push fixes both ReferenceErrors I raised earlier, and I found nothing new.
What was reviewed (from a standalone clone, with no Chromium tree available):
randomUUIDis now imported fromnode:crypto(spec/api-web-contents.spec.ts:17).freshDevToolsPartitionis now defined at module level (line 1816) and gives each preferences test its ownpersist:partition.- I checked the new helpers against spec/CLAUDE.md. No
expect()runs inside an event listener (thedevtools-closedlistener only sets a flag). Temporary workspaces come frommkdtemp, anddeferremoves them. Request and stream ids start at 1,000,000, above the frontend's own. - I did not run the specs. Whether the DevTools frontend behaves as these tests expect is for CI to confirm.
Extended reasoning...
This backport only adds tests: 346 lines in spec/api-web-contents.spec.ts that exercise DevTools embedder messages (loadNetworkResource, openInNewTab, preferences, workspace search, reattach), with no production code changes. It touches no security-sensitive surface, and CODEOWNERS does not cover spec/. The previous review flagged two missing-symbol errors. The latest commit adds the node:crypto import and defines the partition helper, so both are fixed. Nothing else in the diff came up as a problem when I read it.
dsanders11
approved these changes
Nov 19, 2026
MarshallOfSound
enabled auto-merge (squash)
November 19, 2026 04:41
MarshallOfSound
approved these changes
Nov 19, 2026
MarshallOfSound
deleted the
trop/44-x-y-bp-test-add-coverage-for-devtools-embedder-messages-1795041817489
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