blob: e7172d1798f054ca4f8aa05681c865245f595405 [file] [log] [blame]
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="../editing.js" language="javascript" type="text/javascript" ></script>
<script language="javascript" type="text/javascript">
function log(str) {
var li = document.createElement("li");
li.appendChild(document.createTextNode(str));
var console = document.getElementById("console");
console.appendChild(li);
}
function sendBackwardDeleteKey() {
if (window.eventSender)
eventSender.keyDown(String.fromCharCode(0x0008), null);
}
function editingTest() {
if (window.testRunner)
testRunner.dumpAsText();
var testarea = document.getElementById("test");
testarea.focus();
typeCharacterCommand(String.fromCharCode(0x0E27));
typeCharacterCommand(String.fromCharCode(0x0E31));
moveSelectionBackwardByCharacterCommand();
moveSelectionForwardByCharacterCommand();
sendBackwardDeleteKey();
if (testarea.textContent == "\u0E27")
log("Succeeded.");
else
log("Failed. Actual: \"" + testarea.textContent + "\", Expected: \"\u0E27\"");
}
</script>
<title>Editing Test (Deleting a ligature)</title>
</head>
<body>
<p>This test tests whether the BackSpace key deletes only the last character of a ligature "&#x0E27;&#x0E31;".</p>
<p>If this test succeeds, you can see "&#x0E27;" (U+0E27) and a string "succeeded" below.</p>
<div id="test" contenteditable></div>
<ul id="console"></ul>
<script language="javascript" type="text/javascript">
runEditingTest();
</script>
</body>
</html>