OLD | NEW |
| (Empty) |
1 <script src="../../resources/testharness.js"></script> | |
2 <script src="../../resources/testharnessreport.js"></script> | |
3 <style> | |
4 #target { | |
5 --x: initial; | |
6 } | |
7 </style> | |
8 <div id="target"></div> | |
9 <script> | |
10 setup(() => { | |
11 CSS.registerProperty({name: '--x'}); | |
12 }); | |
13 | |
14 test(() => { | |
15 var animation = target.animate({'--x': 'test'}, 1); | |
16 assert_equals(getComputedStyle(target).getPropertyValue('--x'), ''); | |
17 animation.cancel(); | |
18 }, 'Do not crash when animating with an underlying value of initial'); | |
19 | |
20 test(() => { | |
21 var animation = target.animate({'--x': 'initial'}, {fill: 'forwards'}); | |
22 assert_equals(getComputedStyle(target).getPropertyValue('--x'), ''); | |
23 animation.cancel(); | |
24 }, 'Do not crash when animating an empty initial value'); | |
25 | |
26 test(() => { | |
27 var animation = target.animate({'--x': 'inherit'}, {fill: 'forwards'}); | |
28 assert_equals(getComputedStyle(target).getPropertyValue('--x'), ''); | |
29 animation.cancel(); | |
30 }, 'Do not crash when animating an inherited empty initial value'); | |
31 </script> | |
OLD | NEW |