5 // Tests that the slider thumb is repainted correctly when the mouse that's
6 // dragging it releases outside of the track. The result should be a thumb
7 // painted in the released state.
9 var ARBITRARY_DELTA
= 50;
11 function clickAndDragDiagonally(element
)
13 if (!window
.eventSender
)
16 var maxX
= element
.offsetLeft
+ element
.offsetWidth
;
18 var y
= element
.offsetTop
+ element
.offsetHeight
/ 2;
19 eventSender
.mouseMoveTo(x
, y
);
20 eventSender
.mouseDown();
21 eventSender
.mouseMoveTo(maxX
, y
+ ARBITRARY_DELTA
);
22 eventSender
.mouseUp();
27 clickAndDragDiagonally(document
.getElementById('slider'));
32 <body onload=
"runTest()">
33 <input id=
"slider" type=
"range" value=
"0">