OLD | NEW |
(Empty) | |
| 1 <!doctype html> |
| 2 <script src="../resources/testharness.js"></script> |
| 3 <script src="../resources/testharnessreport.js"></script> |
| 4 <style> |
| 5 @keyframes anim { |
| 6 0% { opacity: 1.0; } |
| 7 100% { opacity: 1.0; } |
| 8 } |
| 9 |
| 10 #target { animation: anim 2s -1s linear paused; } |
| 11 </style> |
| 12 <div id="target"></div> |
| 13 <script> |
| 14 test(function() { |
| 15 var sheet = document.styleSheets[0]; |
| 16 var rules = sheet.rules; |
| 17 var keyframes = rules[0]; |
| 18 |
| 19 assert_approx_equals(parseFloat(getComputedStyle(target).opacity), 1.0, 0.00
1, 'opacity'); |
| 20 keyframes.appendRule('50% { opacity: 0.0; }'); |
| 21 assert_approx_equals(parseFloat(getComputedStyle(target).opacity), 0.0, 0.00
1, 'opacity'); |
| 22 |
| 23 }, "Check that changes to a compositor animation via CSSOM update it according
ly"); |
| 24 </script> |
OLD | NEW |