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

Unified Diff: chrome/test/data/drag_and_drop/event_monitoring.js

Issue 2505183002: Have tests verify clientX/Y and pageX/Y properties in drag-and-drop DOM events. (Closed)
Patch Set: Created 4 years, 1 month 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: chrome/test/data/drag_and_drop/event_monitoring.js
diff --git a/chrome/test/data/drag_and_drop/event_monitoring.js b/chrome/test/data/drag_and_drop/event_monitoring.js
index e27cf37f1fe7d58fc3bd2e6dd1c9ad921fe62075..badd6ad9005ea12db5275264a0b67331d480c342 100644
--- a/chrome/test/data/drag_and_drop/event_monitoring.js
+++ b/chrome/test/data/drag_and_drop/event_monitoring.js
@@ -17,6 +17,9 @@ window.reportDragAndDropEvent = function(ev) {
if (window.domAutomationController) {
window.domAutomationController.setAutomationId(0);
window.domAutomationController.send({
+ client_position: safe(function() {
+ return "(" + ev.clientX + ", " + ev.clientY + ")";
+ }),
drop_effect: safe(function() { return ev.dataTransfer.dropEffect; }),
effect_allowed: safe(function() {
return ev.dataTransfer.effectAllowed;
@@ -31,6 +34,9 @@ window.reportDragAndDropEvent = function(ev) {
mime_types: safe(function() {
return Array.from(ev.dataTransfer.types).sort().join();
}),
+ page_position: safe(function() {
+ return "(" + ev.pageX + ", " + ev.pageY + ")";
+ }),
window_name: window.name
});
}

Powered by Google App Engine
This is Rietveld 408576698