Index: LayoutTests/fast/dom/HTMLSelectElement/remove-element-from-within-focus-handler-crash.html |
diff --git a/LayoutTests/fast/dom/HTMLSelectElement/remove-element-from-within-focus-handler-crash.html b/LayoutTests/fast/dom/HTMLSelectElement/remove-element-from-within-focus-handler-crash.html |
index 5ea3a5772bf486c38e3978a4dee52bb1e4a8a2a4..5d039fa2c312bab100d71b55b522109b88c68b45 100644 |
--- a/LayoutTests/fast/dom/HTMLSelectElement/remove-element-from-within-focus-handler-crash.html |
+++ b/LayoutTests/fast/dom/HTMLSelectElement/remove-element-from-within-focus-handler-crash.html |
@@ -2,13 +2,15 @@ |
<option>Clicking on this select element should not crash</option> |
</select> |
<h2>Layout test for <a href='https://bugs.webkit.org/show_bug.cgi?id=23858'>bug 23858</a></h2> |
-<p>If this page is displayed without crashing then the test has passed.</p> |
+<p>If the select can be clicked without crashing then the test has passed.</p> |
<script> |
- if (window.testRunner) |
+ if (window.testRunner) |
testRunner.dumpAsText(); |
var select = document.getElementById('bomb'); |
- var mouseEvent = document.createEvent("MouseEvents"); |
- mouseEvent.initMouseEvent("mousedown", true, true, document.defaultView, 1, select.offsetLeft + 1, select.offsetTop + 1, select.offsetLeft + 1, select.offsetTop + 1, false, false, false, false, 0, document); |
- select.dispatchEvent(mouseEvent); |
+ var rect = select.getBoundingClientRect(); |
+ if (window.eventSender) { |
+ eventSender.mouseMoveTo(rect.left + 1, rect.top + 1); |
+ eventSender.mouseDown(0); |
+ } |
</script> |