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

Unified Diff: third_party/WebKit/LayoutTests/fast/images/imagemap-dynamic-area-updates.html

Issue 2244333004: Use document.ElementFromPoint instead of eventsender. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/images/imagemap-dynamic-area-updates.html
diff --git a/third_party/WebKit/LayoutTests/fast/images/imagemap-dynamic-area-updates.html b/third_party/WebKit/LayoutTests/fast/images/imagemap-dynamic-area-updates.html
index 952150875e20d10552b931e6718e84fb2d21f197..27eb04ef42bef868890b08cac1c957ca9ca74473 100644
--- a/third_party/WebKit/LayoutTests/fast/images/imagemap-dynamic-area-updates.html
+++ b/third_party/WebKit/LayoutTests/fast/images/imagemap-dynamic-area-updates.html
@@ -9,14 +9,13 @@
<script>
test(function() {
var area = document.querySelector('area');
+ var mouseEvent = document.createEvent("MouseEvents");
+ mouseEvent.initEvent("click", true, true);
function checkPointInArea(shape, coords, x, y) {
area.setAttribute('shape', shape);
area.setAttribute('coords', coords);
areaClicked = false;
- // TODO(siva.gunturi): Use elementFromPoint here.
- eventSender.mouseMoveTo(x, y);
- eventSender.mouseDown();
- eventSender.mouseUp();
+ document.elementFromPoint(x, y).dispatchEvent(mouseEvent);
fs 2016/08/17 11:26:22 I'd suggest just returning the result of document.
sivag 2016/08/18 06:39:42 Done.
return areaClicked;
}
assert_true(checkPointInArea('default', '', 50, 50));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698