jkleinsc

#55937: test: wait for the OSR image before capturing a shared texture frame

Merged
Created: Nov 18, 2026, 4:22:58 PM
Merged: Nov 20, 2026, 9:19:03 AM
4 comments
Target: main

Description of Change

Follow-up to #55784. api-shared-texture.spec.ts flaked again on main's macOS arm64 MAS shard (failed job).

Two fixes:

  • Blank frame race. The offscreen page's load event can fire before its image is actually drawn, so startPainting() sometimes captured a blank white frame and the pixel check failed. I reproduced this on an arm64 Mac by running the spec in a loop under CPU load: 5 of 10 runs failed. The test now waits for the image to decode and render before it captures. With that change, 15 of 15 runs passed.
  • Better timeout errors. The CI failure was a bare 30s test timeout. Each step had its own 20s deadline, so if one step was slow and a later one hung, the test timed out before either deadline fired, and we couldn't tell which step stalled. Step deadlines now fit inside the test timeout. A stall now reports which step hung and how long the earlier ones took. capturePage() also gets its own deadline now.

I can't be sure the blank frame race caused the CI timeout. If it shows up again, the error will say which step hung.

Refs #55391

Checklist

Release Notes

Notes: none

Backports

44-x-y
Merged
PR Number
#55980
Merged At
Nov 20, 2026, 10:24:53 AM
Released In
Not yet
Release Date
Not yet
45-x-y
In-flight
PR Number
#55979
Waiting to be merged
46-x-y
Merged
PR Number
#55981
Merged At
Nov 20, 2026, 10:24:09 AM
Released In
Not yet
Release Date
Not yet

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