animate-invalid.html (776B)
1 <!DOCTYPE html> 2 <title>Do not crash when animating to unresolved var()</title> 3 <link rel="help" href="https://drafts.css-houdini.org/css-properties-values-api/#dom-css-registerproperty"> 4 <link rel="help" href="https://crbug.com/1185524"> 5 <script src="/resources/testharness.js"></script> 6 <script src="/resources/testharnessreport.js"></script> 7 <div id="target"></div> 8 <script> 9 promise_test(async function(){ 10 CSS.registerProperty({ 11 name: '--x', 12 syntax: '<number>', 13 initialValue: '1', 14 inherits: false 15 }); 16 let animation = target.animate({'--x': [ 'var(--unknown)']}, 100); 17 await animation.ready; 18 assert_equals(getComputedStyle(target).getPropertyValue('--x'), '1'); 19 }, 'Do not crash when animating to unresolved var()'); 20 </script>