blob: 146377745fad242fd44f92fec2631f5db153e5e0 [file] [log] [blame]
<!DOCTYPE html>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<div id="host"></div>
test(() => assert_not_equals(window.internals, undefined, "Needs window.internals for testing."), "Check that window.internals is defined");
var root = host.attachShadow({mode:"open"});
root.innerHTML = "<div></div><div></div><div></div>";
test(() => {
var sheet = document.createElement("style");
@keyframes unused {
from { color: pink }
to { color: orange }
assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 1,
"Recalc for shadow tree, including host and inserted style element.");
}, "Check that adding @keyframes does not cause a style recalc of the host element when no animations are running.");