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

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

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.cc
===================================================================
--- chrome/test/automation/automation_proxy.cc (revision 79305)
+++ chrome/test/automation/automation_proxy.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -14,6 +14,7 @@
#include "base/process_util.h"
#include "base/ref_counted.h"
#include "base/synchronization/waitable_event.h"
+#include "base/test/test_timeouts.h"
#include "chrome/common/automation_constants.h"
#include "chrome/common/automation_messages.h"
#include "chrome/common/chrome_version_info.h"
@@ -448,14 +449,18 @@
#endif // defined(OS_POSIX)
bool AutomationProxy::Send(IPC::Message* message) {
+ return Send(message,
+ command_execution_timeout_.InMilliseconds());
Nirnimesh 2011/03/29 20:27:28 still command_execution_timeout_? or action_max_ti
Huyen 2011/03/31 02:42:55 Done. Changed it to action_timeout_ to make it con
+}
+
+bool AutomationProxy::Send(IPC::Message* message, int timeout_ms) {
if (!channel_.get()) {
LOG(ERROR) << "Automation channel has been closed; dropping message!";
delete message;
return false;
}
- bool success = channel_->SendWithTimeout(message,
- command_execution_timeout_ms());
+ bool success = channel_->SendWithTimeout(message, timeout_ms);
if (!success && disconnect_on_failure_) {
// Send failed (possibly due to a timeout). Browser is likely in a weird
@@ -554,9 +559,9 @@
}
bool AutomationProxy::SendJSONRequest(const std::string& request,
- std::string* response) {
+ std::string* response, int timeout) {
bool result = false;
- if (!SendAutomationJSONRequest(this, request, response, &result))
+ if (!SendAutomationJSONRequest(this, request, response, &result, timeout))
Nirnimesh 2011/03/29 20:27:28 all out params (response, result) should go *after
Huyen 2011/03/31 02:42:55 Done.
return false;
return result;
}

Powered by Google App Engine
This is Rietveld 408576698