Repository navigation
test: keep WebContentsView visibility specs' windows on top on Windows - #54727
Merged
Merged
Conversation
The WebContentsView visibilityState specs wait for their page to become 'visible'. A BrowserWindow's own webContents is force-shown, but a BaseWindow's content views are not, so Chromium's native occlusion tracker decides their visibility. On the Windows CI hosts another process's console window can sit above a newly shown test window, and under the parallel runner another worker's window can cover it, so the page stays 'hidden' and waitUntil() times out. As #54334 did for visibility-state.spec.ts, create these windows always-on-top on Windows, and run the block serially. Co-Authored-By: Claude Opus 5.5 <[email protected]>
deepak1556
approved these changes
Oct 8, 2026
deepak1556
left a comment
Member
There was a problem hiding this comment.
Is there an advantage to running these specs with the occlusion tracker enabled, they are testing visibility of the views wrt in app views and windows, not in reaction to external occlusion ?
jkleinsc
approved these changes
Oct 8, 2026
|
No Release Notes |
Contributor
|
I was unable to backport this PR to "42-x-y" cleanly; |
Contributor
|
I have automatically backported this PR to "43-x-y", please check out #54760 |
Contributor
|
I have automatically backported this PR to "45-x-y", please check out #54761 |
Contributor
|
I have automatically backported this PR to "44-x-y", please check out #54762 |
Contributor
ckerr
added a commit
that referenced
this pull request
Oct 19, 2026
…s (42-x-y) (#55120) test: keep WebContentsView visibility specs' windows on top on Windows Backport of #54727 to 42-x-y. Preserve the branch's Vitest assertions and existing BaseWindow options. Co-authored-by: Copilot <[email protected]>
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.
Description of Change
Keep the WebContentsView
visibilityStatespecs' windows on top on Windows, and run the block serially.These specs wait for their page to become
'visible'.A BrowserWindow's own webContents is force-shown, but a BaseWindow's content views aren't, so Chromium's native occlusion tracker decides their visibility.
On the Windows CI hosts, another process's console window can sit above a newly shown test window, and under the parallel runner another worker's window can cover it.
Either way the page stays
'hidden'andwaitUntil()times out.Downstream CI on
42-x-y,43-x-yand44-x-yhits this in "tracks visibility for multiple child WebContentsViews", "tracks visibility independently when a child WebContentsView is hidden via setVisible" and "fires a single visibilitychange event per show/hide transition":waitUntil timed out after 10000ms, 30 failures each.As #54334 did for
visibility-state.spec.ts, this creates the block's BaseWindows always-on-top on Windows and tags the blockserial.Other platforms keep a normal window level.
Only test code changes.
Validation
Ran on a local Linux testing build of
mainunder Xvfb:e test --files spec/api-web-contents-view.spec.ts -g visibilityState: 9 passed in the serial phase, and 3 of 3 runs passed.alwaysOnToppart isn't exercised on Linux.script/lint.js --jsandtsc -p tsconfig.spec.jsonpass.🤖 Generated with Claude Code
Checklist
npm testpassesRelease Notes
Notes: none