mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +00:00
LibWeb: Add some async/animation test utilities
This commit is contained in:
parent
b2907f62a6
commit
e298e8af5a
Notes:
sideshowbarker
2024-07-16 23:55:09 +09:00
Author: https://github.com/mattco98
Commit: e298e8af5a
Pull-request: https://github.com/SerenityOS/serenity/pull/23774
13 changed files with 65 additions and 91 deletions
|
@ -2,13 +2,7 @@
|
|||
<div id="foo"></div>
|
||||
<script src="../../include.js"></script>
|
||||
<script>
|
||||
const animationFrame = () => {
|
||||
const { promise, resolve } = Promise.withResolvers();
|
||||
requestAnimationFrame(resolve);
|
||||
return promise;
|
||||
};
|
||||
|
||||
asyncTest(async done => {
|
||||
promiseTest(async () => {
|
||||
const foo = document.getElementById("foo");
|
||||
|
||||
// FIXME: passing a null timeline here is broken, needs [ExplicitNull] support for dictionary members
|
||||
|
@ -38,7 +32,5 @@
|
|||
}
|
||||
if (anim.playbackRate === -1)
|
||||
println("reverse() does not update the playback rate if calling play() would throw an exception");
|
||||
|
||||
done();
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue