ckerr

#54727: test: keep WebContentsView visibility specs' windows on top on Windows

Merged
Created: Oct 7, 2026, 3:43:40 PM
Merged: Oct 8, 2026, 8:55:47 AM
5 comments
Target: main

Description of Change

Keep the WebContentsView visibilityState specs' 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' and waitUntil() times out.
Downstream CI on 42-x-y, 43-x-y and 44-x-y hits 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 block serial.
Other platforms keep a normal window level.
Only test code changes.

Validation

Ran on a local Linux testing build of main under 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.
  • The Windows-only alwaysOnTop part isn't exercised on Linux.
  • script/lint.js --js and tsc -p tsconfig.spec.json pass.

🤖 Generated with Claude Code

Checklist

Release Notes

Notes: none

Backports

42-x-y
Pending
Waiting for a manual backport
43-x-y
Merged
PR Number
#54760
Merged At
Oct 8, 2026, 11:00:38 AM
Released In
Not yet
Release Date
Not yet
44-x-y
Merged
PR Number
#54762
Merged At
Oct 8, 2026, 11:00:16 AM
Released In
Not yet
Release Date
Not yet
45-x-y
Merged
PR Number
#54761
Merged At
Oct 8, 2026, 11:00:49 AM
Released In
v45.0.0-beta.1
Release Date
Oct 8, 2026, 7:07:44 PM

Semver Impact

Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.

Semantic Versioning helps users understand the impact of updates:

  • Major (X.y.z): Breaking changes that may require code modifications
  • Minor (x.Y.z): New features that maintain backward compatibility
  • Patch (x.y.Z): Bug fixes that don't change the API
  • None: Changes that don't affect using facing parts of Electron