Bug 1461151 [wpt PR 10975] - Add descriptions to scrollIntoView-smooth asserts, a=testonly
authorStian Didriksen <stipsan@gmail.com>
Wed, 06 Jun 2018 16:39:51 +0000
changeset 422213 8fa94bcb9b7c292ea9a48629b7224512d643ae8a
parent 422212 3d7d065aa3e436d9078f2c93e213fa9947d2215d
child 422214 71be36067809fa8ab2310620734bc09a762cb96b
push id34122
push userebalazs@mozilla.com
push dateMon, 11 Jun 2018 09:37:00 +0000
treeherdermozilla-central@9941eb8c3b29 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1461151, 10975
milestone62.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 1461151 [wpt PR 10975] - Add descriptions to scrollIntoView-smooth asserts, a=testonly Automatic update from web-platform-testsAdd descriptions to scrollIntoView-smooth asserts Without it you can't tell wether it was the `scrollX` or `scrollY` that failed without modifying the test. -- wpt-commits: cf261625e2d230ab219eec966f4abe26e3401b64 wpt-pr: 10975
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/css/cssom-view/scrollIntoView-smooth.html
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -540725,17 +540725,17 @@
    "cc6309f95e1d053aea7b1b5ac97fee219970f852",
    "testharness"
   ],
   "css/cssom-view/scrollIntoView-shadow.html": [
    "17543f0228c100f1d9def2b28ff58a0e80207c6f",
    "testharness"
   ],
   "css/cssom-view/scrollIntoView-smooth.html": [
-   "0561564f185dcaf2ad3a8e14e081efb3c2c273e3",
+   "7461663514681b85aaa1b2be6e2e2807c71a9e51",
    "testharness"
   ],
   "css/cssom-view/scrollTop-display-change-ref.html": [
    "bb9079ba597cbcc27604cf8cc5556b4e6e0cda93",
    "support"
   ],
   "css/cssom-view/scrollTop-display-change.html": [
    "68d33e9669be4db95ea9016a8893212e588189fd",
--- a/testing/web-platform/tests/css/cssom-view/scrollIntoView-smooth.html
+++ b/testing/web-platform/tests/css/cssom-view/scrollIntoView-smooth.html
@@ -40,62 +40,62 @@ function waitForScrollEnd() {
 
 // When testing manually, we need an additional frame at beginning
 // to trigger the effect.
 requestAnimationFrame(() => {
 promise_test(t => {
   window.scrollTo(0, 0);
   var expected_x = content.offsetLeft + content_width - window_width;
   var expected_y = content.offsetTop + content_height - window_height;
-  assert_not_equals(window.scrollX, expected_x);
-  assert_not_equals(window.scrollY, expected_y);
+  assert_not_equals(window.scrollX, expected_x, "scrollX");
+  assert_not_equals(window.scrollY, expected_y, "scrollY");
   content.scrollIntoView({behavior: "smooth", block: "nearest", inline:
 "nearest"});
   return waitForScrollEnd().then(() => {
-    assert_approx_equals(window.scrollX, expected_x, 1);
-    assert_approx_equals(window.scrollY, expected_y, 1);
+    assert_approx_equals(window.scrollX, expected_x, 1, "scrollX");
+    assert_approx_equals(window.scrollY, expected_y, 1, "scrollY");
   });
 }, "Smooth scrollIntoView should scroll the element to the 'nearest' position");
 
 promise_test(t => {
   window.scrollTo(0, 0);
   var expected_x = content.offsetLeft;
   var expected_y = content.offsetTop;
-  assert_not_equals(window.scrollX, expected_x);
-  assert_not_equals(window.scrollY, expected_y);
+  assert_not_equals(window.scrollX, expected_x, "scrollX");
+  assert_not_equals(window.scrollY, expected_y, "scrollY");
   content.scrollIntoView({behavior: "smooth", block: "start", inline:
 "start"});
   return waitForScrollEnd().then(() => {
-    assert_approx_equals(window.scrollX, expected_x, 1);
-    assert_approx_equals(window.scrollY, expected_y, 1);
+    assert_approx_equals(window.scrollX, expected_x, 1, "scrollX");
+    assert_approx_equals(window.scrollY, expected_y, 1, "scrollY");
   });
 }, "Smooth scrollIntoView should scroll the element to the 'start' position");
 
 promise_test(t => {
   window.scrollTo(0, 0);
   var expected_x = content.offsetLeft + (content_width - window_width) / 2;
   var expected_y = content.offsetTop + (content_height - window_height) / 2;
-  assert_not_equals(window.scrollX, expected_x);
-  assert_not_equals(window.scrollY, expected_y);
+  assert_not_equals(window.scrollX, expected_x, "scrollX");
+  assert_not_equals(window.scrollY, expected_y, "scrollY");
   content.scrollIntoView({behavior: "smooth", block: "center", inline:
 "center"});
   return waitForScrollEnd().then(() => {
-    assert_approx_equals(window.scrollX, expected_x, 1);
-    assert_approx_equals(window.scrollY, expected_y, 1);
+    assert_approx_equals(window.scrollX, expected_x, 1, "scrollX");
+    assert_approx_equals(window.scrollY, expected_y, 1, "scrollY");
   });
 }, "Smooth scrollIntoView should scroll the element to the 'center' position");
 
 promise_test(t => {
   window.scrollTo(0, 0);
   var expected_x = content.offsetLeft + content_width - window_width;
   var expected_y = content.offsetTop + content_height - window_height;
-  assert_not_equals(window.scrollX, expected_x);
-  assert_not_equals(window.scrollY, expected_y);
+  assert_not_equals(window.scrollX, expected_x, "scrollX");
+  assert_not_equals(window.scrollY, expected_y, "scrollY");
   content.scrollIntoView({behavior: "smooth", block: "end", inline:
 "end"});
   return waitForScrollEnd().then(() => {
-    assert_approx_equals(window.scrollX, expected_x, 1);
-    assert_approx_equals(window.scrollY, expected_y, 1);
+    assert_approx_equals(window.scrollX, expected_x, 1, "scrollX");
+    assert_approx_equals(window.scrollY, expected_y, 1, "scrollY");
   });
 }, "Smooth scrollIntoView should scroll the element to the 'end' position");
 
 });
-</script>
\ No newline at end of file
+</script>