Repository navigation
test: fix webview window.opener spec for opener severing in #52472 - #52639
Merged
Merged
Conversation
claude
Bot
force-pushed
the
spec-webview-opener-52472
branch
from
August 4, 2026 14:38
76a903a to
789e285
Compare
claude
Bot
force-pushed
the
spec-webview-opener-52472
branch
from
August 4, 2026 14:57
789e285 to
90bd37d
Compare
1 task done
claude
Bot
force-pushed
the
spec-webview-opener-52472
branch
from
August 5, 2026 01:39
d44cf43 to
53eb3ac
Compare
ckerr
approved these changes
Aug 5, 2026
jkleinsc
approved these changes
Aug 5, 2026
|
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.
Requested by John Kleinschmidt · Slack thread
Description of Change
The spec
chromium features window.opener.postMessage supports windows opened from a <webview>has been hard-failing on every main push since #52472 merged (notably the ASan shard, all 4 mocha attempts).Before: the spec expected
window.opener.postMessageto work for a window opened from a<webview>, but after #52472 the opener is severed whenever the child's sandbox state differs from the guest renderer process's launch-time sandbox state. That state could mismatch depending on which renderer process happened to host the guest (suite-order process reuse), so the spec's outcome was not deterministic.After: the spec pins the guest's process state — an unsandboxed embedder (
nodeIntegration: true,contextIsolation: false,webviewTag: true) lets the guest opt out of the sandbox via thenodeintegrationattribute, and a dedicatedpartitionguarantees a fresh renderer process whose launch-time sandbox record reflects the guest's own preferences — and the child explicitly matches it viasetWindowOpenHandlerwithoverrideBrowserWindowOptions: { webPreferences: { sandbox: false } }. With both sides pinned, the opener relationship — and thewindow.opener.postMessageassertion — is deterministic.The opener-severing path itself (mismatched sandbox state) is covered for regular windows by the
guest-window-manager-spectests added in #52472. The now-unreferenced fixturespec/fixtures/pages/webview-opener-postMessage.htmlis removed.Note: the test could not be exercised on CI yet due to the 2026-08-04 runner Python outage.
CI fix: the workflow fix for that outage (#52641, setting
DEPOT_TOOLS_PYTHON_BYPASS: 1in.github/workflows/pipeline-segment-electron-test.yml) has merged separately tomain. This branch has been rebased onto it, so the test jobs can now exercise the spec fix here.Checklist
Release Notes
Notes: no-notes
Generated by Claude Code