summaryrefslogtreecommitdiffstats
path: root/chrome/test/automation
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/test/automation')
-rw-r--r--chrome/test/automation/autocomplete_edit_proxy.cc3
-rw-r--r--chrome/test/automation/automation_proxy.cc4
-rw-r--r--chrome/test/automation/automation_proxy.h9
-rw-r--r--chrome/test/automation/automation_proxy_uitest.cc2
-rw-r--r--chrome/test/automation/browser_proxy.cc4
-rw-r--r--chrome/test/automation/proxy_launcher.cc3
-rw-r--r--chrome/test/automation/tab_proxy.cc5
7 files changed, 17 insertions, 13 deletions
diff --git a/chrome/test/automation/autocomplete_edit_proxy.cc b/chrome/test/automation/autocomplete_edit_proxy.cc
index 019326b..fd8061b 100644
--- a/chrome/test/automation/autocomplete_edit_proxy.cc
+++ b/chrome/test/automation/autocomplete_edit_proxy.cc
@@ -6,6 +6,7 @@
#include <vector>
+#include "base/threading/platform_thread.h"
#include "chrome/common/automation_constants.h"
#include "chrome/common/automation_messages.h"
#include "chrome/test/automation/automation_proxy.h"
@@ -66,7 +67,7 @@ bool AutocompleteEditProxy::WaitForQuery(int wait_timeout_ms) const {
while (TimeTicks::Now() - start < timeout) {
if (IsQueryInProgress(&query_in_progress) && !query_in_progress)
return true;
- PlatformThread::Sleep(automation::kSleepTime);
+ base::PlatformThread::Sleep(automation::kSleepTime);
}
// If we get here the query is still in progress.
return false;
diff --git a/chrome/test/automation/automation_proxy.cc b/chrome/test/automation/automation_proxy.cc
index cf9391d..1138cc4 100644
--- a/chrome/test/automation/automation_proxy.cc
+++ b/chrome/test/automation/automation_proxy.cc
@@ -10,7 +10,7 @@
#include "base/basictypes.h"
#include "base/logging.h"
-#include "base/platform_thread.h"
+#include "base/threading/platform_thread.h"
#include "base/process_util.h"
#include "base/ref_counted.h"
#include "base/waitable_event.h"
@@ -105,7 +105,7 @@ AutomationProxy::AutomationProxy(int command_execution_timeout_ms,
// Zero also seems unreasonable, since we need to wait for IPC, but at
// least it is legal... ;-)
DCHECK_GE(command_execution_timeout_ms, 0);
- listener_thread_id_ = PlatformThread::CurrentId();
+ listener_thread_id_ = base::PlatformThread::CurrentId();
InitializeHandleTracker();
InitializeThread();
}
diff --git a/chrome/test/automation/automation_proxy.h b/chrome/test/automation/automation_proxy.h
index ee77016..60677f7 100644
--- a/chrome/test/automation/automation_proxy.h
+++ b/chrome/test/automation/automation_proxy.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_H__
-#define CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_H__
+#ifndef CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_H_
+#define CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_H_
#pragma once
#include <string>
@@ -12,6 +12,7 @@
#include "app/message_box_flags.h"
#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "base/threading/platform_thread.h"
#include "base/process_util.h"
#include "base/scoped_ptr.h"
#include "base/time.h"
@@ -301,9 +302,9 @@ class AutomationProxy : public IPC::Channel::Listener,
// Delay to let the browser execute the command.
base::TimeDelta command_execution_timeout_;
- PlatformThreadId listener_thread_id_;
+ base::PlatformThreadId listener_thread_id_;
DISALLOW_COPY_AND_ASSIGN(AutomationProxy);
};
-#endif // CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_H__
+#endif // CHROME_TEST_AUTOMATION_AUTOMATION_PROXY_H_
diff --git a/chrome/test/automation/automation_proxy_uitest.cc b/chrome/test/automation/automation_proxy_uitest.cc
index 8568e5e..465b610 100644
--- a/chrome/test/automation/automation_proxy_uitest.cc
+++ b/chrome/test/automation/automation_proxy_uitest.cc
@@ -1556,7 +1556,7 @@ TEST_F(AutomationProxyTest5, TestLifetimeOfDomAutomationController) {
tab->NavigateToURL(net::FilePathToFileURL(filename)));
// Allow some time for the popup to show up and close.
- PlatformThread::Sleep(sleep_timeout_ms());
+ base::PlatformThread::Sleep(sleep_timeout_ms());
std::wstring expected(L"string");
std::wstring jscript = CreateJSString(L"\"" + expected + L"\"");
diff --git a/chrome/test/automation/browser_proxy.cc b/chrome/test/automation/browser_proxy.cc
index ae18470..9ba3057 100644
--- a/chrome/test/automation/browser_proxy.cc
+++ b/chrome/test/automation/browser_proxy.cc
@@ -8,7 +8,7 @@
#include "base/json/json_reader.h"
#include "base/logging.h"
-#include "base/platform_thread.h"
+#include "base/threading/platform_thread.h"
#include "base/time.h"
#include "chrome/common/automation_constants.h"
#include "chrome/common/automation_messages.h"
@@ -206,7 +206,7 @@ bool BrowserProxy::WaitForTabToBecomeActive(int tab,
const TimeTicks start = TimeTicks::Now();
const TimeDelta timeout = TimeDelta::FromMilliseconds(wait_timeout);
while (TimeTicks::Now() - start < timeout) {
- PlatformThread::Sleep(automation::kSleepTime);
+ base::PlatformThread::Sleep(automation::kSleepTime);
int active_tab;
if (GetActiveTabIndex(&active_tab) && active_tab == tab)
return true;
diff --git a/chrome/test/automation/proxy_launcher.cc b/chrome/test/automation/proxy_launcher.cc
index 2325958..1d1583c 100644
--- a/chrome/test/automation/proxy_launcher.cc
+++ b/chrome/test/automation/proxy_launcher.cc
@@ -4,6 +4,7 @@
#include "chrome/test/automation/proxy_launcher.h"
+#include "base/threading/platform_thread.h"
#include "chrome/common/automation_constants.h"
#include "chrome/common/logging_chrome.h"
#include "chrome/test/automation/automation_proxy.h"
@@ -37,7 +38,7 @@ void NamedProxyLauncher::InitializeConnection(UITestBase* ui_test_base) const {
// Wait for browser to be ready for connections.
struct stat file_info;
while (stat(kInterfacePath, &file_info))
- PlatformThread::Sleep(automation::kSleepTime);
+ base::PlatformThread::Sleep(automation::kSleepTime);
}
ui_test_base->ConnectToRunningBrowser();
diff --git a/chrome/test/automation/tab_proxy.cc b/chrome/test/automation/tab_proxy.cc
index ce7ed16..bb8d9cc 100644
--- a/chrome/test/automation/tab_proxy.cc
+++ b/chrome/test/automation/tab_proxy.cc
@@ -8,6 +8,7 @@
#include "base/logging.h"
#include "base/string16.h"
+#include "base/threading/platform_thread.h"
#include "base/utf_string_conversions.h"
#include "chrome/common/automation_messages.h"
#include "chrome/common/json_value_serializer.h"
@@ -363,7 +364,7 @@ bool TabProxy::WaitForChildWindowCountToChange(int count, int* new_count,
int wait_timeout) {
int intervals = std::max(wait_timeout / automation::kSleepTime, 1);
for (int i = 0; i < intervals; ++i) {
- PlatformThread::Sleep(automation::kSleepTime);
+ base::PlatformThread::Sleep(automation::kSleepTime);
bool succeeded = GetConstrainedWindowCount(new_count);
if (!succeeded)
return false;
@@ -391,7 +392,7 @@ bool TabProxy::WaitForBlockedPopupCountToChangeTo(int target_count,
int wait_timeout) {
int intervals = std::max(wait_timeout / automation::kSleepTime, 1);
for (int i = 0; i < intervals; ++i) {
- PlatformThread::Sleep(automation::kSleepTime);
+ base::PlatformThread::Sleep(automation::kSleepTime);
int new_count = -1;
bool succeeded = GetBlockedPopupCount(&new_count);
if (!succeeded)