summaryrefslogtreecommitdiffstats
path: root/chrome/test/automation
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/test/automation')
-rw-r--r--chrome/test/automation/automation_messages_internal.h6
-rw-r--r--chrome/test/automation/window_proxy.cc7
-rw-r--r--chrome/test/automation/window_proxy.h4
3 files changed, 17 insertions, 0 deletions
diff --git a/chrome/test/automation/automation_messages_internal.h b/chrome/test/automation/automation_messages_internal.h
index e7cd47f..e8f215c 100644
--- a/chrome/test/automation/automation_messages_internal.h
+++ b/chrome/test/automation/automation_messages_internal.h
@@ -1155,5 +1155,11 @@ IPC_BEGIN_MESSAGES(Automation)
int /* Type (Browser::Type) */,
bool /* show */ )
+ // This message requests that the mouse be moved to this location, in
+ // window coordinate space.
+ // Request:
+ // int - the handle of the window that's the context for this click
+ // gfx::Point - the location to move to
+ IPC_MESSAGE_ROUTED2(AutomationMsg_WindowMouseMove, int, gfx::Point)
IPC_END_MESSAGES(Automation)
diff --git a/chrome/test/automation/window_proxy.cc b/chrome/test/automation/window_proxy.cc
index 5b08842..1a8f56b 100644
--- a/chrome/test/automation/window_proxy.cc
+++ b/chrome/test/automation/window_proxy.cc
@@ -23,6 +23,13 @@ bool WindowProxy::SimulateOSClick(const gfx::Point& click, int flags) {
new AutomationMsg_WindowClick(0, handle_, click, flags));
}
+bool WindowProxy::SimulateOSMouseMove(const gfx::Point& location) {
+ if (!is_valid()) return false;
+
+ return sender_->Send(
+ new AutomationMsg_WindowMouseMove(0, handle_, location));
+}
+
bool WindowProxy::GetWindowTitle(string16* text) {
if (!is_valid()) return false;
diff --git a/chrome/test/automation/window_proxy.h b/chrome/test/automation/window_proxy.h
index 33a27c0..92f74ae 100644
--- a/chrome/test/automation/window_proxy.h
+++ b/chrome/test/automation/window_proxy.h
@@ -44,6 +44,10 @@ class WindowProxy : public AutomationResourceProxy {
// window, the top window is clicked.
bool SimulateOSClick(const gfx::Point& click, int flags);
+ // Moves the mouse pointer this location at the OS level. |location| is
+ // in the window's coordinates.
+ bool SimulateOSMouseMove(const gfx::Point& location);
+
// Get the title of the top level window.
bool GetWindowTitle(string16* text);