From 36d22d82aa202bb199967e9512281e9a53db42c9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 21:33:14 +0200 Subject: Adding upstream version 115.7.0esr. Signed-off-by: Daniel Baumann --- .../scroll-timelines/animation-ref.html | 45 ++ .../animation-with-animatable-interface.html | 66 +++ .../animation-with-delay-crash.html | 31 ++ .../animation-with-display-none.html | 75 +++ .../animation-with-offsets-crash.html | 32 ++ .../animation-with-overflow-hidden-ref.html | 45 ++ .../animation-with-overflow-hidden.html | 64 +++ .../animation-with-root-scroller-ref.html | 37 ++ .../animation-with-root-scroller.html | 60 ++ .../scroll-timelines/animation-with-transform.html | 68 +++ .../scroll-timelines/cancel-animation.html | 214 ++++++++ .../scroll-timelines/constructor-no-document.html | 19 + .../scroll-timelines/constructor.html | 95 ++++ .../scroll-timelines/current-time-nan.html | 80 +++ .../current-time-root-scroller.html | 49 ++ .../current-time-writing-modes.html | 148 +++++ .../scroll-timelines/effect-updateTiming.html | 602 +++++++++++++++++++++ .../scroll-timelines/finish-animation.html | 449 +++++++++++++++ .../scroll-timelines/idlharness.window.js | 16 + ...ayout-changes-on-percentage-based-timeline.html | 84 +++ .../scroll-timelines/null-scroll-source-crash.html | 24 + .../scroll-timelines/pause-animation.html | 210 +++++++ .../scroll-timelines/play-animation.html | 233 ++++++++ .../progress-based-effect-delay-ref.html | 45 ++ .../progress-based-effect-delay.tentative.html | 69 +++ .../scroll-timelines/reverse-animation.html | 240 ++++++++ ...roll-animation-effect-fill-modes.tentative.html | 137 +++++ .../scroll-animation-effect-phases.tentative.html | 480 ++++++++++++++++ .../scroll-animation-inactive-timeline.html | 170 ++++++ .../scroll-timelines/scroll-animation.html | 216 ++++++++ .../scroll-timeline-in-removed-iframe-crash.html | 20 + .../scroll-timeline-invalidation.html | 153 ++++++ .../scroll-timeline-snapshotting.html | 44 ++ .../set-current-time-before-play.html | 69 +++ .../scroll-timelines/setting-current-time.html | 286 ++++++++++ .../scroll-timelines/setting-playback-rate.html | 323 +++++++++++ .../scroll-timelines/setting-start-time.html | 439 +++++++++++++++ .../setting-timeline.tentative.html | 394 ++++++++++++++ .../scroll-timelines/source-quirks-mode.html | 36 ++ .../scroll-timelines/testcommon.js | 124 +++++ ...-attach-to-same-scroll-timeline-cancel-one.html | 84 +++ ...-animations-attach-to-same-scroll-timeline.html | 79 +++ .../scroll-timelines/update-playback-rate.html | 181 +++++++ .../updating-the-finished-state.html | 565 +++++++++++++++++++ 44 files changed, 6900 insertions(+) create mode 100644 testing/web-platform/tests/scroll-animations/scroll-timelines/animation-ref.html create mode 100644 testing/web-platform/tests/scroll-animations/scroll-timelines/animation-with-animatable-interface.html create mode 100644 testing/web-platform/tests/scroll-animations/scroll-timelines/animation-with-delay-crash.html create mode 100644 testing/web-platform/tests/scroll-animations/scroll-timelines/animation-with-display-none.html create mode 100644 testing/web-platform/tests/scroll-animations/scroll-timelines/animation-with-offsets-crash.html create mode 100644 testing/web-platform/tests/scroll-animations/scroll-timelines/animation-with-overflow-hidden-ref.html create mode 100644 testing/web-platform/tests/scroll-animations/scroll-timelines/animation-with-overflow-hidden.html create mode 100644 testing/web-platform/tests/scroll-animations/scroll-timelines/animation-with-root-scroller-ref.html create mode 100644 testing/web-platform/tests/scroll-animations/scroll-timelines/animation-with-root-scroller.html create mode 100644 testing/web-platform/tests/scroll-animations/scroll-timelines/animation-with-transform.html create mode 100644 testing/web-platform/tests/scroll-animations/scroll-timelines/cancel-animation.html create mode 100644 testing/web-platform/tests/scroll-animations/scroll-timelines/constructor-no-document.html create mode 100644 testing/web-platform/tests/scroll-animations/scroll-timelines/constructor.html create mode 100644 testing/web-platform/tests/scroll-animations/scroll-timelines/current-time-nan.html create mode 100644 testing/web-platform/tests/scroll-animations/scroll-timelines/current-time-root-scroller.html create mode 100644 testing/web-platform/tests/scroll-animations/scroll-timelines/current-time-writing-modes.html create mode 100644 testing/web-platform/tests/scroll-animations/scroll-timelines/effect-updateTiming.html create mode 100644 testing/web-platform/tests/scroll-animations/scroll-timelines/finish-animation.html create mode 100644 testing/web-platform/tests/scroll-animations/scroll-timelines/idlharness.window.js create mode 100644 testing/web-platform/tests/scroll-animations/scroll-timelines/layout-changes-on-percentage-based-timeline.html create mode 100644 testing/web-platform/tests/scroll-animations/scroll-timelines/null-scroll-source-crash.html create mode 100644 testing/web-platform/tests/scroll-animations/scroll-timelines/pause-animation.html create mode 100644 testing/web-platform/tests/scroll-animations/scroll-timelines/play-animation.html create mode 100644 testing/web-platform/tests/scroll-animations/scroll-timelines/progress-based-effect-delay-ref.html create mode 100644 testing/web-platform/tests/scroll-animations/scroll-timelines/progress-based-effect-delay.tentative.html create mode 100644 testing/web-platform/tests/scroll-animations/scroll-timelines/reverse-animation.html create mode 100644 testing/web-platform/tests/scroll-animations/scroll-timelines/scroll-animation-effect-fill-modes.tentative.html create mode 100644 testing/web-platform/tests/scroll-animations/scroll-timelines/scroll-animation-effect-phases.tentative.html create mode 100644 testing/web-platform/tests/scroll-animations/scroll-timelines/scroll-animation-inactive-timeline.html create mode 100644 testing/web-platform/tests/scroll-animations/scroll-timelines/scroll-animation.html create mode 100644 testing/web-platform/tests/scroll-animations/scroll-timelines/scroll-timeline-in-removed-iframe-crash.html create mode 100644 testing/web-platform/tests/scroll-animations/scroll-timelines/scroll-timeline-invalidation.html create mode 100644 testing/web-platform/tests/scroll-animations/scroll-timelines/scroll-timeline-snapshotting.html create mode 100644 testing/web-platform/tests/scroll-animations/scroll-timelines/set-current-time-before-play.html create mode 100644 testing/web-platform/tests/scroll-animations/scroll-timelines/setting-current-time.html create mode 100644 testing/web-platform/tests/scroll-animations/scroll-timelines/setting-playback-rate.html create mode 100644 testing/web-platform/tests/scroll-animations/scroll-timelines/setting-start-time.html create mode 100644 testing/web-platform/tests/scroll-animations/scroll-timelines/setting-timeline.tentative.html create mode 100644 testing/web-platform/tests/scroll-animations/scroll-timelines/source-quirks-mode.html create mode 100644 testing/web-platform/tests/scroll-animations/scroll-timelines/testcommon.js create mode 100644 testing/web-platform/tests/scroll-animations/scroll-timelines/two-animations-attach-to-same-scroll-timeline-cancel-one.html create mode 100644 testing/web-platform/tests/scroll-animations/scroll-timelines/two-animations-attach-to-same-scroll-timeline.html create mode 100644 testing/web-platform/tests/scroll-animations/scroll-timelines/update-playback-rate.html create mode 100644 testing/web-platform/tests/scroll-animations/scroll-timelines/updating-the-finished-state.html (limited to 'testing/web-platform/tests/scroll-animations/scroll-timelines') diff --git a/testing/web-platform/tests/scroll-animations/scroll-timelines/animation-ref.html b/testing/web-platform/tests/scroll-animations/scroll-timelines/animation-ref.html new file mode 100644 index 0000000000..9158715321 --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/scroll-timelines/animation-ref.html @@ -0,0 +1,45 @@ + +Reference for Web Animation with scroll timeline tests + + +
+
+
+
+
+ + diff --git a/testing/web-platform/tests/scroll-animations/scroll-timelines/animation-with-animatable-interface.html b/testing/web-platform/tests/scroll-animations/scroll-timelines/animation-with-animatable-interface.html new file mode 100644 index 0000000000..b04aaf2d33 --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/scroll-timelines/animation-with-animatable-interface.html @@ -0,0 +1,66 @@ + +Scroll-linked animation with Animatable interface + + + + + + + + + +
+
+
+

