| Test that a backward delete in an editable root that contains only a single |
| visible position removes all children of the editable root. |
| <div id="editable-root" contenteditable> |
| <div id="square" style="background-color: red; height: 100px; width: 100px;">Lorem ipsum dolor sit amet</div> |
| var root = document.getElementById("editable-root"); |
| var square = document.getElementById("square"); |
| document.execCommand("SelectAll"); |
| document.execCommand("delete", "backward"); |
| document.getElementById("result").innerText = "FAIL: first delete removed the container"; |
| document.execCommand("delete", "backward"); |
| document.getElementById("result").innerText = square.parentNode ? "FAIL: second delete did not remove the container" : "PASS"; |