mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:07:35 +00:00
LibWeb: Add a test for changing animation-name
This commit is contained in:
parent
c1ab6ca6b4
commit
3ca827d27a
2 changed files with 22 additions and 0 deletions
|
@ -0,0 +1,20 @@
|
|||
<style>
|
||||
#foo {
|
||||
animation-name: rule1;
|
||||
}
|
||||
@keyframes rule1 { }
|
||||
@keyframes rule2 { }
|
||||
</style>
|
||||
<div id="foo"></div>
|
||||
<script src="../include.js"></script>
|
||||
<script>
|
||||
asyncTest(done => {
|
||||
const foo = document.getElementById("foo");
|
||||
println(`before: ${getComputedStyle(foo).getPropertyValue("animation-name")}`);
|
||||
foo.style.setProperty("animation-name", "rule2");
|
||||
requestAnimationFrame(() => {
|
||||
println(`after: ${getComputedStyle(foo).getPropertyValue("animation-name")}`);
|
||||
done();
|
||||
});
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue