Repository navigation
fix(browser): cast a page held by a dialog on macOS - #975
Merged
Merged
Conversation
omartelo
marked this pull request as ready for review
October 28, 2026 21:21
omartelo
force-pushed
the
fix/macos-held-dialog-pane
branch
from
October 28, 2026 21:21
e4a4091 to
5af33e1
Compare
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.
Fixes
TestChromeAPaneOpenedOnADialogShowsThePageon macos-15-intel, which failed the v0.81.0 release job (run 40757293299).Root cause
A product bug, not only a test bug. Up to Chrome 153,
Page.startScreencastandPage.stopScreencastreturnFallThroughincontent/browser/devtools/protocol/page_handler.cc, so Chrome answers them only once the renderer has seen them. A renderer holding a JavaScript dialog sees nothing until the dialog closes, although the browser has already started or stopped the frames. Chrome 154 answers both from the browser (Response::Success()). macos-15-intel ships Chrome 151 and macos-latest ships 155/156, which is why only the Intel release job failed.The impact: with Chrome 153 or older, on any OS, opening the browser pane on a page holding a dialog waited the whole
pageWait(30 s) inAttach, which then dropped the session's browser. A probe on the runner showedPage.stopScreencastblocked until the dialog was answered in 16 of 16 runs, while browser-level and browser-handled page commands answered in about 1 ms.The test asserted what the contract promises and is unchanged.
Fix
chrome_view.go: screencast starts and stops run in order on a queue (castPastDialog) and return once done or once the page holds a dialog; the step runs on after that, and an error it meets later is logged. A stop is sent only while a screencast runs, so a pane opened on a held page starts its frames without a stop waiting first.dialogs_test.go: a unit test with a step that blocks the way Chrome 151's reply does: the caller returns under the dialog and the steps run in order.docs/ceilings.md: on Chrome 153 and older, a pane resized while a dialog is open keeps its last frame until the dialog is answered.No CHANGELOG entry: dialogs ship in 0.81.0, which has not been released yet.
Measurement (GitHub runners,
go test -v -count=N)-run TestChrome-run TestChromeTest plan
gofmt -l .,go vet ./...,go test ./...go test -race -count=200 -run TestAScreencastUnderADialog ./internal/browser/