animation-base-response-004.html (940B)
1 <!DOCTYPE html> 2 <title>Tests that base responds to font-affecting properties appearing via setKeyframes</title> 3 <link rel="help" href="https://drafts.csswg.org/css-animations/"> 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 <style> 7 #target1 { 8 font-size: 10px; 9 height: 1em; 10 } 11 </style> 12 <div id=target1></div> 13 <script> 14 test(function() { 15 getComputedStyle(target1).height; 16 17 let animation = target1.animate([ 18 { height: '50px' }, 19 { height: '100px' }, 20 ], { 21 duration: 1000000, 22 delay: -500000, 23 easing: 'steps(2, end)' 24 }); 25 26 assert_equals(getComputedStyle(target1).height, '75px'); 27 28 animation.effect.setKeyframes([ 29 { fontSize: '10px' }, 30 { fontSize: '20px' }, 31 ]); 32 33 assert_equals(getComputedStyle(target1).height, '15px'); 34 }, 'Base is responsive to font-affecting appearing via setKeyframes'); 35 </script>