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

Unified Diff: chrome/test/automation/browser_proxy.cc

Issue 211033: Automated ui test porting + cleanup:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: all green\! Created 11 years, 3 months 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/automation/browser_proxy.cc
===================================================================
--- chrome/test/automation/browser_proxy.cc (revision 26702)
+++ chrome/test/automation/browser_proxy.cc (working copy)
@@ -6,6 +6,7 @@
#include <vector>
+#include "base/gfx/point.h"
#include "base/logging.h"
#include "base/platform_thread.h"
#include "base/time.h"
@@ -178,18 +179,16 @@
return RunCommandAsync(id);
}
-#if defined(OS_WIN)
-// TODO(port): Replace POINT.
-bool BrowserProxy::SimulateDrag(const POINT& start,
- const POINT& end,
+bool BrowserProxy::SimulateDrag(const gfx::Point& start,
+ const gfx::Point& end,
int flags,
bool press_escape_en_route) {
return SimulateDragWithTimeout(start, end, flags, base::kNoTimeout, NULL,
press_escape_en_route);
}
-bool BrowserProxy::SimulateDragWithTimeout(const POINT& start,
- const POINT& end,
+bool BrowserProxy::SimulateDragWithTimeout(const gfx::Point& start,
+ const gfx::Point& end,
int flags,
uint32 timeout_ms,
bool* is_timeout,
@@ -197,7 +196,7 @@
if (!is_valid())
return false;
- std::vector<POINT> drag_path;
+ std::vector<gfx::Point> drag_path;
drag_path.push_back(start);
drag_path.push_back(end);
@@ -209,7 +208,6 @@
return result;
}
-#endif // defined(OS_WIN)
bool BrowserProxy::WaitForTabCountToBecome(int count, int wait_timeout) {
const TimeTicks start = TimeTicks::Now();
@@ -272,21 +270,6 @@
new AutomationMsg_FindWindowVisibility(0, handle_, is_visible));
}
-#if defined(OS_WIN)
-// TODO(port): Replace HWND.
-bool BrowserProxy::GetHWND(HWND* handle) const {
- if (!is_valid())
- return false;
-
- if (!handle) {
- NOTREACHED();
- return false;
- }
-
- return sender_->Send(new AutomationMsg_WindowHWND(0, handle_, handle));
-}
-#endif // defined(OS_WIN)
-
bool BrowserProxy::RunCommandAsync(int browser_command) const {
if (!is_valid())
return false;
@@ -395,6 +378,17 @@
return result;
}
+bool BrowserProxy::TerminateSession() {
+ if (!is_valid())
+ return false;
+
+ bool result = false;
+
+ sender_->Send(new AutomationMsg_TerminateSession(0, handle_, &result));
+
+ return result;
+}
+
scoped_refptr<WindowProxy> BrowserProxy::GetWindow() const {
if (!is_valid())
return NULL;

Powered by Google App Engine
This is Rietveld 408576698