OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <meta charset="utf-8"> | 4 <meta charset="utf-8"> |
5 <script src="../js/resources/js-test-pre.js"></script> | 5 <script src="../../resources/js-test.js"></script> |
6 </head> | 6 </head> |
7 <body onload="runTest();"> | 7 <body onload="runTest();"> |
8 <script> | 8 <script> |
9 description("Soft Hyphen Test"); | 9 description("Soft Hyphen Test"); |
10 | 10 |
11 function runTest() { | 11 function runTest() { |
12 if (window.testRunner) | 12 if (window.testRunner) |
13 testRunner.dumpAsText(); | 13 testRunner.dumpAsText(); |
14 | 14 |
15 // 56 is 4 * the font size (14). We're expecting the text to break u
p into 4 lines. | 15 // 56 is 4 * the font size (14). We're expecting the text to break u
p into 4 lines. |
16 // 4 lines + the padding gives a div height of 92 in webkit and FF,
88 in chrome. | 16 // 4 lines + the padding gives a div height of 92 in webkit and FF,
88 in chrome. |
17 // So anything less than 56 is a FAIL. | 17 // So anything less than 56 is a FAIL. |
18 var doesItPass = Boolean(document.getElementById('text1').offsetHeig
ht > 56) ; | 18 var doesItPass = Boolean(document.getElementById('text1').offsetHeig
ht > 56) ; |
19 shouldBeTrue(String(doesItPass)) ; | 19 shouldBeTrue(String(doesItPass)) ; |
20 } | 20 } |
21 </script> | 21 </script> |
22 | 22 |
23 <div id="text1" style="width:150px; font-family:Ahem; font-size:14px; border
:2px solid red"> | 23 <div id="text1" style="width:150px; font-family:Ahem; font-size:14px; border
:2px solid red"> |
24 <p>anti­dis­est­ab­lish­ment­arian­ism.</p> | 24 <p>anti­dis­est­ab­lish­ment­arian­ism.</p> |
25 </div> | 25 </div> |
26 | 26 |
27 </body> | 27 </body> |
28 </html> | 28 </html> |
OLD | NEW |