summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/scroll-animations
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:50 +0000
commitdef92d1b8e9d373e2f6f27c366d578d97d8960c6 (patch)
tree2ef34b9ad8bb9a9220e05d60352558b15f513894 /testing/web-platform/tests/scroll-animations
parentAdding debian version 125.0.3-1. (diff)
downloadfirefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.tar.xz
firefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.zip
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/scroll-animations')
-rw-r--r--testing/web-platform/tests/scroll-animations/WEB_FEATURES.yml3
-rw-r--r--testing/web-platform/tests/scroll-animations/scroll-timelines/setting-timeline.tentative.html11
-rw-r--r--testing/web-platform/tests/scroll-animations/scroll-timelines/testcommon.js17
3 files changed, 20 insertions, 11 deletions
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);