Skip to content

Commit

Permalink
Deflake scrollend test
Browse files Browse the repository at this point in the history
The timeout is the likely culprit. If the test flakes again, we should
put the TestExpectations entry back and re-investigate.

Bug: 1430215
Change-Id: I27d450e37920072d04018b1e191b8e7efb1867dc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5262097
Commit-Queue: David Awogbemila <[email protected]>
Reviewed-by: Steve Kobes <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1255607}
  • Loading branch information
David Awogbemila authored and chromium-wpt-export-bot committed Feb 2, 2024
1 parent 8b0c670 commit cf2518c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dom/events/scrolling/scrollend-event-fired-to-window.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@
assert_equals(document.scrollingElement.scrollTop, 0,
"document should not be scrolled");

let scrollend_promise = waitForScrollendEvent(t, target_div);
let scrollend_promise = waitForScrollendEventNoTimeout(target_div);
let max_target_div_scroll_top = target_div.scrollHeight - target_div.clientHeight;
target_div.scrollTo({ top: target_div.scrollHeight, left: 0 });
await scrollend_promise;
assert_approx_equals(target_div.scrollTop, max_target_div_scroll_top, 1,
"target_div should be fully scrolled down");

scrollend_promise = waitForScrollendEvent(t, window, 2000);
scrollend_promise = waitForScrollendEventNoTimeout(window);
target_div.addEventListener("scrollend", fail);
// Scroll up on target div and wait for the doc to get scrollend event.
await scrollElementDown(target_div, target_div.clientHeight + 25);
Expand Down

0 comments on commit cf2518c

Please sign in to comment.