| <html> |
| <head> |
| <style> |
| .editing { |
| border: 2px solid red; |
| padding: 12px; |
| font-size: 24px; |
| } |
| </style> |
| <script src="../editing.js"></script> |
| <title>Delete Backward</title> |
| </head> |
| |
| <body> |
| |
| <p>This test makes sure that a surrogate-pair character is deleted by one pressing delete key</p> |
| <div contenteditable id="root0" class="editing">hogehoge</div> |
| <div contenteditable id="root1" class="editing">𠀾hogehoge</div> |
| <div contenteditable id="root2" class="editing">a𠀾</div> |
| <div contenteditable id="root3" class="editing">a𠀾</div> |
| <div contenteditable id="root4" class="editing">𠀾a</div> |
| <div contenteditable id="root5" class="editing">𠀾a</div> |
| <div contenteditable id="root6" class="editing">a𠀾a</div> |
| <div contenteditable id="root7" class="editing">a𠀾a</div> |
| <div contenteditable id="root8" class="editing">a𠀾a</div> |
| <div contenteditable id="root9" class="editing">a𠀾𠀾a</div> |
| <div contenteditable id="root10" class="editing">a𠀾𠀾a</div> |
| |
| <script> |
| if (window.testRunner) { |
| var pos = [4, 1, 1, 2, 1, 2, 1, 2, 3, 2, 3]; |
| for (var i = 0; i < 11; ++i) { |
| var div = document.getElementById("root" + i); |
| |
| div.focus(); |
| for (var j = 0; j < pos[i]; ++j) |
| testRunner.execCommand("MoveForward"); |
| |
| testRunner.execCommand("DeleteBackward"); |
| } |
| |
| testRunner.dumpAsText(); |
| } else { |
| document.write("This test requires testRunner.<br>"); |
| document.write("When doing manually, try to delete the above strings by hitting backspace key."); |
| } |
| |
| </script> |
| |
| </body> |
| </html> |