blob: 4fc119028bc014faf003817131ee297761cf28b8 [file] [log] [blame]
<html>
<head>
<script>
// Tests that the slider thumb is repainted correctly when the mouse that's
// dragging it releases outside of the track. The result should be a thumb
// painted in the released state.
var ARBITRARY_DELTA = 50;
function clickAndDragDiagonally(element)
{
if (!window.eventSender)
return;
var maxX = element.offsetLeft + element.offsetWidth;
var x = maxX / 2;
var y = element.offsetTop + element.offsetHeight / 2;
eventSender.mouseMoveTo(x, y);
eventSender.mouseDown();
eventSender.mouseMoveTo(maxX, y + ARBITRARY_DELTA);
eventSender.mouseUp();
}
function runTest()
{
clickAndDragDiagonally(document.getElementById('slider'));
}
</script>
</head>
<body onload="runTest()">
<input id="slider" type="range" value="0">
</body>
</html>