Skip to content

Commit

Permalink
update test to expect shadow trees to find document keyframes (#44991)
Browse files Browse the repository at this point in the history
* update test to expect shadow trees to find document keyframes

* always missing updating comments
  • Loading branch information
astearns authored Mar 7, 2024
1 parent 04aeef2 commit 635a873
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
5 changes: 1 addition & 4 deletions css/css-scoping/keyframes-001.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@
<script src="/resources/testharnessreport.js"></script>
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<link rel="help" href="https://drafts.csswg.org/css-scoping/#selectors-data-model">
<!--
Beware of https://github.com/w3c/csswg-drafts/issues/1995 potentially, but
unlikely, changing the expected result of this test.
-->

<style>
#in-document {
width: 100px;
Expand Down
11 changes: 4 additions & 7 deletions css/css-scoping/keyframes-002.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
<!doctype html>
<title>CSS Test: @keyframes from the document don't apply in the shadow tree.</title>
<title>CSS Test: @keyframes from the document should apply in the shadow tree.</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<link rel="help" href="https://drafts.csswg.org/css-scoping/#selectors-data-model">
<!--
Beware of https://github.com/w3c/csswg-drafts/issues/1995 potentially, but
unlikely, changing the expected result of this test.
-->

<style>
@keyframes myanim {
from { background: red; }
Expand All @@ -29,6 +26,6 @@
<div id="in-shadow"></div>
`;

assert_equals(host.shadowRoot.getElementById('in-shadow').getAnimations().length, 0);
}, "@keyframes from the document don't apply in the shadow tree");
assert_equals(host.shadowRoot.getElementById('in-shadow').getAnimations().length, 1);
}, "@keyframes from the document should apply in the shadow tree");
</script>

0 comments on commit 635a873

Please sign in to comment.