blob: 7705c6e395dfde95da498032d1e16768782ed2ef [file] [log] [blame]
<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>
<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>
<script>
edit = document.getElementById("edit");
text = edit.childNodes[edit.childNodes.length - 1];
window.getSelection().setPosition(text, 2);
window.getSelection().modify("move", "backward", "character");
if (window.layoutTestController) {
window.layoutTestController.dumpAsText();
document.body.innerText = document.getElementById("description").innerHTML + "\n\nTest Passed (there was no crash)";
}
</script>