Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / tab-in-right-alignment.html
blobc697feb88df556558ef90e0e1d769620f8dc27a3
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
5 <script>
6 function log(str)
8 var li = document.createElement("li");
9 li.appendChild(document.createTextNode(str));
10 var console = document.getElementById("console");
11 console.appendChild(li);
14 onload = function()
16 var div = document.getElementById("div");
17 var pre = document.getElementById("pre");
18 var rightOfClientBox = div.clientWidth + div.offsetLeft - 20; // 20 for right padding in 'div' and 'pre'.
19 if (window.textInputController) {
20 var caretRect = textInputController.firstRectForCharacterRange(0, 0);
21 var xOfRightmostCharacter = caretRect[0];
22 if (xOfRightmostCharacter > rightOfClientBox)
23 log("FAILED: rightmost character (at " + xOfRightmostCharacter + ") is beyond the right edge (" + rightOfClientBox + ") of client box");
24 else
25 log("PASS");
26 caretRect = textInputController.firstRectForCharacterRange(1, 0);
27 if (caretRect[0] >= xOfRightmostCharacter)
28 log("FAILED: second rightmost character (at " + caretRect[0] + ") is on or beyond the right edge (" + rightOfClientBox + ") of client box");
29 else
30 log("PASS");
32 if (window.testRunner)
33 div.style.display = "none";
36 if (window.testRunner)
37 testRunner.dumpAsText();
39 </script>
40 </head>
41 <body>
42 <div contenteditable id="div" dir="rtl" style="padding-right: 10px; border-width: 10px; width: 40ex;border: solid 1px;"><pre style="padding-right: 10px; border-width: 10px" id="pre">פורסם: 24.04.09, 21:14</pre></div>
43 <ul id="console"></ul>
44 </body>
45 </html>