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

Unified Diff: LayoutTests/fast/forms/select-list-box-mouse-focus.html

Issue 1251043004: Revert of Only execute default actions on trusted events. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master_event_trusted_main3
Patch Set: 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/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 3c12014ffdbef40ff1ee41d900e298629c87ea1c..50326506db8afd361e53eeb56121e709061d1a83 100644
--- a/LayoutTests/fast/forms/select-list-box-mouse-focus.html
+++ b/LayoutTests/fast/forms/select-list-box-mouse-focus.html
@@ -4,14 +4,11 @@
if (window.testRunner)
testRunner.dumpAsText();
var select = document.getElementById("select");
- var rect = select.getBoundingClientRect();
- var x = rect.left + 10;
- var y = rect.top + 10;
-
- if (window.eventSender) {
- eventSender.mouseMoveTo(x, y);
- eventSender.mouseDown(0);
- }
+ 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);
}
function reportFocus()
{
« no previous file with comments | « LayoutTests/fast/forms/range/slider-zoomed.html ('k') | LayoutTests/virtual/trustedeventsdefaultaction/fast/events/README.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698