diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-13 23:34:24 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-13 23:34:24 +0000 |
commit | d1a5941efcd68dddd76d411f276353f34bb93f76 (patch) | |
tree | 95030e03f2e5dd16b0fab9da3b8fc4bd64d25b96 /chrome/test/automation | |
parent | 874755ab46efe9e3b84b4c6b479e5dc813e93445 (diff) | |
download | chromium_src-d1a5941efcd68dddd76d411f276353f34bb93f76.zip chromium_src-d1a5941efcd68dddd76d411f276353f34bb93f76.tar.gz chromium_src-d1a5941efcd68dddd76d411f276353f34bb93f76.tar.bz2 |
linux: More automation porting.
I have verified that this is working on Linux, but still have yet to enable any new automated tests. Baby steps.
BUG=19076
Review URL: http://codereview.chromium.org/164446
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23386 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/automation')
-rw-r--r-- | chrome/test/automation/automation_messages_internal.h | 17 | ||||
-rw-r--r-- | chrome/test/automation/window_proxy.cc | 4 | ||||
-rw-r--r-- | chrome/test/automation/window_proxy.h | 5 |
3 files changed, 19 insertions, 7 deletions
diff --git a/chrome/test/automation/automation_messages_internal.h b/chrome/test/automation/automation_messages_internal.h index b2b3f02..46bb160 100644 --- a/chrome/test/automation/automation_messages_internal.h +++ b/chrome/test/automation/automation_messages_internal.h @@ -12,6 +12,7 @@ #include <vector> #include "base/basictypes.h" +#include "base/gfx/point.h" #include "base/gfx/rect.h" #include "base/string16.h" #include "chrome/common/navigation_types.h" @@ -389,16 +390,20 @@ IPC_BEGIN_MESSAGES(Automation) int /* AutocompleteEdit handle */) #if defined(OS_WIN) - // TODO(port): Port this message. + // TODO(estade): This message is defined later on for Mac and Linux. This is + // to avoid adding a new IPC in the middle for those platforms (see comment + // at top). The message is exactly the same, so they should be remerged when + // all messages in this file have been made cross-platform (at which point we + // will need to check in new reference builds). // // This message requests that a mouse click be performed in window coordinate // space. // Request: // int - the handle of the window that's the context for this click - // POINT - the point to click + // gfx::Point - the point to click // int - the flags which identify the mouse button(s) for the click, as // defined in chrome/views/event.h - IPC_MESSAGE_ROUTED3(AutomationMsg_WindowClick, int, POINT, int) + IPC_MESSAGE_ROUTED3(AutomationMsg_WindowClick, int, gfx::Point, int) #endif // defined(OS_WIN) // This message requests that a key press be performed. @@ -988,4 +993,10 @@ IPC_BEGIN_MESSAGES(Automation) IPC_SYNC_MESSAGE_ROUTED0_1(AutomationMsg_GetFilteredInetHitCount, int /* hit_count */) +#if defined(OS_LINUX) || defined(OS_MACOSX) + // See previous definition of this message for explanation of why it is + // defined twice. + IPC_MESSAGE_ROUTED3(AutomationMsg_WindowClick, int, gfx::Point, int) +#endif + IPC_END_MESSAGES(Automation) diff --git a/chrome/test/automation/window_proxy.cc b/chrome/test/automation/window_proxy.cc index eea1ced..cb672d3 100644 --- a/chrome/test/automation/window_proxy.cc +++ b/chrome/test/automation/window_proxy.cc @@ -27,14 +27,14 @@ bool WindowProxy::GetHWND(HWND* handle) const { return sender_->Send(new AutomationMsg_WindowHWND(0, handle_, handle)); } +#endif // defined(OS_WIN) -bool WindowProxy::SimulateOSClick(const POINT& click, int flags) { +bool WindowProxy::SimulateOSClick(const gfx::Point& click, int flags) { if (!is_valid()) return false; return sender_->Send( new AutomationMsg_WindowClick(0, handle_, click, flags)); } -#endif // defined(OS_WIN) 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 efbe1ca..0133ff7 100644 --- a/chrome/test/automation/window_proxy.h +++ b/chrome/test/automation/window_proxy.h @@ -21,6 +21,7 @@ class BrowserProxy; class WindowProxy; namespace gfx { + class Point; class Rect; } @@ -41,14 +42,14 @@ class WindowProxy : public AutomationResourceProxy { // Gets the outermost HWND that corresponds to the given window. // Returns true if the call was successful. bool GetHWND(HWND* handle) const; +#endif // defined(OS_WIN) // Simulates a click at the OS level. |click| is in the window's coordinates // and |flags| specifies which buttons are pressed (as defined in // chrome/views/event.h). Note that this is equivalent to the user moving // the mouse and pressing the button. So if there is a window on top of this // window, the top window is clicked. - bool SimulateOSClick(const POINT& click, int flags); -#endif // defined(OS_WIN) + bool SimulateOSClick(const gfx::Point& click, int flags); // Get the title of the top level window. bool GetWindowTitle(string16* text); |