Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / text / atsui-bidi-control.html
blob8fbed8f7721020f5e961ea0c968b59b32d137ba1
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
5 <style>
6 .editing {
7 border: 2px solid red;
8 padding: 12px;
9 font-size: 24px;
11 </style>
13 <script>
14 function log(str) {
15 var li = document.createElement("li");
16 li.appendChild(document.createTextNode(str));
17 var console = document.getElementById("console");
18 console.appendChild(li);
21 function convertStringToUnicode(string)
23 var returnValue = " (character in Unicode value): ";
24 for (var i = 0; i < string.length; ++i)
26 returnValue += " " + string.charCodeAt(i);
28 return returnValue;
31 function assertEqual(test_name, actual, expected)
33 if (actual != expected) {
34 log("==================================");
35 log("FAILED: " + test_name);
36 var actual_string = "actual" + convertStringToUnicode(actual);
37 var expected_string = "expected" + convertStringToUnicode(expected);
38 log(actual_string);
39 log(expected_string);
43 onload = function()
45 if (window.testRunner)
46 testRunner.dumpAsText();
48 var div = document.getElementById("div");
49 var string = div.innerHTML;
50 assertEqual("arabic string", string, "\u0641\u0642 \u202A\u0643 \u0644 abc \u202C \u0645");
52 var sel = getSelection();
53 sel.collapse(div, 0);
55 var positions = [];
56 while (true) {
57 positions.push({ node: sel.extentNode, begin: sel.baseOffset, end: sel.extentOffset });
58 sel.modify("move", "right", "character");
59 if (positions[positions.length - 1].node == sel.extentNode && positions[positions.length - 1].end == sel.extentOffset)
60 break;
63 for (var i = 0; i < positions.length; ++i)
64 log("(" + positions[i].begin + "," + positions[i].end + ")");
66 </script>
68 <title>Editing Test</title>
69 </head>
70 <body>
71 <div contenteditable id="div" class="editing">&#x0641;&#x0642; &#x202a;&#x0643; &#x0644; abc &#x202c; &#x0645;</div>
72 <ul id="console"></ul>
73 </body>
74 </html>