1 <div id=
"description">This tests for a crash when doing selection operations next to empty inline blocks. You should see HelloWorld below, and the 'W' should be inside the inline-block.
</div>
2 <div id=
"edit" contenteditable=
"true">Hello
<div><div id=
"div" style=
"display:inline-block; border: 1px solid red; height: 10px;"></div><div style=
"display:inline-block; border: 1px solid red; height: 10px;"></div> </div>World
</div>
5 edit
= document
.getElementById("edit");
6 text
= edit
.childNodes
[edit
.childNodes
.length
- 1];
7 window
.getSelection().collapse(text
, 2);
8 window
.getSelection().modify("move", "backward", "character");
9 if (window
.testRunner
) {
10 window
.testRunner
.dumpAsText();
11 document
.body
.innerText
= document
.getElementById("description").innerHTML
+ "\n\nTest Passed (there was no crash)";