Regression(r188105): Seems to have caused crashes during PLT on some iPads
[WebKit-https.git] / LayoutTests / fast / css / custom-font-xheight.html
1 <html>
2 <head>
3 <style>
4 @font-face {
5  font-family: "test-xheight";
6  src: url(../../resources/Ahem.otf);
7  font-style: normal;
8  font-weight: 700;
9 }
10 .test {
11     font-family:"test-xheight","helvetica","arial",sans-serif;
12     height: 1ex;
13 }
14 </style>
15 </height>
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>
20
21 <div id=test>
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>
37 </div>
38
39 <script>
40 if (window.testRunner)
41     testRunner.dumpAsText();
42
43 function test()
44 {
45     var totalHeight = document.defaultView.getComputedStyle(document.getElementById("test"), null).getPropertyCSSValue("height");
46     totalHeight = totalHeight.getFloatValue(CSSPrimitiveValue.CSS_PX);
47     if (totalHeight > 150 && totalHeight < 300)
48         document.getElementById("result").innerHTML = "PASS";
49     else
50         document.getElementById("result").innerHTML = "FAIL: " + totalHeight + "px";
51 }
52 </script>
53 </body>
54 </html>