Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / text / offsetForPosition-complex-fallback.html
blob4304795be53a4d78247eb430aad2ded815e8f03b
1 <p>
2 Test offset for position computation across complex runs with font
3 fallbacks, in this case due to a font (Arial) lacking a newline glyph.
4 </p>
5 <p id="result">
6 Test did not run.
7 </p>
8 <div id="target" style="display: inline; font-family: Arial; text-rendering: optimizeLegibility;">
9 Jus&shy;ti&shy;fi&shy;ca&shy;tion
10 should
11 be used sparingly and cautiously on Web pages.
12 </div>
13 <script>
14 if (window.testRunner) {
15 testRunner.dumpAsText();
17 var target = document.getElementById("target");
18 var result = document.getElementById("result");
19 var x = target.offsetLeft + target.offsetWidth / 2;
20 var y = target.offsetTop + target.offsetHeight / 2;
22 eventSender.leapForward(1000);
23 eventSender.mouseMoveTo(x, y);
24 eventSender.mouseDown();
25 eventSender.mouseUp();
26 eventSender.leapForward(1);
27 eventSender.mouseDown();
28 eventSender.mouseUp();
29 eventSender.leapForward(1000);
31 var selectedText = getSelection().toString();
32 if (selectedText == "sparingly")
33 result.innerText = "PASS";
34 else
35 result.innerText = "FAIL: Selected text is \"" + selectedText + "\"";
37 </script>