Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / text / line-break-after-empty-inline-hebrew.html
blob875d82fb80a10dea535e4b23ed691aa7e06fb9f2
1 <html>
2 <head>
3 <title>Line breaks after empty inline - Hebrew</title>
4 </head>
5 <body>
6 <meta charset=utf-8>
7 <div>
8 The following two paragraphs should have the same line breaks:
9 </div>
10 <div style="width: 40px; font-family: raanana;">
11 <p style="border:solid green 1px;">&#x05d0;&#x05d1;&#x05d2; &#x05d3;&#x05d4;&#x05d5; &#x05d6;&#x05d7;&#x05d8;</p>
12 <p style="border:solid green 1px;">&#x05d0;&#x05d1;&#x05d2; <span></span> &#x05d3;&#x05d4;&#x05d5; &#x05d6;&#x05d7;&#x05d8;</p>
13 </div>
14 <div><pre id=results></pre></div>
15 <script>
16 if (window.testRunner)
17 testRunner.dumpAsText();
19 function getLineWidths(paragraphNumber) {
20 var range = document.createRange();
21 var paragraphs = document.getElementsByTagName("p");
22 var p = paragraphs[paragraphNumber];
23 range.setStart(p, 0);
24 range.setEnd(p,p.childNodes.length);
25 var rects = range.getClientRects();
26 var widths = [];
27 for (var i = 0; i < rects.length; ++i) {
28 var r = rects[i];
29 if (r.width != 0)
30 widths.push(r.width);
32 return widths;
35 var widths1 = getLineWidths(0);
36 var widths2 = getLineWidths(1);
37 var results = '';
38 if (widths1.length != widths2.length)
39 results += 'FAIL: different number of lines, got ' + widths2.length + ', expected ' + widths1.length;
40 else {
41 for (var i = 0; i < widths1.length; ++i) {
42 if (widths2[i] != widths1[i]) {
43 if (results.length)
44 results += '\n'
45 results += 'FAIL: line[' + i + '] width differs, got ' + widths2[i] + ', expected ' + widths1[i];
49 if (!results.length)
50 results = 'PASS';
51 document.getElementById("results").innerText = results;
53 </script>
54 </body>
55 </html>