| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script src="../resources/testharness.js"></script> | 2 <script src="../../resources/testharness.js"></script> |
| 3 <script src="../resources/testharnessreport.js"></script> | 3 <script src="../../resources/testharnessreport.js"></script> |
| 4 | 4 |
| 5 <div id='container'> | 5 <div id='container'> |
| 6 <div id='element'></div> | 6 <div id='element'></div> |
| 7 </div> | 7 </div> |
| 8 | 8 |
| 9 <script> | 9 <script> |
| 10 var element = document.getElementById('element'); | 10 var element = document.getElementById('element'); |
| 11 var container = document.getElementById('container'); | 11 var container = document.getElementById('container'); |
| 12 | 12 |
| 13 test(function() { | 13 test(function() { |
| 14 element.style.fontSize = '10px'; | 14 element.style.fontSize = '10px'; |
| 15 var player = element.animate([{minHeight: '3em'}, {minHeight: '5em'}], 10); | 15 var player = element.animate([{minHeight: '3em'}, {minHeight: '5em'}], 10); |
| 16 player.pause(); | 16 player.pause(); |
| 17 player.currentTime = 5; | 17 player.currentTime = 5; |
| 18 element.style.fontSize = '20px'; | 18 element.style.fontSize = '20px'; |
| 19 assert_equals(getComputedStyle(element).minHeight, '80px'); | 19 assert_equals(getComputedStyle(element).minHeight, '80px'); |
| 20 }, 'minHeight responsive to style changes'); | 20 }, 'minHeight responsive to style changes'); |
| 21 | 21 |
| 22 test(function() { | 22 test(function() { |
| 23 element.style.fontSize = '10px'; | 23 element.style.fontSize = '10px'; |
| 24 var player = element.animate([{minHeight: '30px'}, {minHeight: 'calc(30px -
2em)'}], 10); | 24 var player = element.animate([{minHeight: '30px'}, {minHeight: 'calc(30px -
2em)'}], 10); |
| 25 player.pause(); | 25 player.pause(); |
| 26 player.currentTime = 7.5; | 26 player.currentTime = 7.5; |
| 27 element.style.fontSize = '40px'; | 27 element.style.fontSize = '40px'; |
| 28 assert_equals(getComputedStyle(element).minHeight, '0px'); | 28 assert_equals(getComputedStyle(element).minHeight, '0px'); |
| 29 }, 'minHeight clamped to 0px'); | 29 }, 'minHeight clamped to 0px'); |
| 30 | 30 |
| 31 </script> | 31 </script> |
| OLD | NEW |