Scrolling Contents

+
+ + diff --git a/testing/web-platform/tests/scroll-animations/scroll-timelines/animation-with-delay-crash.html b/testing/web-platform/tests/scroll-animations/scroll-timelines/animation-with-delay-crash.html new file mode 100644 index 0000000000..9d821f9e20 --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/scroll-timelines/animation-with-delay-crash.html @@ -0,0 +1,31 @@ + + + +
+
+
+ diff --git a/testing/web-platform/tests/scroll-animations/scroll-timelines/animation-with-display-none.html b/testing/web-platform/tests/scroll-animations/scroll-timelines/animation-with-display-none.html new file mode 100644 index 0000000000..a62916833c --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/scroll-timelines/animation-with-display-none.html @@ -0,0 +1,75 @@ + +Scroll timeline with Web Animation and transition from display:none to display:block + + + + + + + + + +
+
+
+

Scrolling Contents

+
+ + diff --git a/testing/web-platform/tests/scroll-animations/scroll-timelines/animation-with-offsets-crash.html b/testing/web-platform/tests/scroll-animations/scroll-timelines/animation-with-offsets-crash.html new file mode 100644 index 0000000000..d4d1a55214 --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/scroll-timelines/animation-with-offsets-crash.html @@ -0,0 +1,32 @@ + + + +
+
+
+ diff --git a/testing/web-platform/tests/scroll-animations/scroll-timelines/animation-with-overflow-hidden-ref.html b/testing/web-platform/tests/scroll-animations/scroll-timelines/animation-with-overflow-hidden-ref.html new file mode 100644 index 0000000000..c045f1a1c9 --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/scroll-timelines/animation-with-overflow-hidden-ref.html @@ -0,0 +1,45 @@ + +Scroll timeline with Web Animation using a scroller with overflow hidden + + +
+
+
+
+
+ + diff --git a/testing/web-platform/tests/scroll-animations/scroll-timelines/animation-with-overflow-hidden.html b/testing/web-platform/tests/scroll-animations/scroll-timelines/animation-with-overflow-hidden.html new file mode 100644 index 0000000000..bc7611d05a --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/scroll-timelines/animation-with-overflow-hidden.html @@ -0,0 +1,64 @@ + +Scroll timeline with Web Animation using a scroller with overflow hidden + + + + + + + + + +
+
+
+
+
+ + diff --git a/testing/web-platform/tests/scroll-animations/scroll-timelines/animation-with-root-scroller-ref.html b/testing/web-platform/tests/scroll-animations/scroll-timelines/animation-with-root-scroller-ref.html new file mode 100644 index 0000000000..58435be631 --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/scroll-timelines/animation-with-root-scroller-ref.html @@ -0,0 +1,37 @@ + +Reference for Scroll timeline with Web Animation using the root scroller + + +
+

