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

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

Issue 6685099: Removing command_execution_timeout_ms in favor of action_max_timeout_ms. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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
Index: chrome/test/automation/automation_proxy.h
===================================================================
--- chrome/test/automation/automation_proxy.h (revision 79951)
+++ chrome/test/automation/automation_proxy.h (working copy)
@@ -49,6 +49,7 @@
// 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 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 @@
// 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
@@ -215,6 +216,7 @@
// 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)
@@ -230,6 +232,7 @@
// 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
@@ -244,15 +247,15 @@
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) {
Paweł Hajdan Jr. 2011/03/31 20:11:09 Well, I think this should also be removed.
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
@@ -307,7 +310,7 @@
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_;

Powered by Google App Engine
This is Rietveld 408576698