Repository navigation
Conversation
Port upstream #42936 and #43075. While connectOverCDP attaches to existing targets, it now waits for every page to initialize. A page that reports Inspector.targetCrashed during that window (crashed, discarded, unloaded) is closed right away instead of being reported, and a popup whose opener was dropped this way has no opener. The discarded-tab test drives chrome://discards, which needed two selector fixes to match upstream: getByText now pierces open shadow roots, and <tr> has the implicit "row" role. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The discarded-tab test forces headless: false, like upstream. Upstream runs every Linux test job under xvfb-run, so do the same for the Chromium headless job instead of skipping the test there. A page whose InitializeAsync fails now still completes InitializedTask, the way upstream reportAsNew(error) does, so connectOverCDP cannot hang on it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Connecting over CDP to a browser with a crashed or discarded tab reported that tab as a blank page that never finished loading. This ports the upstream fix (microsoft/playwright#42936, #43075). While
ConnectOverCDPAsyncattaches to existing targets, it now waits for every page to initialize. A page that reportsInspector.targetCrashedin that window is closed instead of reported. A popup whose opener was dropped this way returnsnullfromOpenerAsync().The discarded-tab test clicks through
chrome://discards, which exposed two selector gaps against upstream:GetByTextdid not look inside open shadow roots, and<tr>had no implicitrowrole. Both are fixed. That test needs headed Chromium, so the Linux headless CI job now runs underxvfb-run, as upstream does for all Linux jobs. A page whose initialization fails still counts as initialized, so connecting cannot hang on it.Closes #25
🤖 Generated with Claude Code