зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1565053 [wpt PR 17671] - [FractionalScroll] Fix web tests, a=testonly
Automatic update from web-platform-tests [FractionalScroll] Fix web tests This CL fixes Blink web tests so that they pass when the Fractional Scroll Offsets flag is enabled. This flag enables fractional offsets on the Blink main thread which breaks some tests because they assume that offsets will be floored. I've modernized two tests: fast/events/platform-wheelevent-paging-y-in-non-scrolling-div.html fast/events/scale-and-scroll-div.html The first appears to have been an issue with js-test modifying the page while the second was passing but the PASS string in the -exected.txt had changed to include the factional. Both tests now pass with and without the feature enabled. I removed fast/events/touch/gesture/touch-gesture-scroll-div-scaled.html since it was testing the same thing as scale-and-scroll-div.html. The rest of the tests required changing the layout such that it doesn't cause us to land on fractional offsets (and thus the behavior will be unchanged with and without the flag). Where this was difficult I just allowed for approximate equality. Bug: 414283 Change-Id: Ie03fa06b100fb9946675e921357c1eaebfe6a37e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1690293 Commit-Queue: David Bokan <bokan@chromium.org> Reviewed-by: Stefan Zager <szager@chromium.org> Cr-Commit-Position: refs/heads/master@{#676118} -- wpt-commits: e93818b7c65d3bb3152ed5f7bf1f06019bd295bb wpt-pr: 17671
This commit is contained in:
Родитель
17679b79b4
Коммит
9dcce91e5c
|
@ -6,7 +6,6 @@
|
|||
<style>
|
||||
body {
|
||||
margin: 0px;
|
||||
overflow: scroll;
|
||||
scroll-snap-type: both mandatory;
|
||||
}
|
||||
#content {
|
||||
|
@ -22,6 +21,7 @@ body {
|
|||
width: 400px;
|
||||
height: 400px;
|
||||
background-color: lightblue;
|
||||
overflow: hidden;
|
||||
scroll-snap-align: start;
|
||||
}
|
||||
#i1 {
|
||||
|
@ -74,10 +74,13 @@ button.onclick = function() {
|
|||
if (!scrolled_x || !scrolled_y)
|
||||
return;
|
||||
|
||||
assert_equals(window.scrollX, target.offsetLeft,
|
||||
"window.scrollX should be at snapped position.");
|
||||
assert_equals(window.scrollY, target.offsetTop,
|
||||
"window.scrollY should be at snapped position.");
|
||||
snap_test.step(() => {
|
||||
assert_equals(window.scrollX, target.offsetLeft,
|
||||
"window.scrollX should be at snapped position.");
|
||||
assert_equals(window.scrollY, target.offsetTop,
|
||||
"window.scrollY should be at snapped position.");
|
||||
});
|
||||
|
||||
// To make the test result visible.
|
||||
var content = document.getElementById("content");
|
||||
body.removeChild(content);
|
||||
|
|
Загрузка…
Ссылка в новой задаче