2 Test that a backward delete in an editable root that contains only a single
3 visible position removes all children of the editable root.
5 <div id=
"editable-root" contenteditable
>
6 <div id=
"square" style=
"background-color: red; height: 100px; width: 100px;">Lorem ipsum dolor sit amet
</div>
8 <div id=
"result"></div>
10 if (window
.testRunner
)
11 testRunner
.dumpAsText();
13 var root
= document
.getElementById("editable-root");
14 var square
= document
.getElementById("square");
16 document
.execCommand("SelectAll");
17 document
.execCommand("delete", "backward");
18 if (!square
.parentNode
)
19 document
.getElementById("result").innerText
= "FAIL: first delete removed the container";
21 document
.execCommand("delete", "backward");
22 document
.getElementById("result").innerText
= square
.parentNode
? "FAIL: second delete did not remove the container" : "PASS";