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

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

Issue 10787010: Switch to TimeDelta interfaces in chrome automation test infrastructure. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase onto master. 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 13f5880e60abfce5a9f9ab9a04f092a8aef29b56..5eeb1cb61ee44e0a109e959121cc73d5a7183d08 100644
--- a/chrome/test/webdriver/webdriver_automation.cc
+++ b/chrome/test/webdriver/webdriver_automation.cc
@@ -300,7 +300,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);
@@ -316,7 +316,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
@@ -450,7 +450,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());
@@ -493,7 +494,8 @@ void Automation::Terminate() {
automation()->Disconnect();
#endif
int exit_code = -1;
- if (!launcher_->WaitForBrowserProcessToQuit(10000, &exit_code)) {
+ if (!launcher_->WaitForBrowserProcessToQuit(
+ base::TimeDelta::FromSeconds(10), &exit_code)) {
logger_.Log(kWarningLogLevel, "Chrome still running, terminating...");
TerminateAllChromeProcesses(launcher_->process_id());
}
« 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