2 if (window
.testRunner
) {
3 testRunner
.dumpEditingCallbacks();
4 testRunner
.dumpAsText();
7 function log(message
) {
8 var console
= document
.getElementById("console");
9 var text
= document
.createTextNode(message
);
10 console
.appendChild(text
);
14 <p>This test checks to see that Insert{Un}OrderedList can remove items from a list, can remove empty list when they are emptied, and can remove content from orphaned list items.
</p>
15 <div id=
"div" contenteditable=
"true">
16 <ol style=
"border: 1px solid red;">
18 <span id=
"item1">This should not be a list.
</span>
22 <span id=
"item2">This should not be in a list.
</span>
24 <li><span id=
"item3">This should not be in a list.
</span></li>
27 <li><span id=
"item4">This should not be in a list.
</span></li>
28 <ul><li><span id=
"item5">This should not be in a list.
</span></li></ul>
33 var s
= window
.getSelection();
34 s
.collapse(document
.getElementById("item1"), 0);
35 document
.execCommand("InsertOrderedList", false, "");
36 s
.collapse(document
.getElementById("item2"), 0);
37 document
.execCommand("InsertOrderedList", false, "");
38 s
.collapse(document
.getElementById("item3"), 0);
39 document
.execCommand("InsertOrderedList", false, "");
40 s
.collapse(document
.getElementById("item4"), 0);
41 document
.execCommand("InsertUnorderedList", false, "");
42 s
.collapse(document
.getElementById("item5"), 0);
43 document
.execCommand("InsertUnorderedList", false, "");