OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "net/socket/ssl_test_util.h" | 5 #include "net/socket/ssl_test_util.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 } | 222 } |
223 | 223 |
224 LOG(INFO) << "Started on port " << port_str; | 224 LOG(INFO) << "Started on port " << port_str; |
225 return true; | 225 return true; |
226 } | 226 } |
227 | 227 |
228 bool TestServerLauncher::WaitToStart(const std::string& host_name, int port) { | 228 bool TestServerLauncher::WaitToStart(const std::string& host_name, int port) { |
229 // Verify that the webserver is actually started. | 229 // Verify that the webserver is actually started. |
230 // Otherwise tests can fail if they run faster than Python can start. | 230 // Otherwise tests can fail if they run faster than Python can start. |
231 net::AddressList addr; | 231 net::AddressList addr; |
232 scoped_refptr<net::HostResolver> resolver(net::CreateSystemHostResolver()); | 232 scoped_refptr<net::HostResolver> resolver( |
| 233 net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism)); |
233 net::HostResolver::RequestInfo info(host_name, port); | 234 net::HostResolver::RequestInfo info(host_name, port); |
234 int rv = resolver->Resolve(info, &addr, NULL, NULL, BoundNetLog()); | 235 int rv = resolver->Resolve(info, &addr, NULL, NULL, BoundNetLog()); |
235 if (rv != net::OK) | 236 if (rv != net::OK) |
236 return false; | 237 return false; |
237 | 238 |
238 net::TCPPinger pinger(addr); | 239 net::TCPPinger pinger(addr); |
239 rv = pinger.Ping(base::TimeDelta::FromMilliseconds(connection_timeout_), | 240 rv = pinger.Ping(base::TimeDelta::FromMilliseconds(connection_timeout_), |
240 connection_attempts_); | 241 connection_attempts_); |
241 return rv == net::OK; | 242 return rv == net::OK; |
242 } | 243 } |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 process_info.hProcess)) { | 405 process_info.hProcess)) { |
405 LOG(ERROR) << "Could not AssignProcessToObject."; | 406 LOG(ERROR) << "Could not AssignProcessToObject."; |
406 return false; | 407 return false; |
407 } | 408 } |
408 } | 409 } |
409 return true; | 410 return true; |
410 } | 411 } |
411 #endif | 412 #endif |
412 | 413 |
413 } // namespace net | 414 } // namespace net |
OLD | NEW |