commit 534ede1b237583868be9c72bd1a11f9157262d01 parent 53e6383848d70630b5d59fa242f96e575c7715be Author: moonira <moonira@google.com> Date: Wed, 15 Oct 2025 08:12:45 +0000 Bug 1993465 [wpt PR 55306] - Fix flaky scroll-state(scrolled) scrollbar scroll tests, a=testonly Automatic update from web-platform-tests Fix flaky scroll-state(scrolled) scrollbar scroll tests Tests are timing out sometimes, presumably scrolling doesn't happen because we didn't hit the scrollbar buttons/tracks. Skip scrollbar tests on platforms with invisiblle scrollbar (e.g. overlay scrollbar). Bug: 449977240, 449905101, 414556050 Change-Id: I278e7f25f6d48832d0ec958dafc1a34b7ebb4fc9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7021249 Reviewed-by: Daniil Sakhapov <sakhapov@chromium.org> Commit-Queue: Munira Tursunova <moonira@google.com> Cr-Commit-Position: refs/heads/main@{#1526875} -- wpt-commits: d10678acd86481e1485ff457e8429f7ba633ae5f wpt-pr: 55306 Diffstat:
2 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/testing/web-platform/tests/css/css-conditional/container-queries/scroll-state/scroll-state-scrolled-scrollbar-button-clicks.html b/testing/web-platform/tests/css/css-conditional/container-queries/scroll-state/scroll-state-scrolled-scrollbar-button-clicks.html @@ -48,6 +48,13 @@ } promise_test(async t => { + // Skip test on platforms that do not have a visible scrollbar (e.g. + // overlay scrollbar) since it wouldn't have scrollbar buttons. + const scrollbar_width = scroller.offsetWidth - scroller.clientWidth; + if (scrollbar_width == 0) { + return; + } + assert_equals(scroller.scrollTop, 0); let scrollEndPromise = waitForScrollEndFallbackToDelayWithoutScrollEvent(scroller); diff --git a/testing/web-platform/tests/css/css-conditional/container-queries/scroll-state/scroll-state-scrolled-scrollbar-track-clicks.html b/testing/web-platform/tests/css/css-conditional/container-queries/scroll-state/scroll-state-scrolled-scrollbar-track-clicks.html @@ -48,6 +48,13 @@ } promise_test(async t => { + // Skip test on platforms that do not have a visible scrollbar (e.g. + // overlay scrollbar). + const scrollbar_width = scroller.offsetWidth - scroller.clientWidth; + if (scrollbar_width == 0) { + return; + } + assert_equals(scroller.scrollTop, 0); let scrollEndPromise = waitForScrollEndFallbackToDelayWithoutScrollEvent(scroller);