<html>
<head>
<script src="../resources/text-based-repaint.js" type="text/javascript"></script>
<script type="text/javascript">
function repaintTest()
{
firstLine.appendChild(document.createTextNode("\u00a0"));
firstLine.removeChild(firstLine.firstChild);
}
</script>
<style>
#firstLine { background-color: green; }
#firstLine::selection { background-color: green; }
</style>
</head>
<body onload="runRepaintAndPixelTest();">
<div id="root" style="width: 100px; line-height: 100px;">
<div id="firstLine">FAIL: Test did not run</div><br>
</div>
<script>
var root = document.getElementById("root");
var firstLine = document.getElementById("firstLine");
var selection = getSelection();
selection.setBaseAndExtent(firstLine, 0, root.lastChild, 0);
</script>
</body>