Index: LayoutTests/fast/forms/select-list-box-mouse-focus.html |
diff --git a/LayoutTests/fast/forms/select-list-box-mouse-focus.html b/LayoutTests/fast/forms/select-list-box-mouse-focus.html |
index 50326506db8afd361e53eeb56121e709061d1a83..3c12014ffdbef40ff1ee41d900e298629c87ea1c 100644 |
--- a/LayoutTests/fast/forms/select-list-box-mouse-focus.html |
+++ b/LayoutTests/fast/forms/select-list-box-mouse-focus.html |
@@ -4,11 +4,14 @@ function test() |
if (window.testRunner) |
testRunner.dumpAsText(); |
var select = document.getElementById("select"); |
- var x = select.clientLeft + 10; |
- var y = select.clientTop + 10; |
- var event = document.createEvent("MouseEvent"); |
- event.initMouseEvent("mousedown", true, true, document.defaultView, 1, x, y, x, y, false, false, false, false, 0, document); |
- select.dispatchEvent(event); |
+ var rect = select.getBoundingClientRect(); |
+ var x = rect.left + 10; |
+ var y = rect.top + 10; |
+ |
+ if (window.eventSender) { |
+ eventSender.mouseMoveTo(x, y); |
+ eventSender.mouseDown(0); |
+ } |
} |
function reportFocus() |
{ |