OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <style> | 3 <style> |
4 @font-face { | 4 @font-face { |
5 font-family: "test-xheight"; | 5 font-family: "test-xheight"; |
6 src: url(../../resources/Ahem.otf); | 6 src: url(../../resources/Ahem.otf); |
7 font-style: normal; | 7 font-style: normal; |
8 font-weight: 700; | 8 font-weight: 700; |
9 } | 9 } |
10 .test { | 10 .test { |
(...skipping 24 matching lines...) Expand all Loading... |
35 <div class=test style="font-size: 23px">XXXX</div> | 35 <div class=test style="font-size: 23px">XXXX</div> |
36 <div class=test style="font-size: 24px">XXXX</div> | 36 <div class=test style="font-size: 24px">XXXX</div> |
37 </div> | 37 </div> |
38 | 38 |
39 <script> | 39 <script> |
40 if (window.testRunner) | 40 if (window.testRunner) |
41 testRunner.dumpAsText(); | 41 testRunner.dumpAsText(); |
42 | 42 |
43 function test() | 43 function test() |
44 { | 44 { |
45 var totalHeight = document.defaultView.getComputedStyle(document.getElementB
yId("test"), null).getPropertyCSSValue("height"); | 45 var totalHeight = parseFloat(getComputedStyle(document.getElementById("test"
)).height); |
46 totalHeight = totalHeight.getFloatValue(CSSPrimitiveValue.CSS_PX); | |
47 if (totalHeight > 150 && totalHeight < 300) | 46 if (totalHeight > 150 && totalHeight < 300) |
48 document.getElementById("result").innerHTML = "PASS"; | 47 document.getElementById("result").innerHTML = "PASS"; |
49 else | 48 else |
50 document.getElementById("result").innerHTML = "FAIL: " + totalHeight + "
px"; | 49 document.getElementById("result").innerHTML = "FAIL: " + totalHeight + "
px"; |
51 } | 50 } |
52 </script> | 51 </script> |
53 </body> | 52 </body> |
54 </html> | 53 </html> |
OLD | NEW |