| OLD | NEW | 
|   1 <html> |   1 <html> | 
|   2 <head> |   2 <head> | 
|   3 <title>Editing Test (Skipping a virama sign)</title> |   3 <title>Editing Test (Skipping a virama sign)</title> | 
|   4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |   4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | 
|   5 <script src="../editing.js" language="javascript" type="text/javascript"></scrip
    t> |   5 <script src="../editing.js" language="javascript" type="text/javascript"></scrip
    t> | 
|   6 <script language="javascript" type="text/javascript"> |   6 <script language="javascript" type="text/javascript"> | 
|   7 function log(str) { |   7 function log(str) { | 
|   8     var li = document.createElement("li"); |   8     var li = document.createElement("li"); | 
|   9     li.appendChild(document.createTextNode(str)); |   9     li.appendChild(document.createTextNode(str)); | 
|  10     var console = document.getElementById("console"); |  10     var console = document.getElementById("console"); | 
|  11     console.appendChild(li); |  11     console.appendChild(li); | 
|  12 } |  12 } | 
|  13 function sendBackwardDeleteKey() { |  13 function sendBackwardDeleteKey() { | 
|  14     if (window.eventSender) |  14     if (window.eventSender) | 
|  15         eventSender.keyDown(String.fromCharCode(0x0008), null); |  15         eventSender.keyDown("backspace", null); | 
|  16 } |  16 } | 
|  17 function editingTest() { |  17 function editingTest() { | 
|  18     if (window.testRunner) |  18     if (window.testRunner) | 
|  19         testRunner.dumpAsText(); |  19         testRunner.dumpAsText(); | 
|  20     var testarea = document.getElementById("test"); |  20     var testarea = document.getElementById("test"); | 
|  21     testarea.focus(); |  21     testarea.focus(); | 
|  22     typeCharacterCommand(String.fromCharCode(0x0915)); |  22     typeCharacterCommand(String.fromCharCode(0x0915)); | 
|  23     typeCharacterCommand(String.fromCharCode(0x094D)); |  23     typeCharacterCommand(String.fromCharCode(0x094D)); | 
|  24     typeCharacterCommand(String.fromCharCode(0x0937)); |  24     typeCharacterCommand(String.fromCharCode(0x0937)); | 
|  25     moveSelectionBackwardByCharacterCommand(); |  25     moveSelectionBackwardByCharacterCommand(); | 
|  26     sendBackwardDeleteKey(); |  26     sendBackwardDeleteKey(); | 
|  27     var expected_result = "\u0915\u094D\u0937"; |  27     var expected_result = "\u0915\u094D\u0937"; | 
|  28     if (testarea.textContent == expected_result) |  28     if (testarea.textContent == expected_result) | 
|  29         log("Succeeded."); |  29         log("Succeeded."); | 
|  30     else |  30     else | 
|  31         log("Failed. Actual: \"" + testarea.textContent + "\", Expected: \"" + e
    xpected_result + "\"."); |  31         log("Failed. Actual: \"" + testarea.textContent + "\", Expected: \"" + e
    xpected_result + "\"."); | 
|  32 } |  32 } | 
|  33 </script> |  33 </script> | 
|  34 </head> |  34 </head> | 
|  35 <body> |  35 <body> | 
|  36 <p>This test tests whether or not we can prevent a cursor from moving after a vi
    rama sign.</p> |  36 <p>This test tests whether or not we can prevent a cursor from moving after a vi
    rama sign.</p> | 
|  37 <p>If this test succeeds, you can see a string "succeeded" below.</p> |  37 <p>If this test succeeds, you can see a string "succeeded" below.</p> | 
|  38 <div contenteditable id="test"></div> |  38 <div contenteditable id="test"></div> | 
|  39 <ul id="console"></ul> |  39 <ul id="console"></ul> | 
|  40 <script language="javascript" type="text/javascript"> |  40 <script language="javascript" type="text/javascript"> | 
|  41 runEditingTest(); |  41 runEditingTest(); | 
|  42 </script> |  42 </script> | 
|  43 </body> |  43 </body> | 
|  44 </html> |  44 </html> | 
| OLD | NEW |