Bug
1864552 [wpt PR 43131] - Fix recent-input.html Flaky Test, a=testonly
Automatic update from web-platform-tests
Fix recent-input.html Flaky Test (#43131)
- Fix the flakiness
- Refactor/flatten the test for better readability
- Rename clickHandler to pointerdownHandler
Previous Undesired Outcome:
- assert_greater_than_equal(timeAfterClick, entry.lastInputTime)
sometimes fail.
Root Cause:
- The variable timeAfterClick is really a time after pointerdown and can
possibly happen before the click event processingStart.
- LastInputTime is the timestamp of the event comes in. And when a new
event show up later, it will get refreshed.
- Thus, if we try to compare pointdown's processingEnd with
lastInputTime of (for example) click event, then there's no guarantee
of one is greater the other.
This CL address it by:
- Remove timeAfterClick, which is not a very meaningful timestamp, since
we should never assume no more events coming in after.
- Compare lastInputTime with the layout shift startTime instead, for
which the sequence is always guaranteed.
Bug:
1441125
Change-Id: Id5fd368db78afd16df4b2a1e7b8924b32fa6a0f8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/
5026199
Reviewed-by: Michal Mocny <mmocny@chromium.org>
Commit-Queue: Aoyuan Zuo <zuoaoyuan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#
1224360}
Co-authored-by: Aoyuan Zuo <zuoaoyuan@chromium.org>
--
wpt-commits:
7ef6f100d2d30b7dcc7e5e0d7cb543883f98ad6f
wpt-pr: 43131