Skip to content

test: treat Chromium's dropped PageDown step during a t glide as a known browser gap - #7607

Merged
leaf-agent merged 3 commits into
mainfrom
fix/issue-6744-pagedown
Nov 29, 2026
Merged

leaf-agent merged 3 commits into
mainfrom
fix/issue-6744-pagedown

Conversation

@leaf-agent

@leaf-agent leaf-agent commented Nov 29, 2026 •

Copy link
Copy Markdown
Collaborator

Chromium on a starved host sometimes drops its own page step for an unprevented PageDown when the keydown handler has just scrolled the page with instant writes. Without Leaf, the page stays where the handler left it. That is why test_a_key_pressed_during_a_glide_acts_where_the_glide_lands[browser-t-PageDown-*] fails a few percent of the time on the macOS runner. landForKey lands t's glide in that handler and leaves the key to the browser, and the step then never comes. This PR records the gap in notes/browser-support.md and marks the two Chromium t-then-PageDown cases as non-strict expected failures (xfail(strict=False)) that point to the note. Firefox's t-then-PageDown cases and every other glide-and-key case in Chromium still assert as before.

The evidence for Chromium rather than Leaf comes from a bare probe page with no Leaf code, run on the macOS runner with leaf-dev suite flake (Chrome for Testing 159.0.8154.6, build 1255). The page glides the window by instant writes in frame callbacks under held_frames. The t key may first move focus with preventScroll. The PageDown handler then cancels the glide, makes the same three write-and-restore pairs Leaf's readScrolled makes, and writes the goal.

Variant Copies where PageDown's step was dropped
Focus moved by t, to a div in flow or in a fixed anchored carrier, as Leaf's t focuses a thread card 3 of 432 (46236630332, 46237263543)
No focus move, with or without the probe pairs and a cancelled overflow-anchor: none animation (Leaf's holdBox) 0 of 594 (46234427214, 46235132044)
Leaf's own two t-then-PageDown Chromium cases, same run as a control 3 of 108 (46235132044)

Each failing bare copy shows the shape Leaf's failures show. The window reads the glide's goal in one scroll and a scrollend after the key, and nothing moves past it.

Why the gap is recorded rather than corrected. notes/browser-support.md says a gap is recorded and left unless it shows on a path users take often, or loses work, breaks an action or disrupts a gesture. Here the user's PageDown is ignored only when it falls inside a 140ms glide on a starved machine, and a second press steps as usual. A correction would have Leaf step the page itself, and the header of dom/scrolling.js says a script can't read the distance the native step would take. The note's recheck says when the mark can go.

Before the change, the two Chromium cases failed 3 to 10 of 108 copies per macOS dispatch on main. After it, they can only xpass or xfail. As with the existing #6348 mark in test_workspaces_and_bounds.py, they no longer guard the Chromium case. Both cases ran on Linux on the branch and passed.

Refs #6744 — automated triage. The issue's last open test, test_comment_marks[firefox_browser], is separate and is followed on the issue.

…ser gap

Chromium on a starved host sometimes drops its own page step for an
unprevented PageDown whose keydown handler has just scrolled the page. A bare
page with no Leaf code reproduces it on the macOS runner, so the glide
matrix's t-then-PageDown cases in Chromium become a non-strict expected
failure, and notes/browser-support.md records the gap with its recheck.

Refs #6744

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The note's recheck says "Recheck with that bare page on the macOS runner", but no such page exists in the tree. The probe is test_bare_pagedown_steps_after_a_handler_scrolls in tests/journeys/navigation/test_probe_bare_pagedown.py, and it lives only on the unmerged branch flake/issue-6744-bare-pagedown. The note's own rules say an entry keeps "a regression test or minimal reproduction that can settle a recheck", and root AGENTS.md asks a note to keep "the command that reproduces it". As written, whoever rechecks would have to rebuild the probe from the bullet list and could not compare its counts with these ones. I'll push a fix that names the probe's commit and the leaf-dev suite flake command that runs it.

The note's recheck pointed at a probe page the tree doesn't hold. Name its
test, the commit that keeps it, and the ci dispatch that runs it beside
Leaf's two cases.

Refs #6744
@leaf-agent
leaf-agent merged commit 82b285c into main Nov 29, 2026
8 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-6744-pagedown branch November 29, 2026 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant