blob: b1cdd7f049e89b853dc63a694781f1f278d9fc34 [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.testRunner)
window.testRunner.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>