Bug 1728997 [wpt PR 30332] - Fix current-time-writing-modes.html, a=testonly
commit6de674d7ca1661f96764af138fcb41080c1a651d
authorKevin Ellis <kevers@chromium.org>
Tue, 14 Sep 2021 09:56:48 +0000 (14 09:56 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Tue, 21 Sep 2021 14:21:23 +0000 (21 14:21 +0000)
tree8a72fee7d34e6d1e347724869e1feeb2ba31d889
parent06c8eaf384ca79183de04e347654dcf3b5641ba7
Bug 1728997 [wpt PR 30332] - Fix current-time-writing-modes.html, a=testonly

Automatic update from web-platform-tests
Fix current-time-writing-modes.html

When tested via a polyfill implementation, this test was failing due to
the small size variations in the scroll ranges.  The test was also
making the incorrect assumption that the scrollbar widths are the same
in both horizontal and vertical directions. Though often true, it cannot
be guaranteed.

The error tolerances were too tight given that scroll positions might
not be integer aligned. With the patch, the tolerance is calculated
based on being out by up to half a pixel based on the the maximum scroll
range. A conservative value is used by default for the maximum scroll
range based on parameters in the default setup for scroll timeline
tests. This estimate ignores the width of the scrollbars, but
nonetheless provides a solid estimate on the upper bound of the error.

The RTL tests did not appear to be testing RTL behavior in that the
scroll orientation was set to block, which is still vertical unless
switching to a vertical writing mode.  Switching from block to inline
fixed the test so that manipulating scroll left actually affects the
current time of the animation.

Change-Id: Ib01154cb27870ceb561cda494b25cc49ccbbb116

Bug: 1246372
Change-Id: Ib01154cb27870ceb561cda494b25cc49ccbbb116
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3140293
Reviewed-by: Xida Chen <xidachen@chromium.org>
Commit-Queue: Kevin Ellis <kevers@chromium.org>
Cr-Commit-Position: refs/heads/main@{#918984}

--

wpt-commits: f5ded4ffa39047a0362f7b998b1fc7ee4b9e6747
wpt-pr: 30332
testing/web-platform/tests/scroll-animations/current-time-writing-modes.html
testing/web-platform/tests/scroll-animations/testcommon.js