Covered Contents

+ + diff --git a/testing/web-platform/tests/scroll-animations/scroll-timelines/animation-with-root-scroller.html b/testing/web-platform/tests/scroll-animations/scroll-timelines/animation-with-root-scroller.html new file mode 100644 index 0000000000..6ba1a22445 --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/scroll-timelines/animation-with-root-scroller.html @@ -0,0 +1,60 @@ + +Scroll timeline with Web Animation using the root scroller + + + + + + + + + +
+

Covered Contents

+ + diff --git a/testing/web-platform/tests/scroll-animations/scroll-timelines/animation-with-transform.html b/testing/web-platform/tests/scroll-animations/scroll-timelines/animation-with-transform.html new file mode 100644 index 0000000000..f741cc634d --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/scroll-timelines/animation-with-transform.html @@ -0,0 +1,68 @@ + +Basic use of scroll timeline with Web Animation + + + + + + + + + +
+
+
+

Scrolling Contents

+
+ + diff --git a/testing/web-platform/tests/scroll-animations/scroll-timelines/cancel-animation.html b/testing/web-platform/tests/scroll-animations/scroll-timelines/cancel-animation.html new file mode 100644 index 0000000000..7daf76a7a5 --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/scroll-timelines/cancel-animation.html @@ -0,0 +1,214 @@ + + +Canceling an animation + + + + + + + + + diff --git a/testing/web-platform/tests/scroll-animations/scroll-timelines/constructor-no-document.html b/testing/web-platform/tests/scroll-animations/scroll-timelines/constructor-no-document.html new file mode 100644 index 0000000000..d2cc590bc7 --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/scroll-timelines/constructor-no-document.html @@ -0,0 +1,19 @@ + + +ScrollTimeline constructor - no document + + + + + diff --git a/testing/web-platform/tests/scroll-animations/scroll-timelines/constructor.html b/testing/web-platform/tests/scroll-animations/scroll-timelines/constructor.html new file mode 100644 index 0000000000..8e211efa11 --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/scroll-timelines/constructor.html @@ -0,0 +1,95 @@ + + +ScrollTimeline constructor + + + + + + +
+
+
+ + diff --git a/testing/web-platform/tests/scroll-animations/scroll-timelines/current-time-nan.html b/testing/web-platform/tests/scroll-animations/scroll-timelines/current-time-nan.html new file mode 100644 index 0000000000..440b1f413e --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/scroll-timelines/current-time-nan.html @@ -0,0 +1,80 @@ + + +ScrollTimeline current time algorithm - NaN cases + + + + + + +
+
+
+ + + + + + + +
+
+
+ diff --git a/testing/web-platform/tests/scroll-animations/scroll-timelines/current-time-root-scroller.html b/testing/web-platform/tests/scroll-animations/scroll-timelines/current-time-root-scroller.html new file mode 100644 index 0000000000..be1d62bec5 --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/scroll-timelines/current-time-root-scroller.html @@ -0,0 +1,49 @@ + + +ScrollTimeline current time algorithm - root scroller + + + + + + + + + diff --git a/testing/web-platform/tests/scroll-animations/scroll-timelines/current-time-writing-modes.html b/testing/web-platform/tests/scroll-animations/scroll-timelines/current-time-writing-modes.html new file mode 100644 index 0000000000..d18abcd48f --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/scroll-timelines/current-time-writing-modes.html @@ -0,0 +1,148 @@ + + +ScrollTimeline current time algorithm - interaction with writing modes + + + + + + + + + diff --git a/testing/web-platform/tests/scroll-animations/scroll-timelines/effect-updateTiming.html b/testing/web-platform/tests/scroll-animations/scroll-timelines/effect-updateTiming.html new file mode 100644 index 0000000000..78ec8e1de5 --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/scroll-timelines/effect-updateTiming.html @@ -0,0 +1,602 @@ + + +Scroll based animation: AnimationEffect.updateTiming + + + + + + + + + + +
+ + diff --git a/testing/web-platform/tests/scroll-animations/scroll-timelines/finish-animation.html b/testing/web-platform/tests/scroll-animations/scroll-timelines/finish-animation.html new file mode 100644 index 0000000000..fd768651b4 --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/scroll-timelines/finish-animation.html @@ -0,0 +1,449 @@ + + +Finishing an animation + + + + + + + +
+ + diff --git a/testing/web-platform/tests/scroll-animations/scroll-timelines/idlharness.window.js b/testing/web-platform/tests/scroll-animations/scroll-timelines/idlharness.window.js new file mode 100644 index 0000000000..90157580ce --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/scroll-timelines/idlharness.window.js @@ -0,0 +1,16 @@ +// META: script=/resources/WebIDLParser.js +// META: script=/resources/idlharness.js + +'use strict'; + +idl_test( + ['scroll-animations'], + // The css-pseudo dependency shouldn't be necessary, but is: + // https://github.com/web-platform-tests/wpt/issues/12574 + ['web-animations', 'css-pseudo', 'dom'], + idl_array => { + idl_array.add_objects({ + ScrollTimeline: ['new ScrollTimeline()'], + }); + } +); diff --git a/testing/web-platform/tests/scroll-animations/scroll-timelines/layout-changes-on-percentage-based-timeline.html b/testing/web-platform/tests/scroll-animations/scroll-timelines/layout-changes-on-percentage-based-timeline.html new file mode 100644 index 0000000000..c5a46a501e --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/scroll-timelines/layout-changes-on-percentage-based-timeline.html @@ -0,0 +1,84 @@ + +Layout changes on percentage-based scroll timeline + + + + + + + + + +
+
Scrolling Test
+
+
+ +
+ + diff --git a/testing/web-platform/tests/scroll-animations/scroll-timelines/null-scroll-source-crash.html b/testing/web-platform/tests/scroll-animations/scroll-timelines/null-scroll-source-crash.html new file mode 100644 index 0000000000..53ad0d9285 --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/scroll-timelines/null-scroll-source-crash.html @@ -0,0 +1,24 @@ + + + + + +
+ \ No newline at end of file diff --git a/testing/web-platform/tests/scroll-animations/scroll-timelines/pause-animation.html b/testing/web-platform/tests/scroll-animations/scroll-timelines/pause-animation.html new file mode 100644 index 0000000000..9b263f843d --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/scroll-timelines/pause-animation.html @@ -0,0 +1,210 @@ + + +Pausing an animation + + + + + + + + + diff --git a/testing/web-platform/tests/scroll-animations/scroll-timelines/play-animation.html b/testing/web-platform/tests/scroll-animations/scroll-timelines/play-animation.html new file mode 100644 index 0000000000..d408547f55 --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/scroll-timelines/play-animation.html @@ -0,0 +1,233 @@ + + +Playing an animation + + + + + + + + + diff --git a/testing/web-platform/tests/scroll-animations/scroll-timelines/progress-based-effect-delay-ref.html b/testing/web-platform/tests/scroll-animations/scroll-timelines/progress-based-effect-delay-ref.html new file mode 100644 index 0000000000..59366a88dd --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/scroll-timelines/progress-based-effect-delay-ref.html @@ -0,0 +1,45 @@ + +Reference for Web Animation with scroll timeline and effect delay tests + + +
+
+
+
+
+ + diff --git a/testing/web-platform/tests/scroll-animations/scroll-timelines/progress-based-effect-delay.tentative.html b/testing/web-platform/tests/scroll-animations/scroll-timelines/progress-based-effect-delay.tentative.html new file mode 100644 index 0000000000..525d8448ff --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/scroll-timelines/progress-based-effect-delay.tentative.html @@ -0,0 +1,69 @@ + +Animation effect delays should be accounted for when using a progress based timeline + + + + + + + + + +
+
+
+

