diff --git a/Tests/LibWeb/Text/input/WebAnimations/animation-methods/cancel.html b/Tests/LibWeb/Text/input/WebAnimations/animation-methods/cancel.html index 2d1af42536b..0a2b34b7582 100644 --- a/Tests/LibWeb/Text/input/WebAnimations/animation-methods/cancel.html +++ b/Tests/LibWeb/Text/input/WebAnimations/animation-methods/cancel.html @@ -2,7 +2,7 @@
diff --git a/Tests/LibWeb/Text/input/WebAnimations/animation-methods/finish.html b/Tests/LibWeb/Text/input/WebAnimations/animation-methods/finish.html index 63f963d0948..14f88dd2e63 100644 --- a/Tests/LibWeb/Text/input/WebAnimations/animation-methods/finish.html +++ b/Tests/LibWeb/Text/input/WebAnimations/animation-methods/finish.html @@ -2,7 +2,7 @@
diff --git a/Tests/LibWeb/Text/input/WebAnimations/animation-methods/pause.html b/Tests/LibWeb/Text/input/WebAnimations/animation-methods/pause.html index 3211f50b621..9ce80d1f6ec 100644 --- a/Tests/LibWeb/Text/input/WebAnimations/animation-methods/pause.html +++ b/Tests/LibWeb/Text/input/WebAnimations/animation-methods/pause.html @@ -2,7 +2,7 @@
diff --git a/Tests/LibWeb/Text/input/WebAnimations/animation-methods/persist.html b/Tests/LibWeb/Text/input/WebAnimations/animation-methods/persist.html index 73243ed5069..3680188be09 100644 --- a/Tests/LibWeb/Text/input/WebAnimations/animation-methods/persist.html +++ b/Tests/LibWeb/Text/input/WebAnimations/animation-methods/persist.html @@ -2,13 +2,7 @@
diff --git a/Tests/LibWeb/Text/input/WebAnimations/animation-methods/reverse.html b/Tests/LibWeb/Text/input/WebAnimations/animation-methods/reverse.html index d8ce3d03130..f35ec4b4b2c 100644 --- a/Tests/LibWeb/Text/input/WebAnimations/animation-methods/reverse.html +++ b/Tests/LibWeb/Text/input/WebAnimations/animation-methods/reverse.html @@ -2,13 +2,7 @@
diff --git a/Tests/LibWeb/Text/input/WebAnimations/animation-methods/updatePlaybackRate.html b/Tests/LibWeb/Text/input/WebAnimations/animation-methods/updatePlaybackRate.html index 9c68f33bb1d..65974d326a6 100644 --- a/Tests/LibWeb/Text/input/WebAnimations/animation-methods/updatePlaybackRate.html +++ b/Tests/LibWeb/Text/input/WebAnimations/animation-methods/updatePlaybackRate.html @@ -2,13 +2,7 @@
diff --git a/Tests/LibWeb/Text/input/WebAnimations/animation-properties/currentTime.html b/Tests/LibWeb/Text/input/WebAnimations/animation-properties/currentTime.html index 52fde231170..49d54982d98 100644 --- a/Tests/LibWeb/Text/input/WebAnimations/animation-properties/currentTime.html +++ b/Tests/LibWeb/Text/input/WebAnimations/animation-properties/currentTime.html @@ -2,7 +2,7 @@
diff --git a/Tests/LibWeb/Text/input/WebAnimations/animation-properties/finished.html b/Tests/LibWeb/Text/input/WebAnimations/animation-properties/finished.html index 13575a0647d..7b4bf96a71e 100644 --- a/Tests/LibWeb/Text/input/WebAnimations/animation-properties/finished.html +++ b/Tests/LibWeb/Text/input/WebAnimations/animation-properties/finished.html @@ -2,7 +2,7 @@
diff --git a/Tests/LibWeb/Text/input/WebAnimations/animation-properties/pending-and-ready.html b/Tests/LibWeb/Text/input/WebAnimations/animation-properties/pending-and-ready.html index 5bed417111a..8add855ae46 100644 --- a/Tests/LibWeb/Text/input/WebAnimations/animation-properties/pending-and-ready.html +++ b/Tests/LibWeb/Text/input/WebAnimations/animation-properties/pending-and-ready.html @@ -2,7 +2,7 @@
diff --git a/Tests/LibWeb/Text/input/WebAnimations/animation-properties/replaceState.html b/Tests/LibWeb/Text/input/WebAnimations/animation-properties/replaceState.html index 778265b0068..b1bf1e05a03 100644 --- a/Tests/LibWeb/Text/input/WebAnimations/animation-properties/replaceState.html +++ b/Tests/LibWeb/Text/input/WebAnimations/animation-properties/replaceState.html @@ -4,7 +4,7 @@ diff --git a/Tests/LibWeb/Text/input/WebAnimations/animation-properties/startTime.html b/Tests/LibWeb/Text/input/WebAnimations/animation-properties/startTime.html index 8569d1c5faa..1507c829067 100644 --- a/Tests/LibWeb/Text/input/WebAnimations/animation-properties/startTime.html +++ b/Tests/LibWeb/Text/input/WebAnimations/animation-properties/startTime.html @@ -2,7 +2,7 @@
diff --git a/Tests/LibWeb/Text/input/WebAnimations/misc/animation-single-iteration-no-repeat.html b/Tests/LibWeb/Text/input/WebAnimations/misc/animation-single-iteration-no-repeat.html index 9561f4964b9..95d28a47091 100644 --- a/Tests/LibWeb/Text/input/WebAnimations/misc/animation-single-iteration-no-repeat.html +++ b/Tests/LibWeb/Text/input/WebAnimations/misc/animation-single-iteration-no-repeat.html @@ -17,13 +17,7 @@
diff --git a/Tests/LibWeb/Text/input/include.js b/Tests/LibWeb/Text/input/include.js index 1b786ed53f1..9bf5927da12 100644 --- a/Tests/LibWeb/Text/input/include.js +++ b/Tests/LibWeb/Text/input/include.js @@ -24,6 +24,18 @@ function printElement(e) { println(element_string); } +function animationFrame() { + const { promise, resolve } = Promise.withResolvers(); + requestAnimationFrame(resolve); + return promise; +} + +function timeout(ms) { + const { promise, resolve } = Promise.withResolvers(); + setTimeout(resolve, ms); + return promise; +} + document.addEventListener("DOMContentLoaded", function () { __outputElement = document.createElement("pre"); __outputElement.setAttribute("id", "out"); @@ -47,3 +59,12 @@ function asyncTest(f) { f(done); }); } + +function promiseTest(f) { + document.addEventListener("DOMContentLoaded", () => { + f().then(() => { + __preventMultipleTestFunctions(); + internals.signalTextTestIsDone(); + }); + }); +}