summaryrefslogtreecommitdiffstats
path: root/chrome/test/automation/automation_proxy.h
diff options
context:
space:
mode:
authorhnguyen@chromium.org <hnguyen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-11 22:14:29 +0000
committerhnguyen@chromium.org <hnguyen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-11 22:14:29 +0000
commit536a17e499a44faabf0039de8a550843f7e4e03e (patch)
tree5e0560612eb0975e79a184547f262c626abda5dc /chrome/test/automation/automation_proxy.h
parentd061105e0b95444d1016b9a1b42cb87c6be599cf (diff)
downloadchromium_src-536a17e499a44faabf0039de8a550843f7e4e03e.zip
chromium_src-536a17e499a44faabf0039de8a550843f7e4e03e.tar.gz
chromium_src-536a17e499a44faabf0039de8a550843f7e4e03e.tar.bz2
Removing command_execution_timeout_ms in favor of action_max_timeout_ms.
R=jcivelli@chromium.org,sky@chromium.org,phajdan.jr@chromium.org,nirnimesh@chromium.org Review URL: http://codereview.chromium.org/6685099 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81164 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/automation/automation_proxy.h')
-rw-r--r--chrome/test/automation/automation_proxy.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/chrome/test/automation/automation_proxy.h b/chrome/test/automation/automation_proxy.h
index d98a9fb..e273e4b 100644
--- a/chrome/test/automation/automation_proxy.h
+++ b/chrome/test/automation/automation_proxy.h
@@ -49,6 +49,7 @@ class AutomationMessageSender : public IPC::Message::Sender {
// and the proxy provider might be still working on the previous
// request.
virtual bool Send(IPC::Message* message) = 0;
+ virtual bool Send(IPC::Message* message, int timeout_ms) = 0;
};
// This is the interface that external processes can use to interact with
@@ -56,7 +57,7 @@ class AutomationMessageSender : public IPC::Message::Sender {
class AutomationProxy : public IPC::Channel::Listener,
public AutomationMessageSender {
public:
- AutomationProxy(int command_execution_timeout_ms, bool disconnect_on_failure);
+ AutomationProxy(int action_timeout_ms, bool disconnect_on_failure);
virtual ~AutomationProxy();
// Creates a previously unused channel id.
@@ -80,7 +81,7 @@ class AutomationProxy : public IPC::Channel::Listener,
// Waits for the app to launch and the automation provider to say hello
// (the app isn't fully done loading by this point).
// Returns SUCCESS if the launch is successful.
- // Returns TIMEOUT if there was no response by command_execution_timeout_
+ // Returns TIMEOUT if there was no response by action_timeout_
// Returns VERSION_MISMATCH if the automation protocol version of the
// automation provider does not match and if perform_version_check_ is set
// to true. Note that perform_version_check_ defaults to false, call
@@ -211,6 +212,7 @@ class AutomationProxy : public IPC::Channel::Listener,
// Generic pattern for sending automation requests.
bool SendJSONRequest(const std::string& request,
+ int timeout_ms,
std::string* response) WARN_UNUSED_RESULT;
#if defined(OS_CHROMEOS)
@@ -226,6 +228,7 @@ class AutomationProxy : public IPC::Channel::Listener,
// AutomationMessageSender implementation.
virtual bool Send(IPC::Message* message) WARN_UNUSED_RESULT;
+ virtual bool Send(IPC::Message* message, int timeout_ms) WARN_UNUSED_RESULT;
// Wrapper over AutomationHandleTracker::InvalidateHandle. Receives the
// message from AutomationProxy, unpacks the messages and routes that call to
@@ -240,15 +243,15 @@ class AutomationProxy : public IPC::Channel::Listener,
gfx::NativeWindow* external_tab_container,
gfx::NativeWindow* tab);
- int command_execution_timeout_ms() const {
- return static_cast<int>(command_execution_timeout_.InMilliseconds());
+ int action_timeout_ms() const {
+ return static_cast<int>(action_timeout_.InMilliseconds());
}
// Sets the timeout for subsequent automation calls.
- void set_command_execution_timeout_ms(int timeout_ms) {
+ 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";
- command_execution_timeout_ = base::TimeDelta::FromMilliseconds(timeout_ms);
+ action_timeout_ = base::TimeDelta::FromMilliseconds(timeout_ms);
}
// Returns the server version of the server connected. You may only call this
@@ -303,7 +306,7 @@ class AutomationProxy : public IPC::Channel::Listener,
bool disconnect_on_failure_;
// Delay to let the browser execute the command.
- base::TimeDelta command_execution_timeout_;
+ base::TimeDelta action_timeout_;
base::PlatformThreadId listener_thread_id_;