Update web-platform-tests to revision cf261625e2d230ab219eec966f4abe26e3401b64

This commit is contained in:
WPT Sync Bot 2018-05-29 21:17:45 -04:00
parent 11a89bcc47
commit 8f98acd0e7
297 changed files with 3396 additions and 1555 deletions

View file

@ -45,13 +45,13 @@ 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");
@ -59,13 +59,13 @@ 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");
@ -73,13 +73,13 @@ 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");
@ -87,15 +87,15 @@ 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>
</script>