Skip to content

test: expect the loss of a wheel Firefox applies after the reader's wait in the thread view's room test - #6975

Merged
leaf-agent merged 1 commit into
mainfrom
fix/issue-6767-late-firefox-wheel
Nov 24, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/issue-6767-late-firefox-wheel

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

test_a_wheel_as_the_thread_gives_up_room_moves_it_as_far_as_without[firefox_browser] fails on a slow machine for a reason Leaf already accepts, not because of the keepFoot defect it guards. It failed 8 of 18 copies on the macOS runner (run 45070753140) and 3 of 16 on Linux under leaf-dev suite flake --load 4, always reading {False: 200, True: -100}. An instrumented copy logged the view's events in the failing runs:

wheel 10151ms at 400 → end 10242ms at 500 → scroll 10317ms at 500

The box's scroll sequence ended at its quiet spell (SETTLE_MS, 80 ms plus two frames), before Firefox applied any of the wheel's scroll. keepFoot then made the move it owed at that end, and that write cancelled the pending wheel. #6197 accepted this loss as a corner case for the same reason: no event says the browser won't scroll, so ending it needs a deadline. That PR marked the PageUp-in-a-log cases as non-strict expected failures.

This test only reports xfail when that ordering actually happened. It counts the view's scroll events until the sequence ends, and calls pytest.xfail only when it heard none. The defect the test guards, the view moving at the wheel itself, scrolls the box before the end. So that defect still fails the test: with keepFoot's deferral removed (if (readerScrolls(box)) → if (false)), the test reads {False: 200, True: -100} and fails rather than xfailing.

With the change, under the same --load 4, 15 of 16 copies passed and 1 xfailed. Before it, 3 of 16 failed.

Refs #6767 — automated triage. The issue's smooth-revision-above Firefox case and the thread-walk teardown are separate and stay open there.

…ait in the thread view's room test

test_a_wheel_as_the_thread_gives_up_room_moves_it_as_far_as_without
failed 8 of 18 copies on the macOS runner, and 3 of 16 on Linux under
leaf-dev suite flake --load 4, always reading {False: 200, True: -100}.
Logging the box's events in the failing copies showed the scroll
sequence's quiet spell ending about 80 ms after the wheel, before Firefox
applied any of the wheel's scroll. keepFoot then made the move it owed,
and that write cancelled the pending wheel. #6197 accepted this as a
corner case, since no event says the browser won't scroll.

The test now counts the box's scroll events before the sequence ends.
Where it hears none, the case is that accepted loss and the test reports
xfail. The defect the test guards, keepFoot moving the view at the wheel,
scrolls the box before the end, so it still fails: with keepFoot's
deferral removed, the test reads {False: 200, True: -100} and fails.

Refs #6767
@leaf-agent
leaf-agent merged commit 40e206f into main Nov 24, 2026
7 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-6767-late-firefox-wheel branch November 24, 2026 07:22
leaf-agent added a commit that referenced this pull request Nov 24, 2026
…he change drew as an expected failure (#6977)

The Firefox smooth cases of `test_the_page_holds_still_under_the_user`
(`smooth-revision-above-firefox`, `smooth-reply-above-firefox`) now
report a run that lost its own ordering as xfail rather than as a
failure. These are the only `midway` cases. Each asserts that the page's
read of the change went, and the change drew, while Firefox's 300px
smooth `scrollBy` was still under way. That scroll runs by the browser's
clock, and nothing the case holds can pause it, so on a starved host it
can finish first. Such a run measured nothing about the page.

`smooth-revision-above-firefox` failed this precondition in 5 of 18
macOS copies ([run
45070753140](https://github.com/max-sixty/leaf/actions/runs/45070753140)).
On Linux under `leaf-dev suite flake --load 4` it failed 1 of 16, at
`299.6px of its 300`. With the change, 12 copies of each case under the
same load all reported xfail. The run that lost the ordering reported
`the change drew after the scroll ended, at 299.1px of its 300`, and the
rest reported their strict `MOVES_ON_MAIN` reason. A run that keeps the
ordering is judged exactly as before.

Refs #6767 — automated triage. This settles the smooth-revision part.
The Firefox wheel case is #6975, and the thread-walk teardown is
unreproduced.

Co-authored-by: leaf-agent <[email protected]>
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