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

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

Issue 1234613004: Only execute default actions on trusted events. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master_event_trusted_main3
Patch Set: Rebase Created 5 years, 5 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
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..9859547681b765fd07359aabc39e764a1025f945 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
@@ -8,7 +8,10 @@
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>

Powered by Google App Engine
This is Rietveld 408576698