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

Unified Diff: chrome/test/automation/automation_proxy.h

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 | « no previous file | chrome/test/automation/automation_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/automation/automation_proxy.h
diff --git a/chrome/test/automation/automation_proxy.h b/chrome/test/automation/automation_proxy.h
index 21823a5f4688aca464f843f34bfd46fc91a9b640..6a42c9f41d505e706a9bf0cf5f38e30074424596 100644
--- a/chrome/test/automation/automation_proxy.h
+++ b/chrome/test/automation/automation_proxy.h
@@ -54,7 +54,7 @@ class AutomationMessageSender : public IPC::Sender {
// a running instance of the app.
class AutomationProxy : public IPC::Listener, public AutomationMessageSender {
public:
- AutomationProxy(int action_timeout_ms, bool disconnect_on_failure);
+ AutomationProxy(base::TimeDelta action_timeout, bool disconnect_on_failure);
virtual ~AutomationProxy();
// Creates a previously unused channel id.
@@ -192,15 +192,16 @@ class AutomationProxy : public IPC::Listener, public AutomationMessageSender {
gfx::NativeWindow* external_tab_container,
gfx::NativeWindow* tab);
- int action_timeout_ms() const {
- return static_cast<int>(action_timeout_.InMilliseconds());
+ base::TimeDelta action_timeout() const {
+ return action_timeout_;
}
// Sets the timeout for subsequent automation calls.
- void set_action_timeout_ms(int timeout_ms) {
- DCHECK(timeout_ms <= 10 * 60 * 1000 ) << "10+ min of automation timeout "
- "can make the test hang and be killed by buildbot";
- action_timeout_ = base::TimeDelta::FromMilliseconds(timeout_ms);
+ void set_action_timeout(base::TimeDelta timeout) {
+ DCHECK(timeout <= base::TimeDelta::FromMinutes(10))
+ << "10+ min of automation timeout "
+ "can make the test hang and be killed by buildbot";
+ action_timeout_ = timeout;
}
// Returns the server version of the server connected. You may only call this
« no previous file with comments | « no previous file | chrome/test/automation/automation_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698