Update web-platform-tests to revision a3dd2ad02c65588ad280ceac378d82e9250d1045

This commit is contained in:
WPT Sync Bot 2019-10-23 10:27:05 +00:00
parent e26530341b
commit 15e68ad3d3
171 changed files with 2819 additions and 1841 deletions

View file

@ -140,6 +140,32 @@
}, `Main frame with smooth scroll-behavior ; ${scrollFunction}() with smooth behavior`);
});
[{scrollAttribute: "scrollLeft", scrollValue: elementToRevealLeft}, {scrollAttribute: "scrollTop", scrollValue: elementToRevealTop}].forEach((attributeTest) => {
promise_test(() => {
resetScroll(scrollingElement);
setScrollBehavior(styledElement, "autoBehavior");
assert_equals(scrollingElement.scrollLeft, 0);
assert_equals(scrollingElement.scrollTop, 0);
var expectedValue = Number(attributeTest.scrollValue);
scrollingElement[attributeTest.scrollAttribute] = expectedValue;
assert_equals( scrollingElement[attributeTest.scrollAttribute], expectedValue, "Should set scroll attribute immediately");
return new Promise((resolve) => { resolve(); });
}, `Set ${attributeTest.scrollAttribute} to frame with auto scroll-behavior`);
promise_test(() => {
resetScroll(scrollingElement);
setScrollBehavior(styledElement, "smoothBehavior");
assert_equals(scrollingElement.scrollLeft, 0);
assert_equals(scrollingElement.scrollTop, 0);
var expectedValue = Number(attributeTest.scrollValue);
scrollingElement[attributeTest.scrollAttribute] = expectedValue;
assert_less_than(scrollingElement[attributeTest.scrollAttribute], expectedValue, "Shouldn't set scroll attribute immediately");
return waitForScrollEnd(scrollingElement).then(() => {
assert_equals(scrollingElement[attributeTest.scrollAttribute], expectedValue, "Final value of scroll attribute");
});
}, `Set ${attributeTest.scrollAttribute} to frame with smooth scroll-behavior`);
});
promise_test(() => {
resetScroll(scrollingElement);
setScrollBehavior(styledElement, "smoothBehavior");