| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../resources/testharness.js"></script> |
| 3 <script src="../../resources/testharnessreport.js"></script> |
| 4 <style> |
| 5 #target { |
| 6 --from: 100; |
| 7 --to: 200; |
| 8 } |
| 9 </style> |
| 10 <div id="target"></div> |
| 11 <script> |
| 12 for (let name of ['--test', '--from', '--to']) { |
| 13 CSS.registerProperty({ |
| 14 name, |
| 15 syntax: '<number>', |
| 16 initialValue: '0', |
| 17 }); |
| 18 } |
| 19 |
| 20 test(() => { |
| 21 let animation = target.animate({'--test': ['var(--from)', 'var(--to)']}, 100); |
| 22 |
| 23 animation.currentTime = 25; |
| 24 assert_equals(getComputedStyle(target).getPropertyValue('--test'), '125', 'tar
get at 25%'); |
| 25 |
| 26 animation.currentTime = 75; |
| 27 assert_equals(getComputedStyle(target).getPropertyValue('--test'), '175', 'tar
get at 75%'); |
| 28 }, 'Registered custom property animation keyframes with var() references to regi
stered custom properties'); |
| 29 </script> |
| OLD | NEW |