Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / click-range-slider.html
blob48620d06c208385e03cae9b27d7ca3e67693dcf2
1 <!DOCTYPE html>
2 <html>
3 <head>
4 </head>
5 <body>
6 <p>Test that click events are fired for a slider when the range of values is dense enough that the thumb element is repositioned under the cursor on mouse press.</p>
8 <!-- See bug 84674 -->
9 <input id="slider" type="range" min="0" max="100" value="50"></input>
10 <pre id="console"></pre>
11 <script src="../../resources/js-test.js"></script>
12 <script>
13 var clickCount = 0;
14 var slider;
16 function onClick(e)
18 clickCount++;
21 window.onload = function()
23 if (!window.testRunner)
24 return;
26 slider = document.getElementById("slider");
27 slider.addEventListener("click", onClick);
29 // Click respositions the slider thumb element under the cursor.
30 // Ensure that the click event still fires.
31 var x = slider.offsetLeft + 1;
32 var y = slider.offsetTop + slider.clientHeight / 2;
34 eventSender.mouseMoveTo(x, y);
35 eventSender.mouseDown();
36 eventSender.mouseUp();
38 eventSender.mouseMoveTo(x + slider.clientWidth - 2, y);
39 eventSender.mouseDown();
40 eventSender.mouseUp();
42 eventSender.mouseMoveTo(x + slider.clientWidth / 2, y);
43 eventSender.mouseDown();
44 eventSender.mouseUp();
46 shouldBe("clickCount", "3");
48 </script>
49 </body>
50 </html>