2 <script src=
"../resources/testharness.js"></script>
3 <script src=
"../resources/testharnessreport.js"></script>
11 background-color: red;
14 <div id=
"target"></div>
17 var rules
= document
.styleSheets
[0].rules
;
18 for (var i
= 0; i
< rules
.length
; i
++) {
19 if (rules
[i
].type
== CSSRule
.KEYFRAMES_RULE
) {
20 rules
[i
].appendRule('100% { background-color: green; }');
24 target
.style
.animation
= 'anim 0s forwards';
25 assert_equals(getComputedStyle(target
).backgroundColor
, 'rgb(0, 128, 0)', 'background color');
26 }, "Check that appendRule is working");