Bug 1485707 [wpt PR 12642] - Avoid overflowing snap areas in scrollTo wpt tests, a=testonly
authorSandra Sun <sunyunjia@chromium.org>
Wed, 29 Aug 2018 22:41:28 +0000
changeset 492037 c80e34a74aa79fb6d4ce49fded45d5fc792b3298
parent 492036 746c205985b5e0d16d746299d1cb97a521409fff
child 492038 8f7e788099da50489b6cb5b332e3c74d94fd5ecd
push id1815
push userffxbld-merge
push dateMon, 15 Oct 2018 10:40:45 +0000
treeherdermozilla-release@18d4c09e9378 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1485707, 12642, 876052, 1182299, 585926
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1485707 [wpt PR 12642] - Avoid overflowing snap areas in scrollTo wpt tests, a=testonly Automatic update from web-platform-testsAvoid overflowing snap areas in scrollTo wpt tests Some tests in scrollTo-scrollBy-snaps.html are failing on wpt dashboard. This is caused by the uncertainty of the window size for testharness tests. If the window size becomes small enough that the snap area covers the snapport, the expected snap position is ignored because any scroll position is considered a valid snap position. This patch changes the landing position of scrollTo and scrollBy for failing cases so that the snap area does not cover ths snapport regardless of the window size. More specifically, the snap area's vertical and horizontal dimensions are 600px each thus covering the [1000, 1600] range with expected snap position at 1000. Previously if the test vertically scrolled to 1200 and the window's size is smaller than 400, the snap area will cover the window. Now the test scrolls to 900 (100px before the snap position), ensuring that the target snap area won't cover the window regardless of the size. Bug: 876052 Change-Id: I448ecb1e3cc2cc458d467472ca38d49bf01d2901 Reviewed-on: https://chromium-review.googlesource.com/1182299 Commit-Queue: Sandra Sun <sunyunjia@chromium.org> Reviewed-by: Majid Valipour <majidvp@chromium.org> Cr-Commit-Position: refs/heads/master@{#585926} -- wpt-commits: b146527e52dc7a313a5f011b71ea28445c70894c wpt-pr: 12642
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/css/css-scroll-snap/scrollTo-scrollBy-snaps.html
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -545207,17 +545207,17 @@
    "6d3c1865fe7b1e05ea7897db4118abeabb73d02f",
    "testharness"
   ],
   "css/css-scroll-snap/scroll-snap-type-proximity.html": [
    "cfe990c4fcab85898899039f71fa353484558789",
    "testharness"
   ],
   "css/css-scroll-snap/scrollTo-scrollBy-snaps.html": [
-   "58807a6836f7366d8ccc69c56bb63ad022b877ef",
+   "3e022f0a12147fc29dbf45905e36c74e5d221f0a",
    "testharness"
   ],
   "css/css-scroll-snap/snap-at-user-scroll-end-manual.html": [
    "0ab50d6be3e556603b2d2b4b2e41278e9431ba71",
    "manual"
   ],
   "css/css-scroll-snap/snap-inline-block.html": [
    "ea1442f6706fdc17307471eb9c04e32249f6b092",
--- a/testing/web-platform/tests/css/css-scroll-snap/scrollTo-scrollBy-snaps.html
+++ b/testing/web-platform/tests/css/css-scroll-snap/scrollTo-scrollBy-snaps.html
@@ -68,18 +68,18 @@ function format_dict(dict) {
   }
   return `{${props.join(', ')}}`;
 }
 
 var divScroller = document.getElementById("inner-scroller");
 var viewport = document.scrollingElement;
 [
   [{left: 800}, 1000, 0],
-  [{top: 1200}, 0, 1000],
-  [{left: 1200, top: 800}, 1000, 1000]
+  [{top: 900}, 0, 1000],
+  [{left: 900, top: 800}, 1000, 1000]
 ].forEach(([input, expectedX, expectedY]) => {
   test(() => {
     divScroller.scrollTo(0, 0);
     assert_equals(divScroller.scrollLeft, 0);
     assert_equals(divScroller.scrollTop, 0);
     if (input.left)
       divScroller.scrollLeft = input.left;
     if (input.top)