webviews tests: thread-minimap-motion samples after the frame paints

Merged
TE
15d ago
+11-8

In progress: CI running; independent review next.

#23092 has merged, so thread-minimap-motion leaves FRAME_READS_PENDING (webviews/scripts/check-frame-reads.ts) and reads after paint through test/support/paintedFrames.ts (#23374):

  • Sampler: it runs on window.cmuxAfterPaint instead of a self-rescheduling requestAnimationFrame.
  • Reduce-motion click: it reads after two window.cmuxPaintFrame() waits, instead of awaiting two frames inside the page and reading in the same microtask.

The assertions and bounds are unchanged.

Verification (cmux16, WebKit, CMUX_BROWSER_TESTS=1)

  • At the feat-cmux-next tip (with #23092), unchanged: 5/5 green.
  • With this change: 5/5 green.
  • check-browser-test-lanes, the check-frame-reads unit tests and vp check are clean.

Agent session: cmux16

šŸ¤– Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Updates the thread-minimap-motion webview test to sample after frames paint, using the cmuxAfterPaint/cmuxPaintFrame hooks added in #23092.

  • The per-frame sampler runs on window.cmuxAfterPaint instead of a self-rescheduling requestAnimationFrame.
  • The reduce-motion click reads after two window.cmuxPaintFrame() waits instead of two frames awaited inside the page.
  • Removes the test from FRAME_READS_PENDING in check-frame-reads.ts.
  • Assertions and bounds are unchanged; the test stays green 5/5 in WebKit before and after this change.