| Index: chrome/test/automation/proxy_launcher.cc
|
| diff --git a/chrome/test/automation/proxy_launcher.cc b/chrome/test/automation/proxy_launcher.cc
|
| index 69742aa178fdee05d3730f0ab5cc8c7a2ef67b3c..7964326bb2196295ee49273b1bd42b79a9c3c925 100644
|
| --- a/chrome/test/automation/proxy_launcher.cc
|
| +++ b/chrome/test/automation/proxy_launcher.cc
|
| @@ -504,11 +504,11 @@ base::TimeDelta ProxyLauncher::browser_quit_time() const {
|
| // NamedProxyLauncher functions
|
|
|
| NamedProxyLauncher::NamedProxyLauncher(const std::string& channel_id,
|
| - bool launch_browser,
|
| - bool disconnect_on_failure)
|
| + const InitParams& params)
|
| : channel_id_(channel_id),
|
| - launch_browser_(launch_browser),
|
| - disconnect_on_failure_(disconnect_on_failure) {
|
| + launch_browser_(params.launch_browser),
|
| + disconnect_on_failure_(params.disconnect_on_failure),
|
| + wait_for_server_channel_(params.wait_for_server_channel) {
|
| }
|
|
|
| AutomationProxy* NamedProxyLauncher::CreateAutomationProxy(
|
| @@ -542,19 +542,21 @@ bool NamedProxyLauncher::InitializeConnection(const LaunchState& state,
|
| }
|
| }
|
|
|
| - // Wait for browser to be ready for connections.
|
| - bool testing_channel_exists = false;
|
| - for (int wait_time = 0;
|
| - wait_time < TestTimeouts::action_max_timeout_ms();
|
| - wait_time += automation::kSleepTime) {
|
| - testing_channel_exists = file_util::PathExists(testing_channel_path);
|
| - if (testing_channel_exists)
|
| - break;
|
| - base::PlatformThread::Sleep(automation::kSleepTime);
|
| - }
|
| - if (!testing_channel_exists) {
|
| - LOG(ERROR) << "Failed to wait for testing channel presence.";
|
| - return false;
|
| + if (wait_for_server_channel_) {
|
| + // Wait for browser to be ready for connections.
|
| + bool testing_channel_exists = false;
|
| + for (int wait_time = 0;
|
| + wait_time < TestTimeouts::action_max_timeout_ms();
|
| + wait_time += automation::kSleepTime) {
|
| + testing_channel_exists = file_util::PathExists(testing_channel_path);
|
| + if (testing_channel_exists)
|
| + break;
|
| + base::PlatformThread::Sleep(automation::kSleepTime);
|
| + }
|
| + if (!testing_channel_exists) {
|
| + LOG(ERROR) << "Failed to wait for testing channel presence.";
|
| + return false;
|
| + }
|
| }
|
|
|
| if (!ConnectToRunningBrowser(wait_for_initial_loads)) {
|
|
|