| OLD | NEW |
| (Empty) | |
| 1 <script src="../../resources/testharness.js"></script> |
| 2 <script src="../../resources/testharnessreport.js"></script> |
| 3 <style> |
| 4 #target { |
| 5 background-color: var(--x); |
| 6 } |
| 7 </style> |
| 8 <div id="target"></div> |
| 9 <script> |
| 10 test(() => { |
| 11 var animation = target.animate({'--x': ['green', 'lime']}, 1000); |
| 12 animation.currentTime = 250; |
| 13 assert_equals(getComputedStyle(target).getPropertyValue('--x'), 'green'); |
| 14 assert_equals(getComputedStyle(target).backgroundColor, 'rgb(0, 128, 0)'); |
| 15 animation.currentTime = 750; |
| 16 assert_equals(getComputedStyle(target).getPropertyValue('--x'), 'lime'); |
| 17 assert_equals(getComputedStyle(target).backgroundColor, 'rgb(0, 255, 0)'); |
| 18 }, 'element.animate() animations should apply custom properties'); |
| 19 </script> |
| OLD | NEW |