From 889f73c57f3a9f68b0e44f856cf0daf54aef1d98 Mon Sep 17 00:00:00 2001 From: Jordan Taylor Date: Sat, 15 Feb 2020 10:09:54 +0000 Subject: [PATCH] Bug 1604602 [wpt PR 20816] - Removed exception for setting playback rate on scroll linked animations, a=testonly Automatic update from web-platform-tests Removed exception for setting playback rate on scroll linked animations Initial hold time for scroll-linked animations now accounts for playback rate. Added test for setting playback rate on scroll linked animations Bug: 916117 Change-Id: Ibd7e80ce60346d2f13155b13b8cc14252afc0c3a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1970911 Commit-Queue: Jordan Taylor Reviewed-by: Majid Valipour Cr-Commit-Position: refs/heads/master@{#740882} -- wpt-commits: 7ae382496b65fbf59cf7f320b0e00cc89e56aa18 wpt-pr: 20816 --- .../tests/scroll-animations/scroll-animation.html | 25 +- .../scroll-animations/setting-current-time.html | 25 +- .../scroll-animations/setting-playback-rate.html | 253 +++++++++++++++++++++ .../tests/scroll-animations/testcommon.js | 22 ++ 4 files changed, 277 insertions(+), 48 deletions(-) create mode 100644 testing/web-platform/tests/scroll-animations/setting-playback-rate.html create mode 100644 testing/web-platform/tests/scroll-animations/testcommon.js diff --git a/testing/web-platform/tests/scroll-animations/scroll-animation.html b/testing/web-platform/tests/scroll-animations/scroll-animation.html index bee9e360c591..7a6f87574403 100644 --- a/testing/web-platform/tests/scroll-animations/scroll-animation.html +++ b/testing/web-platform/tests/scroll-animations/scroll-animation.html @@ -4,6 +4,7 @@ + + + + diff --git a/testing/web-platform/tests/scroll-animations/testcommon.js b/testing/web-platform/tests/scroll-animations/testcommon.js new file mode 100644 index 000000000000..ca2596885669 --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/testcommon.js @@ -0,0 +1,22 @@ +function createScroller(test) { + var scroller = createDiv(test); + scroller.innerHTML = "
"; + scroller.classList.add('scroller'); + return scroller; +} + +function createScrollTimeline(test) { + return new ScrollTimeline({ + scrollSource: createScroller(test), + timeRange: 1000 + }); +} + +function createScrollLinkedAnimation(test, timeline) { + if(timeline === undefined) + timeline = createScrollTimeline(test); + const DURATION = 1000; // ms + const KEYFRAMES = { opacity: [1, 0] }; + return new Animation( + new KeyframeEffect(createDiv(test), KEYFRAMES, DURATION), timeline); +} -- 2.11.4.GIT