summaryrefslogtreecommitdiffstats
path: root/chrome/test
diff options
context:
space:
mode:
authorsidchat@google.com <sidchat@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-14 22:52:44 +0000
committersidchat@google.com <sidchat@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-14 22:52:44 +0000
commit5e0f30c03417379891c4e0df39d935e4fbdb40ec (patch)
tree833c6ca64e26ed5266b32267a6caee9d2ead25eb /chrome/test
parent0f7a3cb6495f2e736b26be7799c73436ac2d15ac (diff)
downloadchromium_src-5e0f30c03417379891c4e0df39d935e4fbdb40ec.zip
chromium_src-5e0f30c03417379891c4e0df39d935e4fbdb40ec.tar.gz
chromium_src-5e0f30c03417379891c4e0df39d935e4fbdb40ec.tar.bz2
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@904 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r--chrome/test/automated_ui_tests/automated_ui_tests.cc2
-rw-r--r--chrome/test/automation/automation_messages_internal.h4
-rw-r--r--chrome/test/automation/browser_proxy.cc12
-rw-r--r--chrome/test/automation/browser_proxy.h12
4 files changed, 18 insertions, 12 deletions
diff --git a/chrome/test/automated_ui_tests/automated_ui_tests.cc b/chrome/test/automated_ui_tests/automated_ui_tests.cc
index b831fb1..f7767d1 100644
--- a/chrome/test/automated_ui_tests/automated_ui_tests.cc
+++ b/chrome/test/automated_ui_tests/automated_ui_tests.cc
@@ -820,7 +820,7 @@ bool AutomatedUITest::DragActiveTab(bool drag_right, bool drag_out) {
destination_point,
ChromeViews::Event::EF_LEFT_BUTTON_DOWN,
kWaitForActionMaxMsec,
- &is_timeout)) {
+ &is_timeout, false)) {
AddWarningAttribute("failed_to_simulate_drag");
return false;
}
diff --git a/chrome/test/automation/automation_messages_internal.h b/chrome/test/automation/automation_messages_internal.h
index bbd1782..e21a2cc 100644
--- a/chrome/test/automation/automation_messages_internal.h
+++ b/chrome/test/automation/automation_messages_internal.h
@@ -317,8 +317,8 @@ IPC_BEGIN_MESSAGES(Automation, 0)
// defined in chrome/views/event.h
// Response:
// bool - true if the drag could be performed
- IPC_MESSAGE_ROUTED3(AutomationMsg_WindowDragRequest,
- int, std::vector<POINT>, int)
+ IPC_MESSAGE_ROUTED4(AutomationMsg_WindowDragRequest,
+ int, std::vector<POINT>, int, bool)
IPC_MESSAGE_ROUTED1(AutomationMsg_WindowDragResponse, bool)
// Similar to AutomationMsg_InitialLoadsComplete, this indicates that the
diff --git a/chrome/test/automation/browser_proxy.cc b/chrome/test/automation/browser_proxy.cc
index 68e41ba..73f1938 100644
--- a/chrome/test/automation/browser_proxy.cc
+++ b/chrome/test/automation/browser_proxy.cc
@@ -254,15 +254,18 @@ bool BrowserProxy::ApplyAccelerator(int id) {
bool BrowserProxy::SimulateDrag(const POINT& start,
const POINT& end,
- int flags) {
- return SimulateDragWithTimeout(start, end, flags, INFINITE, NULL);
+ int flags,
+ bool press_escape_en_route) {
+ return SimulateDragWithTimeout(start, end, flags, INFINITE, NULL,
+ press_escape_en_route);
}
bool BrowserProxy::SimulateDragWithTimeout(const POINT& start,
const POINT& end,
int flags,
uint32 timeout_ms,
- bool* is_timeout) {
+ bool* is_timeout,
+ bool press_escape_en_route) {
if (!is_valid())
return false;
@@ -272,7 +275,8 @@ bool BrowserProxy::SimulateDragWithTimeout(const POINT& start,
IPC::Message* response = NULL;
bool succeeded = sender_->SendAndWaitForResponseWithTimeout(
- new AutomationMsg_WindowDragRequest(0, handle_, drag_path, flags),
+ new AutomationMsg_WindowDragRequest(0, handle_, drag_path, flags,
+ press_escape_en_route),
&response, AutomationMsg_WindowDragResponse::ID, timeout_ms, is_timeout);
scoped_ptr<IPC::Message> response_deleter(response); // Delete on return.
diff --git a/chrome/test/automation/browser_proxy.h b/chrome/test/automation/browser_proxy.h
index 17d7385..3eeef77 100644
--- a/chrome/test/automation/browser_proxy.h
+++ b/chrome/test/automation/browser_proxy.h
@@ -27,8 +27,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#ifndef CHROME_TEST_AUTOMATION_BROWSER_PROXY_H__
-#define CHROME_TEST_AUTOMATION_BROWSER_PROXY_H__
+#ifndef CHROME_TEST_AUTOMATION_BROWSER_PROXY_H_
+#define CHROME_TEST_AUTOMATION_BROWSER_PROXY_H_
#include <string>
#include <windows.h>
@@ -130,13 +130,15 @@ class BrowserProxy : public AutomationResourceProxy {
// Performs a drag operation between the start and end points (both defined
// in window coordinates). |flags| specifies which buttons are pressed for
// the drag, as defined in chrome/views/event.h.
- virtual bool SimulateDrag(const POINT& start, const POINT& end, int flags);
+ virtual bool SimulateDrag(const POINT& start, const POINT& end, int flags,
+ bool press_escape_en_route);
// Like SimulateDrag, but returns false if response is not received before
// the specified timeout.
virtual bool SimulateDragWithTimeout(const POINT& start, const POINT& end,
int flags, uint32 timeout_ms,
- bool* is_timeout);
+ bool* is_timeout,
+ bool press_escape_en_route);
// Block the thread until the tab count changes.
// |count| is the original tab count.
@@ -166,4 +168,4 @@ class BrowserProxy : public AutomationResourceProxy {
DISALLOW_EVIL_CONSTRUCTORS(BrowserProxy);
};
-#endif // #define CHROME_TEST_AUTOMATION_BROWSER_PROXY_H__
+#endif // CHROME_TEST_AUTOMATION_BROWSER_PROXY_H_