mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 20:57:44 +00:00
LibWeb: Add tests for the rest of the Animation properties
This commit is contained in:
parent
e91f4dcd79
commit
dc47210360
10 changed files with 164 additions and 0 deletions
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE html>
|
||||
<div id="foo"></div>
|
||||
<script src="../../include.js"></script>
|
||||
<script>
|
||||
asyncTest(async done => {
|
||||
const foo = document.getElementById("foo");
|
||||
const animation = foo.animate({}, { duration: 100 });
|
||||
|
||||
animation.play();
|
||||
println(`Animation is pending after a call to play(): ${animation.pending}`);
|
||||
|
||||
await animation.ready;
|
||||
println(`Animation is not pending after ready promise resolves: ${!animation.pending}`);
|
||||
|
||||
animation.pause();
|
||||
println(`Animation is pending after a call to pause(): ${animation.pending}`);
|
||||
|
||||
await animation.ready;
|
||||
println(`Animation is not pending after ready promise resolves: ${!animation.pending}`);
|
||||
|
||||
done();
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue