3 if (window.layoutTestController)
4 layoutTestController.dumpEditingCallbacks();
9 var li = document.createElement("li");
10 li.appendChild(document.createTextNode(str));
11 var console = document.getElementById("console");
12 console.appendChild(li);
15 function assert(bool) {
24 <p>This tests queryCommandState for InsertUnorderedList and InsertOrderedList.</p>
25 <div id="div" contenteditable="true">foo</div>
26 <ol id="console"></ol>
28 if (window.layoutTestController)
29 window.layoutTestController.dumpAsText();
30 var sel = window.getSelection();
31 var div = document.getElementById("div");
32 sel.setPosition(div, 0);
34 assert(!document.queryCommandState("InsertUnorderedList"));
35 assert(!document.queryCommandState("InsertOrderedList"));
36 document.execCommand("InsertUnorderedList");
37 assert(document.queryCommandState("InsertUnorderedList"));
38 assert(!document.queryCommandState("InsertOrderedList"));
39 document.execCommand("InsertUnorderedList");
40 document.execCommand("InsertOrderedList");
41 assert(!document.queryCommandState("InsertUnorderedList"));
42 assert(document.queryCommandState("InsertOrderedList"));