Scrolling Contents

+
+ diff --git a/testing/web-platform/tests/scroll-animations/scroll-timelines/reverse-animation.html b/testing/web-platform/tests/scroll-animations/scroll-timelines/reverse-animation.html new file mode 100644 index 0000000000..cf6173b60a --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/scroll-timelines/reverse-animation.html @@ -0,0 +1,240 @@ + + +Reversing an animation + + + + + + + + + diff --git a/testing/web-platform/tests/scroll-animations/scroll-timelines/scroll-animation-effect-fill-modes.tentative.html b/testing/web-platform/tests/scroll-animations/scroll-timelines/scroll-animation-effect-fill-modes.tentative.html new file mode 100644 index 0000000000..b9cc154676 --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/scroll-timelines/scroll-animation-effect-fill-modes.tentative.html @@ -0,0 +1,137 @@ + + +Verify applied effect output for all fill modes in all timeline states: before start, at start, in range, at end, after end while using various effect delay values + + + + + + +
+ diff --git a/testing/web-platform/tests/scroll-animations/scroll-timelines/scroll-animation-effect-phases.tentative.html b/testing/web-platform/tests/scroll-animations/scroll-timelines/scroll-animation-effect-phases.tentative.html new file mode 100644 index 0000000000..5ded56bbf7 --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/scroll-timelines/scroll-animation-effect-phases.tentative.html @@ -0,0 +1,480 @@ + + +Verify timeline time, animation time, effect time, and effect progress for all timeline states: before start, at start, in range, at end, after end while using various effect delay values + + + + + + +
+ diff --git a/testing/web-platform/tests/scroll-animations/scroll-timelines/scroll-animation-inactive-timeline.html b/testing/web-platform/tests/scroll-animations/scroll-timelines/scroll-animation-inactive-timeline.html new file mode 100644 index 0000000000..236452eead --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/scroll-timelines/scroll-animation-inactive-timeline.html @@ -0,0 +1,170 @@ + + +Test basic functionality of scroll linked animation. + + + + + +
+ diff --git a/testing/web-platform/tests/scroll-animations/scroll-timelines/scroll-animation.html b/testing/web-platform/tests/scroll-animations/scroll-timelines/scroll-animation.html new file mode 100644 index 0000000000..bc7ab4a476 --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/scroll-timelines/scroll-animation.html @@ -0,0 +1,216 @@ + + +Test basic functionality of scroll linked animation. + + + + + +
+ diff --git a/testing/web-platform/tests/scroll-animations/scroll-timelines/scroll-timeline-in-removed-iframe-crash.html b/testing/web-platform/tests/scroll-animations/scroll-timelines/scroll-timeline-in-removed-iframe-crash.html new file mode 100644 index 0000000000..07edbd83f1 --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/scroll-timelines/scroll-timeline-in-removed-iframe-crash.html @@ -0,0 +1,20 @@ + + + + + + Starting an animation with a scroll timeline in a removed iframe + should not crash + + +
+ + + + diff --git a/testing/web-platform/tests/scroll-animations/scroll-timelines/scroll-timeline-invalidation.html b/testing/web-platform/tests/scroll-animations/scroll-timelines/scroll-timeline-invalidation.html new file mode 100644 index 0000000000..0b9e10c984 --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/scroll-timelines/scroll-timeline-invalidation.html @@ -0,0 +1,153 @@ + + +ScrollTimeline invalidation + + + + + + +
+ + diff --git a/testing/web-platform/tests/scroll-animations/scroll-timelines/scroll-timeline-snapshotting.html b/testing/web-platform/tests/scroll-animations/scroll-timelines/scroll-timeline-snapshotting.html new file mode 100644 index 0000000000..1e43699d5b --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/scroll-timelines/scroll-timeline-snapshotting.html @@ -0,0 +1,44 @@ + + +ScrollTimeline snapshotting + + + + + + + + + + +
+ + diff --git a/testing/web-platform/tests/scroll-animations/scroll-timelines/set-current-time-before-play.html b/testing/web-platform/tests/scroll-animations/scroll-timelines/set-current-time-before-play.html new file mode 100644 index 0000000000..cd3faeeee4 --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/scroll-timelines/set-current-time-before-play.html @@ -0,0 +1,69 @@ + +Setting current time before play should not timeout + + + + + + + + + +
+
+
+
+
+ + diff --git a/testing/web-platform/tests/scroll-animations/scroll-timelines/setting-current-time.html b/testing/web-platform/tests/scroll-animations/scroll-timelines/setting-current-time.html new file mode 100644 index 0000000000..f6c826db69 --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/scroll-timelines/setting-current-time.html @@ -0,0 +1,286 @@ + + +Setting the current time of an animation + + + + + + + +
+ + diff --git a/testing/web-platform/tests/scroll-animations/scroll-timelines/setting-playback-rate.html b/testing/web-platform/tests/scroll-animations/scroll-timelines/setting-playback-rate.html new file mode 100644 index 0000000000..4d6fecae05 --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/scroll-timelines/setting-playback-rate.html @@ -0,0 +1,323 @@ + + +Setting the playback rate of an animation that is using a ScrollTimeline + + + + + + + + + diff --git a/testing/web-platform/tests/scroll-animations/scroll-timelines/setting-start-time.html b/testing/web-platform/tests/scroll-animations/scroll-timelines/setting-start-time.html new file mode 100644 index 0000000000..d506df65bf --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/scroll-timelines/setting-start-time.html @@ -0,0 +1,439 @@ + + +Setting the start time of scroll animation + + + + + + + +
+ + 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 new file mode 100644 index 0000000000..34d9af2bff --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/scroll-timelines/setting-timeline.tentative.html @@ -0,0 +1,394 @@ + + +Setting the timeline of scroll animation + + + + + + + + + diff --git a/testing/web-platform/tests/scroll-animations/scroll-timelines/source-quirks-mode.html b/testing/web-platform/tests/scroll-animations/scroll-timelines/source-quirks-mode.html new file mode 100644 index 0000000000..17e95a0519 --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/scroll-timelines/source-quirks-mode.html @@ -0,0 +1,36 @@ + + + + ScrollTimeline default source in quirks mode + + + + + + + + diff --git a/testing/web-platform/tests/scroll-animations/scroll-timelines/testcommon.js b/testing/web-platform/tests/scroll-animations/scroll-timelines/testcommon.js new file mode 100644 index 0000000000..97e81f494c --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/scroll-timelines/testcommon.js @@ -0,0 +1,124 @@ +'use strict'; + +// Builds a generic structure that looks like: +// +//
// 100x100 viewport +//
// 500x500 +//
+// +// The |scrollerOverrides| and |contentOverrides| parameters are maps which +// are applied to the scroller and contents style after basic setup. +// +// Appends the outer 'scroller' element to the document body, and returns it. +function setupScrollTimelineTest( + scrollerOverrides = new Map(), contentOverrides = new Map()) { + let scroller = document.createElement('div'); + scroller.style.width = '100px'; + scroller.style.height = '100px'; + // Hide the scrollbars, but maintain the ability to scroll. This setting + // ensures that variability in scrollbar sizing does not contribute to test + // failures or flakes. + scroller.style.overflow = 'hidden'; + for (const [key, value] of scrollerOverrides) { + scroller.style[key] = value; + } + + let contents = document.createElement('div'); + contents.style.width = '500px'; + contents.style.height = '500px'; + for (const [key, value] of contentOverrides) { + contents.style[key] = value; + } + + scroller.appendChild(contents); + document.body.appendChild(scroller); + return scroller; +} + +// Helper method to calculate the current time, implementing only step 5 of +// https://wicg.github.io/scroll-animations/#current-time-algorithm +function calculateCurrentTime( + currentScrollOffset, startScrollOffset, endScrollOffset) { + return ((currentScrollOffset - startScrollOffset) / + (endScrollOffset - startScrollOffset)) * + 100; +} + +function createScroller(test) { + var scroller = createDiv(test); + scroller.innerHTML = "
"; + scroller.classList.add('scroller'); + // Trigger layout run. + scroller.scrollTop; + return scroller; +} + +function createScrollerWithStartAndEnd(test, orientationClass = 'vertical') { + var scroller = createDiv(test); + scroller.innerHTML = + `
+
+
+
`; + scroller.classList.add('scroller'); + scroller.classList.add(orientationClass); + + return scroller; +} + +function createScrollTimeline(test, options) { + options = options || { + source: createScroller(test) + } + return new ScrollTimeline(options); +} + +function createScrollLinkedAnimation(test, timeline) { + return createScrollLinkedAnimationWithTiming(test, /* duration in ms*/ 1000, timeline); +} + +function createScrollLinkedAnimationWithTiming(test, timing, timeline) { + if (timeline === undefined) + timeline = createScrollTimeline(test); + const KEYFRAMES = { opacity: [0, 1] }; + return new Animation( + new KeyframeEffect(createDiv(test), KEYFRAMES, timing), timeline); +} + +function assert_approx_equals_or_null(actual, expected, tolerance, name) { + if (actual === null || expected === null){ + assert_equals(actual, expected, name); + } + else { + assert_approx_equals(actual, expected, tolerance, name); + } +} + +function assert_percents_approx_equal(actual, expected, maxScroll, + description) { + // Base the tolerance on being out by up to half a pixel. + const tolerance = 0.5 / maxScroll * 100; + assert_equals(actual.unit, "percent", `'actual' unit type must be ` + + `'percent' for "${description}"`); + assert_true(actual instanceof CSSUnitValue, `'actual' must be of type ` + + `CSSNumberish for "${description}"`); + if (expected instanceof CSSUnitValue){ + // Verify that when the expected in a CSSUnitValue, it is the correct unit + // type + assert_equals(expected.unit, "percent", `'expected' unit type must be ` + + `'percent' for "${description}"`); + assert_approx_equals(actual.value, expected.value, tolerance, + `values do not match for "${description}"`); + } else if (typeof expected, "number"){ + assert_approx_equals(actual.value, expected, tolerance, + `values do not match for "${description}"`); + } +} + +function assert_percents_equal(actual, expected, description) { + // Rough estimate of the default size of the scrollable area based on + // sizes in setupScrollTimelineTest. + const defaultScrollRange = 400; + return assert_percents_approx_equal(actual, expected, defaultScrollRange, + description); +} diff --git a/testing/web-platform/tests/scroll-animations/scroll-timelines/two-animations-attach-to-same-scroll-timeline-cancel-one.html b/testing/web-platform/tests/scroll-animations/scroll-timelines/two-animations-attach-to-same-scroll-timeline-cancel-one.html new file mode 100644 index 0000000000..ed8e8337a6 --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/scroll-timelines/two-animations-attach-to-same-scroll-timeline-cancel-one.html @@ -0,0 +1,84 @@ + +Scroll timeline shared by two animation, one gets cancelled + + + + + + + + + +
+
+
+

Scrolling Contents

+
+ + diff --git a/testing/web-platform/tests/scroll-animations/scroll-timelines/two-animations-attach-to-same-scroll-timeline.html b/testing/web-platform/tests/scroll-animations/scroll-timelines/two-animations-attach-to-same-scroll-timeline.html new file mode 100644 index 0000000000..de50599fba --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/scroll-timelines/two-animations-attach-to-same-scroll-timeline.html @@ -0,0 +1,79 @@ + +Scroll timeline shared by two animation + + + + + + + + + +
+
+
+

Scrolling Contents

+
+ + diff --git a/testing/web-platform/tests/scroll-animations/scroll-timelines/update-playback-rate.html b/testing/web-platform/tests/scroll-animations/scroll-timelines/update-playback-rate.html new file mode 100644 index 0000000000..1db31602f3 --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/scroll-timelines/update-playback-rate.html @@ -0,0 +1,181 @@ + + +Seamlessly updating the playback rate of an animation + + + + + + + + + diff --git a/testing/web-platform/tests/scroll-animations/scroll-timelines/updating-the-finished-state.html b/testing/web-platform/tests/scroll-animations/scroll-timelines/updating-the-finished-state.html new file mode 100644 index 0000000000..86b52d5aa0 --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/scroll-timelines/updating-the-finished-state.html @@ -0,0 +1,565 @@ + + +Updating the finished state + + + + + + + + + -- cgit v1.2.3