10 <script src=
"../editing.js"></script>
11 <title>Delete Backward
</title>
16 <p>This test makes sure that a surrogate-pair character is deleted by one pressing delete key
</p>
17 <div contenteditable
id=
"root0" class=
"editing">hogehoge
</div>
18 <div contenteditable
id=
"root1" class=
"editing">𠀾hogehoge
</div>
19 <div contenteditable
id=
"root2" class=
"editing">a
𠀾</div>
20 <div contenteditable
id=
"root3" class=
"editing">a
𠀾</div>
21 <div contenteditable
id=
"root4" class=
"editing">𠀾a
</div>
22 <div contenteditable
id=
"root5" class=
"editing">𠀾a
</div>
23 <div contenteditable
id=
"root6" class=
"editing">a
𠀾a
</div>
24 <div contenteditable
id=
"root7" class=
"editing">a
𠀾a
</div>
25 <div contenteditable
id=
"root8" class=
"editing">a
𠀾a
</div>
26 <div contenteditable
id=
"root9" class=
"editing">a
𠀾𠀾a
</div>
27 <div contenteditable
id=
"root10" class=
"editing">a
𠀾𠀾a
</div>
30 if (window
.testRunner
) {
31 var pos
= [4, 1, 1, 2, 1, 2, 1, 2, 3, 2, 3];
32 for (var i
= 0; i
< 11; ++i
) {
33 var div
= document
.getElementById("root" + i
);
36 for (var j
= 0; j
< pos
[i
]; ++j
)
37 testRunner
.execCommand("MoveForward");
39 testRunner
.execCommand("DeleteBackward");
42 testRunner
.dumpAsText();
44 document
.write("This test requires testRunner.<br>");
45 document
.write("When doing manually, try to delete the above strings by hitting backspace key.");