interop icon indicating copy to clipboard operation
interop copied to clipboard

Bump the wait for scrollend / scroll completion timeout for tests that include a smooth scroll

Open dlrobertson opened this issue 11 months ago • 4 comments

The comment above waitFor says

// TODO(crbug.com/1400399): deprecate. We should not use frame based waits in
// WPT as frame rates may vary greatly in different testing environments.

At 60fps, 700 frames is 11.67s. At 120fps, it's 5.83s.

createScrollendPromiseForTarget accepts a timeout argument, which flows through to t.step_timeout() (docs). Could the smooth scroll tests set a longer timeout?

What is the longest duration for a smooth scroll in implementations?

zcorpan avatar Feb 17 '25 10:02 zcorpan

cc: @vmpstr for review

nairnandu avatar Mar 20 '25 16:03 nairnandu

Bumping the timeouts sounds fine to me. I can try to find out what the longest duration in chromium is but I have no clue about other implementations.

However, I spot-checked scrollend-event-fired-for-programmatic-scroll.html?include=root-scrollBy-smooth and scrollend-event-fired-for-programmatic-scroll.html?include=root-scrollTo-smooth and compared the results with their "auto" versions. Looks like firefox passes the "auto" versions (which I believe do an instant scroll) but times out on the smooth versions. But even on the passing "auto" versions the firefox runs take ~7 seconds and chromium and Edge typically take <1 second? Perhaps the duration in firefox is longer than the duration in chromium?

DavMila avatar Mar 24 '25 13:03 DavMila

seems ok to me

nt1m avatar Mar 24 '25 15:03 nt1m

Looks like there is agreement here. @dlrobertson would you mind creating a PR for the change?

nairnandu avatar Apr 03 '25 16:04 nairnandu