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

Unified Diff: chrome/test/webdriver/webdriver_automation.cc

Issue 10736064: Switch to TimeDelta interfaces in chrome automation test infrastructure. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 5 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/ui/ui_test.cc ('k') | chrome_frame/chrome_frame_automation.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/webdriver/webdriver_automation.cc
diff --git a/chrome/test/webdriver/webdriver_automation.cc b/chrome/test/webdriver/webdriver_automation.cc
index d709cb1f2bbc2fd87f34e994bfb45a2976b57d19..769c572e3a484188056b2181ddc676eb9967dfee 100644
--- a/chrome/test/webdriver/webdriver_automation.cc
+++ b/chrome/test/webdriver/webdriver_automation.cc
@@ -286,7 +286,7 @@ class WebDriverAnonymousProxyLauncher : public AnonymousProxyLauncher {
virtual ~WebDriverAnonymousProxyLauncher() {}
virtual AutomationProxy* CreateAutomationProxy(
- int execution_timeout) OVERRIDE {
+ base::TimeDelta execution_timeout) OVERRIDE {
AutomationProxy* proxy =
AnonymousProxyLauncher::CreateAutomationProxy(execution_timeout);
AddBackwardsCompatFilter(proxy);
@@ -302,7 +302,7 @@ class WebDriverNamedProxyLauncher : public NamedProxyLauncher {
virtual ~WebDriverNamedProxyLauncher() {}
virtual AutomationProxy* CreateAutomationProxy(
- int execution_timeout) OVERRIDE {
+ base::TimeDelta execution_timeout) OVERRIDE {
AutomationProxy* proxy =
NamedProxyLauncher::CreateAutomationProxy(execution_timeout);
// We can only add the filter here if the browser has not already been
@@ -436,7 +436,8 @@ void Automation::Init(
return;
}
- launcher_->automation()->set_action_timeout_ms(base::kNoTimeout);
+ launcher_->automation()->set_action_timeout(
+ base::TimeDelta::FromMilliseconds(base::kNoTimeout));
logger_.Log(kInfoLogLevel, "Connected to Chrome successfully. Version: " +
automation()->server_version());
@@ -476,7 +477,8 @@ void Automation::Terminate() {
kill(launcher_->process(), SIGTERM);
int exit_code = -1;
- if (!launcher_->WaitForBrowserProcessToQuit(10000, &exit_code)) {
+ if (!launcher_->WaitForBrowserProcessToQuit(
+ base::TimeDelta::FromSeconds(10), &exit_code)) {
TerminateAllChromeProcesses(launcher_->process_id());
}
base::CloseProcessHandle(launcher_->process());
« no previous file with comments | « chrome/test/ui/ui_test.cc ('k') | chrome_frame/chrome_frame_automation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698