| <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> |
| <input id="slider" type="range" min="0" max="100" value="50"></input> |
| <script src="../../resources/js-test-pre.js"></script> |
| window.onload = function() |
| slider = document.getElementById("slider"); |
| slider.addEventListener("click", onClick); |
| // Click respositions the slider thumb element under the cursor. |
| // Ensure that the click event still fires. |
| var x = slider.offsetLeft + 1; |
| var y = slider.offsetTop + slider.clientHeight / 2; |
| eventSender.mouseMoveTo(x, y); |
| eventSender.mouseMoveTo(x + slider.clientWidth - 2, y); |
| eventSender.mouseMoveTo(x + slider.clientWidth / 2, y); |
| shouldBe("clickCount", "3"); |