--- /dev/null
+EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document
+EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of LI > UL > DIV > BODY > HTML > #document to 0 of LI > UL > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of LI > OL > DIV > BODY > HTML > #document to 0 of LI > OL > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
+This tests queryCommandState for InsertUnorderedList and InsertOrderedList.
+
+foo
+Success
+Success
+Success
+Success
+Success
+Success
+
--- /dev/null
+<head>
+<script>
+function log(str) {
+ var li = document.createElement("li");
+ li.appendChild(document.createTextNode(str));
+ var console = document.getElementById("console");
+ console.appendChild(li);
+}
+
+function assert(bool) {
+ if (!bool)
+ log("Failure");
+ else
+ log("Success");
+}
+</script>
+</head>
+<body>
+<p>This tests queryCommandState for InsertUnorderedList and InsertOrderedList.</p>
+<div id="div" contenteditable="true">foo</div>
+<ol id="console"></ol>
+<script>
+if (window.layoutTestController)
+ window.layoutTestController.dumpAsText();
+var sel = window.getSelection();
+var div = document.getElementById("div");
+sel.setPosition(div, 0);
+
+assert(!document.queryCommandState("InsertUnorderedList"));
+assert(!document.queryCommandState("InsertOrderedList"));
+document.execCommand("InsertUnorderedList");
+assert(document.queryCommandState("InsertUnorderedList"));
+assert(!document.queryCommandState("InsertOrderedList"));
+document.execCommand("InsertUnorderedList");
+document.execCommand("InsertOrderedList");
+assert(!document.queryCommandState("InsertUnorderedList"));
+assert(document.queryCommandState("InsertOrderedList"));
+</script>
+</body>