OLD | NEW |
| (Empty) |
1 <html> | |
2 <head> | |
3 <script> | |
4 | |
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. | |
8 | |
9 var ARBITRARY_DELTA = 50; | |
10 | |
11 function clickAndDragDiagonally(element) | |
12 { | |
13 if (!window.eventSender) | |
14 return; | |
15 | |
16 var maxX = element.offsetLeft + element.offsetWidth; | |
17 var x = maxX / 2; | |
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(); | |
23 } | |
24 | |
25 function runTest() | |
26 { | |
27 clickAndDragDiagonally(document.getElementById('slider')); | |
28 } | |
29 | |
30 </script> | |
31 </head> | |
32 <body onload="runTest()"> | |
33 <input id="slider" type="range" value="0"> | |
34 </body> | |
35 </html> | |
OLD | NEW |