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

@ -141,6 +141,32 @@
}, `Subframe 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 ${attributeTest.scrollAttribute} immediately`);
return new Promise((resolve) => { resolve(); });
}, `Subframe setting ${attributeTest.scrollAttribute} 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, `Should not set ${attributeTest.scrollAttribute} immediately`);
return waitForScrollEnd(scrollingElement).then(() => {
assert_equals(scrollingElement[attributeTest.scrollAttribute], expectedValue, `Final value of ${attributeTest.scrollAttribute}`);
});
}, `Subframe setting ${attributeTest.scrollAttribute} with smooth scroll-behavior`);
});
promise_test(() => {
resetScroll(scrollingElement);
setScrollBehavior(styledElement, "smoothBehavior");
@ -164,7 +190,7 @@
return waitForScrollEnd(scrollingElement).then(() => {
assert_equals(scrollingElement.scrollLeft, 0, "Final value of scrollLeft");
assert_equals(scrollingElement.scrollTop, 0, "Final value of scrollTop");
});
}, "Aborting an ongoing smooth scrolling on a subframe with an instant scrolling");
});
}, "Aborting an ongoing smooth scrolling on a subframe with an instant scrolling");
}));
</script>