Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / deleting / 4875189.html
blobb1cdd7f049e89b853dc63a694781f1f278d9fc34
1 <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>
2 <div id="div" contentEditable="true">Paragraph One.<ul><li id="li">bar</li></ul>Paragraph Two.</div>
3 <ol id="console"></ol>
5 <script>
7 if (window.testRunner)
8 window.testRunner.dumpAsText();
10 function log(message) {
11 var console = document.getElementById("console");
12 var li = document.createElement("li");
13 var text = document.createTextNode(message);
14 li.appendChild(text);
15 console.appendChild(li);
18 var li = document.getElementById("li");
19 var sel = window.getSelection();
20 sel.setBaseAndExtent(li, 0, li, li.childNodes.length);
21 document.execCommand("Delete");
22 document.execCommand("Delete");
24 log(document.getElementById("div").innerHTML);
26 </script>