From def92d1b8e9d373e2f6f27c366d578d97d8960c6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 15 May 2024 05:34:50 +0200 Subject: Merging upstream version 126.0. Signed-off-by: Daniel Baumann --- .../tests/scroll-animations/WEB_FEATURES.yml | 3 +++ .../scroll-timelines/setting-timeline.tentative.html | 11 ----------- .../scroll-animations/scroll-timelines/testcommon.js | 17 +++++++++++++++++ 3 files changed, 20 insertions(+), 11 deletions(-) create mode 100644 testing/web-platform/tests/scroll-animations/WEB_FEATURES.yml (limited to 'testing/web-platform/tests/scroll-animations') diff --git a/testing/web-platform/tests/scroll-animations/WEB_FEATURES.yml b/testing/web-platform/tests/scroll-animations/WEB_FEATURES.yml new file mode 100644 index 0000000000..adf4bf2ac1 --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/WEB_FEATURES.yml @@ -0,0 +1,3 @@ +features: +- name: scroll-driven-animations + files: "**" diff --git a/testing/web-platform/tests/scroll-animations/scroll-timelines/setting-timeline.tentative.html b/testing/web-platform/tests/scroll-animations/scroll-timelines/setting-timeline.tentative.html index 5813de60fa..5502e13367 100644 --- a/testing/web-platform/tests/scroll-animations/scroll-timelines/setting-timeline.tentative.html +++ b/testing/web-platform/tests/scroll-animations/scroll-timelines/setting-timeline.tentative.html @@ -98,17 +98,6 @@ function assert_paused_times(animation, timeline_current_time, } } -function createViewTimeline(t) { - const parent = document.querySelector('.scroller'); - const elem = document.createElement('div'); - elem.id = 'target'; - t.add_cleanup(() => { - elem.remove(); - }); - parent.appendChild(elem); - return new ViewTimeline({ subject: elem }); -} - promise_test(async t => { const scrollTimeline = createScrollTimeline(t); await updateScrollPosition(scrollTimeline, 100); diff --git a/testing/web-platform/tests/scroll-animations/scroll-timelines/testcommon.js b/testing/web-platform/tests/scroll-animations/scroll-timelines/testcommon.js index 97e81f494c..88021409f1 100644 --- a/testing/web-platform/tests/scroll-animations/scroll-timelines/testcommon.js +++ b/testing/web-platform/tests/scroll-animations/scroll-timelines/testcommon.js @@ -85,6 +85,23 @@ function createScrollLinkedAnimationWithTiming(test, timing, timeline) { new KeyframeEffect(createDiv(test), KEYFRAMES, timing), timeline); } +function createViewTimeline(t) { + const parent = document.querySelector('.scroller'); + const elem = document.createElement('div'); + elem.id = 'target'; + t.add_cleanup(() => { + elem.remove(); + }); + parent.appendChild(elem); + return new ViewTimeline({ subject: elem }); +} + +function createAnimation(t) { + const elem = createDiv(t); + const animation = elem.animate({ opacity: [1, 0] }, 1000); + return animation; +} + function assert_approx_equals_or_null(actual, expected, tolerance, name) { if (actual === null || expected === null){ assert_equals(actual, expected, name); -- cgit v1.2.3