<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http:/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Test for http://bugs.webkit.org/show_bug.cgi?id=13685</title>
<style type="text/css">
span#q { background-color: green; }
span#q::selection { background-color: red; }
</style>
<script src="../resources/text-based-repaint.js" type="text/javascript"></script>
<script>
function repaintTest()
{
getSelection().empty();
}
</script>
</head>
<body onload="runRepaintAndPixelTest();">
<div id="t" style="height: 100px; overflow: hidden;">
<br><br><br><br>
<span id="q">Should have green background</span><br>
<br><br><br><br>
</div>
<script>
t.scrollTop = 100;
getSelection().setBaseAndExtent(q, 0, q, 1);
</script>
</body>
</html>