cfb3c9cdac9ad9ad71bf81983e6de495ae06b276
[WebKit-https.git] / LayoutTests / fast / forms / slider-mouse-events.html
1 <html>
2     <head>
3         <script>
4             function log(msg)
5             {
6                 var res = document.getElementById('res');
7                 res.innerHTML = res.innerHTML + msg + "<br>";
8             }
9             function test()
10             {
11                 var slider = document.getElementById('slider');
12                 if (window.layoutTestController) {
13                     layoutTestController.dumpAsText();
14                     eventSender.mouseMoveTo(slider.offsetLeft + 7, slider.offsetTop + 7);
15                     eventSender.mouseDown();
16                     eventSender.mouseMoveTo(slider.offsetLeft + 50, slider.offsetTop + 50);
17                     eventSender.mouseUp();
18                 }
19             }
20         </script>
21     </head>
22     <body onload="test()">
23         This tests that slider controls get mouse down, input, and mouseup events.<br>
24         <input type="range" id="slider" onmousedown="log('mousedown')" onmouseup="log('mouseup')" oninput="log('input')" value=0>
25         <div id="res"></div>
26     </body>
27 </html>