Index: LayoutTests/fast/forms/range/slider-zoomed.html |
diff --git a/LayoutTests/fast/forms/range/slider-zoomed.html b/LayoutTests/fast/forms/range/slider-zoomed.html |
index 23a36814cd7bcda4929ba939ba9a9a0b5ed99714..efa0aefacb1266d7ccedcde5151330a732db82af 100644 |
--- a/LayoutTests/fast/forms/range/slider-zoomed.html |
+++ b/LayoutTests/fast/forms/range/slider-zoomed.html |
@@ -18,19 +18,14 @@ |
if (window.testRunner) |
testRunner.dumpAsText(); |
- function dispatchEvent(eventType, clientX, clientY) |
- { |
- var ev = document.createEvent("MouseEvent"); |
- ev.initMouseEvent(eventType, true, true, window, 1, 1, 1, clientX, clientY, false, false, false, false, 0, document); |
- var target = document.elementFromPoint(ev.clientX, ev.clientY); |
- target.dispatchEvent(ev); |
- } |
- |
function test() |
{ |
// For some reason the slider needs mouseup/mousedown, not just a "click" |
- dispatchEvent("mousedown", 150, 15); |
- dispatchEvent("mouseup", 150, 15); |
+ if (window.eventSender) { |
+ eventSender.mouseMoveTo(150, 15); |
+ eventSender.mouseDown(0); |
+ eventSender.mouseUp(0); |
+ } |
const expectedValue = 72; |
var val = document.getElementById('slider').value; |
@@ -48,4 +43,4 @@ |
<div id="results"> |
</div> |
</body> |
-</html> |
+</html> |