Truly independent web browser
Tests/LibWeb: Show implicit keyframes staying off the compositor
Andreas Klingf058d9b05795
diff --git a/Tests/LibWeb/Text/expected/css/compositor-animation-implicit-keyframes.txt b/Tests/LibWeb/Text/expected/css/compositor-animation-implicit-keyframes.txtnew file mode 100644index 00000000000..96c98d718e7--- /dev/null+++ b/Tests/LibWeb/Text/expected/css/compositor-animation-implicit-keyframes.txt@@ -0,0 +1,3 @@+opacity-pulse: 0+color-pulse: 0+filter-pulse: 0diff --git a/Tests/LibWeb/Text/input/css/compositor-animation-implicit-keyframes.html b/Tests/LibWeb/Text/input/css/compositor-animation-implicit-keyframes.htmlnew file mode 100644index 00000000000..8263a90f3f7--- /dev/null+++ b/Tests/LibWeb/Text/input/css/compositor-animation-implicit-keyframes.html@@ -0,0 +1,23 @@+<!DOCTYPE html>+<script src="../include.js"></script>+<style>+ @keyframes opacity-pulse { 50% { opacity: 0.5; } }+ @keyframes color-pulse { 50% { background-color: red; } }+ @keyframes filter-pulse { 50% { filter: blur(2px); } }+ div { width: 10px; height: 10px; background-color: blue; }+</style>+<div id="target"></div>+<script>+ asyncTest(async done => {+ // Keyframes that leave out 0% and 100% take those values from the element's own style.+ for (const name of ["opacity-pulse", "color-pulse", "filter-pulse"]) {+ target.style.animation = `${name} 100s linear infinite`;+ await Promise.all(target.getAnimations().map(animation => animation.ready));+ internals.updateCompositorAnimations();+ println(`${name}: ${internals.getStyleInvalidationCounters().compositorVisualAnimations}`);+ target.style.animation = "none";+ internals.updateCompositorAnimations();+ }+ done();+ });+</script>