Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / text / multiglyph-characters.html
blob4b08e450b80350f5ae9f080f3005fdd12eb89675
1 <p>
2 This tests text with characters that have multiple glyphs.
3 </p>
4 <div id="target" style="font-size: 48px;"><span>[</span>&#x0E04;&#x0E33;&#x0E1C;<span>]</span></div>
5 <div id="reference" style="font-size: 48px;"><span>[</span>&#x0E04;&#x0E33;<span>]</span></div>
6 <p id="result">Test did not run</p>
7 <script>
8 if (window.testRunner)
9 testRunner.dumpAsText();
11 var target = document.getElementById("target");
13 var textNodeTarget = target.firstChild.nextSibling;
14 var range = document.createRange();
15 range.setStart(textNodeTarget, 0);
16 range.setEnd(textNodeTarget, 2);
17 var targetWidth = range.getClientRects()[0].width;
19 var reference = document.getElementById("reference");
20 var textNodeReference = reference.firstChild.nextSibling;
21 range.setStart(textNodeReference, 0)
22 range.setEnd(textNodeReference, 2);
24 var referenceWidth = range.getClientRects()[0].width;
26 document.getElementById("result").innerText = Math.abs(targetWidth - referenceWidth) <= 1 ? "PASS" : "FAIL: width was " + targetWidth + " instead of " + referenceWidth;
27 </script>