From d7ad134ae53e2d6ed8795c202e736f6380766f23 Mon Sep 17 00:00:00 2001 From: Matthew Olsson Date: Thu, 7 Mar 2024 09:48:26 -0700 Subject: [PATCH] LibWeb: Add a few Animation property tests --- .../animation-properties/currentTime.txt | 5 +++ .../animation-properties/effect.txt | 4 +++ .../animation-properties/finished.txt | 4 +++ .../animation-properties/timeline.txt | 2 ++ .../animation-properties/currentTime.html | 29 ++++++++++++++++ .../animation-properties/effect.html | 19 +++++++++++ .../animation-properties/finished.html | 34 +++++++++++++++++++ .../animation-properties/timeline.html | 13 +++++++ 8 files changed, 110 insertions(+) create mode 100644 Tests/LibWeb/Text/expected/WebAnimations/animation-properties/currentTime.txt create mode 100644 Tests/LibWeb/Text/expected/WebAnimations/animation-properties/effect.txt create mode 100644 Tests/LibWeb/Text/expected/WebAnimations/animation-properties/finished.txt create mode 100644 Tests/LibWeb/Text/expected/WebAnimations/animation-properties/timeline.txt create mode 100644 Tests/LibWeb/Text/input/WebAnimations/animation-properties/currentTime.html create mode 100644 Tests/LibWeb/Text/input/WebAnimations/animation-properties/effect.html create mode 100644 Tests/LibWeb/Text/input/WebAnimations/animation-properties/finished.html create mode 100644 Tests/LibWeb/Text/input/WebAnimations/animation-properties/timeline.html diff --git a/Tests/LibWeb/Text/expected/WebAnimations/animation-properties/currentTime.txt b/Tests/LibWeb/Text/expected/WebAnimations/animation-properties/currentTime.txt new file mode 100644 index 0000000000..860348e891 --- /dev/null +++ b/Tests/LibWeb/Text/expected/WebAnimations/animation-properties/currentTime.txt @@ -0,0 +1,5 @@ + Animation with no timeline has null currentTime: true +Animation that hasn't been played has null currentTime: true +Played animation has a currentTime of 0: true +New animation has not started animating: true +Animation with currentTime set to end is finished: true diff --git a/Tests/LibWeb/Text/expected/WebAnimations/animation-properties/effect.txt b/Tests/LibWeb/Text/expected/WebAnimations/animation-properties/effect.txt new file mode 100644 index 0000000000..cb54c5b166 --- /dev/null +++ b/Tests/LibWeb/Text/expected/WebAnimations/animation-properties/effect.txt @@ -0,0 +1,4 @@ + Element.animate creates Animation with effect: true +Setting effect to null clears the effect: true +Accessing effect property on animation with no effect produces null: true +Setting effect on animation with no effect works: true diff --git a/Tests/LibWeb/Text/expected/WebAnimations/animation-properties/finished.txt b/Tests/LibWeb/Text/expected/WebAnimations/animation-properties/finished.txt new file mode 100644 index 0000000000..904cc74599 --- /dev/null +++ b/Tests/LibWeb/Text/expected/WebAnimations/animation-properties/finished.txt @@ -0,0 +1,4 @@ + finished promise remains after finishing: true +finished promise updates after playing: true +cancel() updates finished promise: true +Expected finished promise cancellation diff --git a/Tests/LibWeb/Text/expected/WebAnimations/animation-properties/timeline.txt b/Tests/LibWeb/Text/expected/WebAnimations/animation-properties/timeline.txt new file mode 100644 index 0000000000..0facc1843c --- /dev/null +++ b/Tests/LibWeb/Text/expected/WebAnimations/animation-properties/timeline.txt @@ -0,0 +1,2 @@ + Animation's default timeline is the document's timeline: true +Animation created with null timeline has the document's timeline: true diff --git a/Tests/LibWeb/Text/input/WebAnimations/animation-properties/currentTime.html b/Tests/LibWeb/Text/input/WebAnimations/animation-properties/currentTime.html new file mode 100644 index 0000000000..52fde23117 --- /dev/null +++ b/Tests/LibWeb/Text/input/WebAnimations/animation-properties/currentTime.html @@ -0,0 +1,29 @@ + +
+ + diff --git a/Tests/LibWeb/Text/input/WebAnimations/animation-properties/effect.html b/Tests/LibWeb/Text/input/WebAnimations/animation-properties/effect.html new file mode 100644 index 0000000000..0b4c70d32c --- /dev/null +++ b/Tests/LibWeb/Text/input/WebAnimations/animation-properties/effect.html @@ -0,0 +1,19 @@ + +
+ + diff --git a/Tests/LibWeb/Text/input/WebAnimations/animation-properties/finished.html b/Tests/LibWeb/Text/input/WebAnimations/animation-properties/finished.html new file mode 100644 index 0000000000..13575a0647 --- /dev/null +++ b/Tests/LibWeb/Text/input/WebAnimations/animation-properties/finished.html @@ -0,0 +1,34 @@ + +
+ + diff --git a/Tests/LibWeb/Text/input/WebAnimations/animation-properties/timeline.html b/Tests/LibWeb/Text/input/WebAnimations/animation-properties/timeline.html new file mode 100644 index 0000000000..0960c04078 --- /dev/null +++ b/Tests/LibWeb/Text/input/WebAnimations/animation-properties/timeline.html @@ -0,0 +1,13 @@ + +
+ +