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

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

Issue 27240: Make startup_tests build and run on Linux (except reference tests). (Closed)
Patch Set: small bugfix in process_util Created 11 years, 10 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
« no previous file with comments | « chrome/test/automation/automation_proxy.cc ('k') | chrome/test/startup/startup_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/automation/browser_proxy.cc
diff --git a/chrome/test/automation/browser_proxy.cc b/chrome/test/automation/browser_proxy.cc
index 3a0305d02470504c0b53d909ec3a51e8a5d43f01..942919d73332c7e2ef529ef6af6d2875d6757914 100644
--- a/chrome/test/automation/browser_proxy.cc
+++ b/chrome/test/automation/browser_proxy.cc
@@ -7,6 +7,7 @@
#include <vector>
#include "base/logging.h"
+#include "base/platform_thread.h"
#include "base/time.h"
#include "chrome/test/automation/autocomplete_edit_proxy.h"
#include "chrome/test/automation/automation_constants.h"
@@ -171,6 +172,8 @@ bool BrowserProxy::ApplyAccelerator(int id) {
new AutomationMsg_ApplyAccelerator(0, handle_, id));
}
+#if defined(OS_WIN)
+// TODO(port): Replace POINT.
bool BrowserProxy::SimulateDrag(const POINT& start,
const POINT& end,
int flags,
@@ -200,13 +203,14 @@ bool BrowserProxy::SimulateDragWithTimeout(const POINT& start,
return result;
}
+#endif // defined(OS_WIN)
bool BrowserProxy::WaitForTabCountToChange(int count, int* new_count,
int wait_timeout) {
const TimeTicks start = TimeTicks::Now();
const TimeDelta timeout = TimeDelta::FromMilliseconds(wait_timeout);
while (TimeTicks::Now() - start < timeout) {
- Sleep(automation::kSleepTime);
+ PlatformThread::Sleep(automation::kSleepTime);
bool is_timeout;
bool succeeded = GetTabCountWithTimeout(new_count, wait_timeout,
&is_timeout);
@@ -223,7 +227,7 @@ bool BrowserProxy::WaitForTabCountToBecome(int count, int wait_timeout) {
const TimeTicks start = TimeTicks::Now();
const TimeDelta timeout = TimeDelta::FromMilliseconds(wait_timeout);
while (TimeTicks::Now() - start < timeout) {
- Sleep(automation::kSleepTime);
+ PlatformThread::Sleep(automation::kSleepTime);
bool is_timeout;
int new_count;
bool succeeded = GetTabCountWithTimeout(&new_count, wait_timeout,
@@ -242,7 +246,7 @@ bool BrowserProxy::WaitForTabToBecomeActive(int tab,
const TimeTicks start = TimeTicks::Now();
const TimeDelta timeout = TimeDelta::FromMilliseconds(wait_timeout);
while (TimeTicks::Now() - start < timeout) {
- Sleep(automation::kSleepTime);
+ PlatformThread::Sleep(automation::kSleepTime);
int active_tab;
if (GetActiveTabIndex(&active_tab) && active_tab == tab)
return true;
@@ -280,6 +284,8 @@ bool BrowserProxy::IsFindWindowFullyVisible(bool* is_visible) {
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;
@@ -291,6 +297,7 @@ bool BrowserProxy::GetHWND(HWND* handle) const {
return sender_->Send(new AutomationMsg_WindowHWND(0, handle_, handle));
}
+#endif // defined(OS_WIN)
bool BrowserProxy::RunCommand(int browser_command) const {
if (!is_valid())
« no previous file with comments | « chrome/test/automation/automation_proxy.cc ('k') | chrome/test/startup/startup_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698