blob: fc320e5cd1ea134a9d2a4f21ffd3ac597760e470 [file] [log] [blame]
<p>This test deletes the contents of a list, then it performs another delete, which should remove the empty list item. There should be two paragraphs below.</p>
<div id="div" contentEditable="true">Paragraph One.<ul><li id="li">bar</li></ul>Paragraph Two.</div>
<ol id="console"></ol>
<script>
if (window.layoutTestController)
window.layoutTestController.dumpAsText();
function log(message) {
var console = document.getElementById("console");
var li = document.createElement("li");
var text = document.createTextNode(message);
li.appendChild(text);
console.appendChild(li);
}
var li = document.getElementById("li");
var sel = window.getSelection();
sel.setBaseAndExtent(li, 0, li, li.childNodes.length);
document.execCommand("Delete");
document.execCommand("Delete");
log(document.getElementById("div").innerHTML);
</script>