| 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 CSS.registerProperty({ |
| 13 name: '--test', |
| 14 syntax: '<number>', |
| 15 initialValue: '0', |
| 16 }); |
| 17 |
| 18 test(() => { |
| 19 let animation = target.animate({'--test': ['var(--from)', 'var(--to)']}, 100); |
| 20 |
| 21 animation.currentTime = 25; |
| 22 assert_equals(getComputedStyle(target).getPropertyValue('--test'), '125', 'tar
get at 25%'); |
| 23 |
| 24 animation.currentTime = 75; |
| 25 assert_equals(getComputedStyle(target).getPropertyValue('--test'), '175', 'tar
get at 75%'); |
| 26 }, 'Registered custom property animation keyframes with var() references to unre
gistered custom properties'); |
| 27 </script> |
| OLD | NEW |