blob: 90680aeddd3e67e5464efcbc81b99dfb74f4d8ba [file] [log] [blame]
ap@webkit.orgee2987b2008-12-10 12:49:56 +00001<html xmlns="http://www.w3.org/1999/xhtml">
2 <head>
3 <script src="../editing.js" language="javascript" type="text/javascript" ></script>
4 <script language="javascript" type="text/javascript">
5 function log(str) {
6 var li = document.createElement("li");
7 li.appendChild(document.createTextNode(str));
8 var console = document.getElementById("console");
9 console.appendChild(li);
10 }
11 function sendBackwardDeleteKey() {
12 if (window.eventSender)
13 eventSender.keyDown(String.fromCharCode(0x0008), null);
14 }
15 function editingTest() {
rniwa@webkit.org14f6b5b2012-06-13 08:51:53 +000016 if (window.testRunner)
17 window.testRunner.dumpAsText();
ap@webkit.orgee2987b2008-12-10 12:49:56 +000018 var textarea = document.getElementById("test");
19 textarea.focus();
20 typeCharacterCommand(String.fromCharCode(0x0E27));
21 typeCharacterCommand(String.fromCharCode(0x0E31));
22 sendBackwardDeleteKey();
23 if (textarea.value == "\u0E27")
24 log("Succeeded.");
25 else
26 log("Failed. Actual: \"" + textarea.value + "\", Expected: \"\u0E27\"");
27 }
28 </script>
29 <title>Editing Test (Deleting a ligature)</title>
30 </head>
31 <body>
32 <p>This test tests whether the BackSpace key deletes only the last character of a ligature "&#x0E27;&#x0E31;".</p>
33 <p>If this test succeeds, you can see "&#x0E27;" (U+0E27) and a string "succeeded" below.</p>
34 <textarea id="test" rows="1" cols="40"></textarea>
35 <ul id="console"></ul>
36 <script language="javascript" type="text/javascript">
37 runEditingTest();
38 </script>
39 </body>
40</html>