summaryrefslogtreecommitdiffstats
path: root/chrome/test/automation/automation_json_requests.h
diff options
context:
space:
mode:
authorkkania@chromium.org <kkania@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-10 00:18:55 +0000
committerkkania@chromium.org <kkania@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-10 00:18:55 +0000
commit97db8d3429e73fc8ea685be2fe8166d3dca51093 (patch)
tree13d9cf1808c6644e7179ec158e5ee488bbd497b9 /chrome/test/automation/automation_json_requests.h
parent4e8c1454f09d58b4c7bfae5e6c3898356ad09670 (diff)
downloadchromium_src-97db8d3429e73fc8ea685be2fe8166d3dca51093.zip
chromium_src-97db8d3429e73fc8ea685be2fe8166d3dca51093.tar.gz
chromium_src-97db8d3429e73fc8ea685be2fe8166d3dca51093.tar.bz2
Change chromedriver to use the current session key modifier state when
processing mouse events. BUG=109029 TEST=none Review URL: http://codereview.chromium.org/9030034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116966 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/automation/automation_json_requests.h')
-rw-r--r--chrome/test/automation/automation_json_requests.h44
1 files changed, 37 insertions, 7 deletions
diff --git a/chrome/test/automation/automation_json_requests.h b/chrome/test/automation/automation_json_requests.h
index 4d855b1..5d35400 100644
--- a/chrome/test/automation/automation_json_requests.h
+++ b/chrome/test/automation/automation_json_requests.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -39,6 +39,22 @@ struct WebKeyEvent {
int modifiers;
};
+struct WebMouseEvent {
+ WebMouseEvent(automation::MouseEventType type,
+ automation::MouseButton button,
+ int x,
+ int y,
+ int click_count,
+ int modifiers);
+
+ automation::MouseEventType type;
+ automation::MouseButton button;
+ int x;
+ int y;
+ int click_count;
+ int modifiers;
+};
+
// Uniquely identifies a particular WebView.
// This is needed because Chrome used to accept just tab IDs, while
// now it accepts IDs for other types of WebViews.
@@ -292,7 +308,8 @@ bool SendCloseViewJSONRequest(
// Requests to send the WebKit event for a mouse move to the given
// coordinate in the specified view. Returns true on success.
-bool SendMouseMoveJSONRequest(
+// Deprecated. TODO(kkania): Remove when chrome 17 is unsupported.
+bool SendMouseMoveJSONRequestDeprecated(
AutomationMessageSender* sender,
const WebViewLocator& locator,
int x,
@@ -301,7 +318,8 @@ bool SendMouseMoveJSONRequest(
// Requests to send the WebKit events for a mouse click at the given
// coordinate in the specified view. Returns true on success.
-bool SendMouseClickJSONRequest(
+// Deprecated. TODO(kkania): Remove when chrome 17 is unsupported.
+bool SendMouseClickJSONRequestDeprecated(
AutomationMessageSender* sender,
const WebViewLocator& locator,
automation::MouseButton button,
@@ -311,7 +329,8 @@ bool SendMouseClickJSONRequest(
// Requests to send the WebKit events for a mouse drag from the start to end
// coordinates given in the specified view. Returns true on success.
-bool SendMouseDragJSONRequest(
+// Deprecated. TODO(kkania): Remove when chrome 17 is unsupported.
+bool SendMouseDragJSONRequestDeprecated(
AutomationMessageSender* sender,
const WebViewLocator& locator,
int start_x,
@@ -322,7 +341,8 @@ bool SendMouseDragJSONRequest(
// Requests to send the WebKit event for a mouse button down at the given
// coordinate in the specified view. Returns true on success.
-bool SendMouseButtonDownJSONRequest(
+// Deprecated. TODO(kkania): Remove when chrome 17 is unsupported.
+bool SendMouseButtonDownJSONRequestDeprecated(
AutomationMessageSender* sender,
const WebViewLocator& locator,
int x,
@@ -331,7 +351,8 @@ bool SendMouseButtonDownJSONRequest(
// Requests to send the WebKit event for a mouse button up at the given
// coordinate in the specified view. Returns true on success.
-bool SendMouseButtonUpJSONRequest(
+// Deprecated. TODO(kkania): Remove when chrome 17 is unsupported.
+bool SendMouseButtonUpJSONRequestDeprecated(
AutomationMessageSender* sender,
const WebViewLocator& locator,
int x,
@@ -340,7 +361,8 @@ bool SendMouseButtonUpJSONRequest(
// Requests to send the WebKit event for a mouse double click at the given
// coordinate in the specified view. Returns true on success.
-bool SendMouseDoubleClickJSONRequest(
+// Deprecated. TODO(kkania): Remove when chrome 17 is unsupported.
+bool SendMouseDoubleClickJSONRequestDeprecated(
AutomationMessageSender* sender,
const WebViewLocator& locator,
int x,
@@ -364,6 +386,14 @@ bool SendNativeKeyEventJSONRequest(
int modifiers,
automation::Error* error) WARN_UNUSED_RESULT;
+// Requests to send the WebKit event for the given |WebMouseEvent| in a
+// specified view. Returns true on success.
+bool SendWebMouseEventJSONRequest(
+ AutomationMessageSender* sender,
+ const WebViewLocator& locator,
+ const WebMouseEvent& mouse_event,
+ automation::Error* error) WARN_UNUSED_RESULT;
+
// Requests to drag and drop the file paths at the given coordinate in the
// specified view. Returns true on success.
bool SendDragAndDropFilePathsJSONRequest(