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

Side by Side Diff: net/base/ssl_test_util.cc

Issue 125107: * Move the global "DnsResolutionObserver" code depended on by DNS prefetcher,... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Address jar's comments Created 11 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/base/ssl_client_socket_unittest.cc ('k') | net/base/tcp_client_socket_pool.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 <string> 5 #include <string>
6 #include <algorithm> 6 #include <algorithm>
7 7
8 #include "net/base/ssl_test_util.h" 8 #include "net/base/ssl_test_util.h"
9 9
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 240
241 LOG(INFO) << "Started on port " << port_str; 241 LOG(INFO) << "Started on port " << port_str;
242 return true; 242 return true;
243 } 243 }
244 244
245 bool TestServerLauncher::WaitToStart(const std::string& host_name, int port) { 245 bool TestServerLauncher::WaitToStart(const std::string& host_name, int port) {
246 // Verify that the webserver is actually started. 246 // Verify that the webserver is actually started.
247 // Otherwise tests can fail if they run faster than Python can start. 247 // Otherwise tests can fail if they run faster than Python can start.
248 net::AddressList addr; 248 net::AddressList addr;
249 net::HostResolver resolver; 249 net::HostResolver resolver;
250 int rv = resolver.Resolve(host_name, port, &addr, NULL, NULL); 250 net::HostResolver::RequestInfo info(host_name, port);
251 int rv = resolver.Resolve(info, &addr, NULL, NULL);
251 if (rv != net::OK) 252 if (rv != net::OK)
252 return false; 253 return false;
253 254
254 net::TCPPinger pinger(addr); 255 net::TCPPinger pinger(addr);
255 rv = pinger.Ping(); 256 rv = pinger.Ping();
256 return rv == net::OK; 257 return rv == net::OK;
257 } 258 }
258 259
259 bool TestServerLauncher::WaitToFinish(int timeout_ms) { 260 bool TestServerLauncher::WaitToFinish(int timeout_ms) {
260 if (!process_handle_) 261 if (!process_handle_)
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 "certificate to your trusted roots for this test to work. " 357 "certificate to your trusted roots for this test to work. "
357 "For more info visit:\n" 358 "For more info visit:\n"
358 "http://dev.chromium.org/developers/testing\n"; 359 "http://dev.chromium.org/developers/testing\n";
359 return false; 360 return false;
360 } 361 }
361 #endif 362 #endif
362 return true; 363 return true;
363 } 364 }
364 365
365 } // namespace net 366 } // namespace net
OLDNEW
« no previous file with comments | « net/base/ssl_client_socket_unittest.cc ('k') | net/base/tcp_client_socket_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698