OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../resources/js-test.js"></script> |
| 3 <style> |
| 4 div.container { |
| 5 font-size: 200px; |
| 6 line-height: 1; |
| 7 } |
| 8 |
| 9 @font-face { |
| 10 /* LinLibertine_R's aspect value = 0.440918 */ |
| 11 font-family : 'referenceFont'; |
| 12 src : url('../../third_party/Libertine/LinLibertine_R.woff') format("woff"); |
| 13 } |
| 14 |
| 15 @font-face { |
| 16 /* OpenSans-Regular's aspect = 0.544922 */ |
| 17 font-family : 'testFont'; |
| 18 src : url('../../resources/opensans/OpenSans-Regular.woff') format("woff"); |
| 19 } |
| 20 |
| 21 span.test { |
| 22 font-family: testFont; |
| 23 font-size-adjust: 0.440; |
| 24 } |
| 25 |
| 26 span.reference { |
| 27 font-family: referenceFont; |
| 28 } |
| 29 </style> |
| 30 |
| 31 <div class="container"> |
| 32 <span class="test">x</span><span class="reference">x</span> |
| 33 </div> |
| 34 |
| 35 <script> |
| 36 description("font-size-adjust should affect neigther computed line-height no
r font-size."); |
| 37 |
| 38 var test = document.querySelector(".test"); |
| 39 var reference = document.querySelector(".reference"); |
| 40 var container = document.querySelector(".container"); |
| 41 |
| 42 var testStyle = window.getComputedStyle(test, null); |
| 43 var referenceStyle = window.getComputedStyle(reference, null); |
| 44 var containerStyle = window.getComputedStyle(container, null); |
| 45 |
| 46 shouldEvaluateTo("parseFloat(testStyle.getPropertyValue('font-size-adjust'))
", 0.440, 0.0001); |
| 47 shouldBeEqualToString("referenceStyle.getPropertyValue('font-size-adjust')",
'none'); |
| 48 |
| 49 shouldBeEqualToString("testStyle.getPropertyValue('font-size')", referenceSt
yle.getPropertyValue('font-size')); |
| 50 shouldBeEqualToString("testStyle.getPropertyValue('line-height')", reference
Style.getPropertyValue('line-height')); |
| 51 |
| 52 shouldBeEqualToString("containerStyle.getPropertyValue('line-height')", refe
renceStyle.getPropertyValue('line-height')); |
| 53 </script> |
OLD | NEW |