blob: 62dbedb9cfcd5997896b656e972f707983e6988f [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.testRunner) {
window.testRunner.dumpAsText();
document.body.innerText = document.getElementById("description").innerHTML + "\n\nTest Passed (there was no crash)";
}
</script>