<script src="../resources/text-based-repaint.js" type="text/javascript"></script>
<script type="text/javascript">
function repaintTest() {
document.execCommand("Delete");
}
</script>
<body onload="runRepaintAndPixelTest();" contenteditable="true">
<p>This tests to see if selection gaps are removed when the selection is deleted. Nothing should be selected below. A caret should be inside the red div.</p>
<div id="test" style="width: 150px; border: 1px solid red; margin: 30px;">hello world hello world hello world hello world hello world hello world hello world hello world hello<br></div>
<script>
var s = window.getSelection();
var e = document.getElementById("test");
s.setBaseAndExtent(e, 0, e, e.childNodes.length);
</script>
</body>