OLD | NEW |
1 <!DOCTYLE html> | 1 <!DOCTYLE html> |
2 <html> | 2 <html> |
3 <style> | 3 <style> |
4 input[type="range"]::-webkit-slider-container, | 4 input[type="range"]::-webkit-slider-container, |
5 input[type="range"]::-webkit-slider-runnable-track, | 5 input[type="range"]::-webkit-slider-runnable-track, |
6 input[type="range"]::-webkit-slider-thumb { | 6 input[type="range"]::-webkit-slider-thumb { |
7 display: inline; | 7 display: inline; |
8 } | 8 } |
9 </style> | 9 </style> |
10 <p>This test passes if dragging the thumb does not crash.</p> | 10 <p>This test passes if dragging the thumb does not crash.</p> |
11 <input id="slider" type="range"> | 11 <input id="slider" type="range"> |
12 <script> | 12 <script> |
13 function runTest() | 13 function runTest() |
14 { | 14 { |
15 if (!window.testRunner || !window.eventSender) | 15 if (!window.testRunner || !window.eventSender) |
16 return; | 16 return; |
17 testRunner.dumpAsText(); | 17 testRunner.dumpAsText(); |
18 | 18 |
19 var slider = document.getElementById("slider"); | 19 var slider = document.getElementById("slider"); |
20 var x = slider.offsetLeft + slider.offsetWidth / 2; | 20 var x = slider.offsetLeft + slider.offsetWidth / 2; |
21 var y = slider.offsetTop + slider.offsetHeight / 2; | 21 var y = slider.offsetTop + slider.offsetHeight / 2; |
22 eventSender.mouseMoveTo(x, y); | 22 eventSender.mouseMoveTo(x, y); |
23 eventSender.mouseDown(); | 23 eventSender.mouseDown(); |
24 eventSender.mouseUp(); | 24 eventSender.mouseUp(); |
25 } | 25 } |
26 | 26 |
27 runTest(); | 27 runTest(); |
28 </script> | 28 </script> |
29 </html> | 29 </html> |
OLD | NEW |