Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: LayoutTests/fast/dom/HTMLSelectElement/remove-element-from-within-focus-handler-crash.html

Issue 894913002: Prevent default actions for JS-generated mouse events other than click (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: TIL, gclient sync may rebase changes back in time Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/dom/HTMLSelectElement/remove-element-from-within-focus-handler-crash-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « no previous file | LayoutTests/fast/dom/HTMLSelectElement/remove-element-from-within-focus-handler-crash-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698