5 font-family:
"test-xheight";
6 src: url(../../resources/Ahem.otf);
11 font-family:
"test-xheight",
"helvetica",
"arial",sans-serif;
16 <body onload=
"test()">
17 <p>Test for
<a href=
"https://bugs.webkit.org/show_bug.cgi?id=39682">bug
39682</a>:
18 WebKit nightly adding insane height to div at random.
</p>
19 <p id=result
>Testing...
</p>
22 <div class=test
style=
"font-size: 10px">XXXX
</div>
23 <div class=test
style=
"font-size: 11px">XXXX
</div>
24 <div class=test
style=
"font-size: 12px">XXXX
</div>
25 <div class=test
style=
"font-size: 13px">XXXX
</div>
26 <div class=test
style=
"font-size: 14px">XXXX
</div>
27 <div class=test
style=
"font-size: 15px">XXXX
</div>
28 <div class=test
style=
"font-size: 16px">XXXX
</div>
29 <div class=test
style=
"font-size: 17px">XXXX
</div>
30 <div class=test
style=
"font-size: 18px">XXXX
</div>
31 <div class=test
style=
"font-size: 19px">XXXX
</div>
32 <div class=test
style=
"font-size: 20px">XXXX
</div>
33 <div class=test
style=
"font-size: 21px">XXXX
</div>
34 <div class=test
style=
"font-size: 22px">XXXX
</div>
35 <div class=test
style=
"font-size: 23px">XXXX
</div>
36 <div class=test
style=
"font-size: 24px">XXXX
</div>
40 if (window
.testRunner
)
41 testRunner
.dumpAsText();
45 var totalHeight
= parseFloat(getComputedStyle(document
.getElementById("test")).height
);
46 if (totalHeight
> 150 && totalHeight
< 300)
47 document
.getElementById("result").innerHTML
= "PASS";
49 document
.getElementById("result").innerHTML
= "FAIL: " + totalHeight
+ "px";