3 <title>Editing Test (Inserting a Thai character after a Thai prepend character)
</title>
4 <script src=
"../editing.js" language=
"javascript" type=
"text/javascript"></script>
5 <script language=
"javascript" type=
"text/javascript">
7 var li
= document
.createElement("li");
8 li
.appendChild(document
.createTextNode(str
));
9 var console
= document
.getElementById("console");
10 console
.appendChild(li
);
12 function editingTest() {
13 if (window
.testRunner
)
14 testRunner
.dumpAsText();
15 var testarea
= document
.getElementById("test");
17 typeCharacterCommand(String
.fromCharCode(0x0E2D));
18 typeCharacterCommand(String
.fromCharCode(0x0E22));
19 typeCharacterCommand(String
.fromCharCode(0x0E32));
20 typeCharacterCommand(String
.fromCharCode(0x0E01));
21 typeCharacterCommand(String
.fromCharCode(0x0E0D));
22 typeCharacterCommand(String
.fromCharCode(0x0E35));
23 typeCharacterCommand(String
.fromCharCode(0x0E48));
24 typeCharacterCommand(String
.fromCharCode(0x0E1B));
25 typeCharacterCommand(String
.fromCharCode(0x0E38));
26 typeCharacterCommand(String
.fromCharCode(0x0E48));
27 typeCharacterCommand(String
.fromCharCode(0x0E19));
28 moveSelectionBackwardByCharacterCommand();
29 moveSelectionBackwardByCharacterCommand();
30 moveSelectionBackwardByCharacterCommand();
31 typeCharacterCommand(String
.fromCharCode(0x0E44));
32 typeCharacterCommand(String
.fromCharCode(0x0E1B));
33 var expected_result
= "\u0E2D\u0E22\u0E32\u0E01\u0E44\u0E1B\u0E0D\u0E35\u0E48\u0E1B\u0E38\u0E48\u0E19";
34 if (testarea
.textContent
== expected_result
)
37 log("Failed. Actual: \"" + testarea
.textContent
.value
+ "\", Expected: \"" + expected_result
+ "\".");
42 <p>This test tests whether we can insert a Thai character after a Thai
"prepend" character.
</p>
43 <p>If this test succeeds, you can see a string
"succeeded" below.
</p>
44 <div contenteditable
id=
"test"></div>
45 <ul id=
"console"></ul>
46 <script language=
"javascript" type=
"text/javascript">