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

Side by Side Diff: net/socket/tcp_client_socket_unittest.cc

Issue 4208002: Revert 64202 - Initial support for built-in DNS resolver/cache.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 1 month 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/proxy/proxy_script_fetcher_impl_unittest.cc ('k') | net/test/test_server.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Deleted: svn:mergeinfo
OLDNEW
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/tcp_client_socket.h" 5 #include "net/socket/tcp_client_socket.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "net/base/address_list.h" 8 #include "net/base/address_list.h"
9 #include "net/base/host_resolver.h" 9 #include "net/base/host_resolver.h"
10 #include "net/base/io_buffer.h" 10 #include "net/base/io_buffer.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 if (sock) 86 if (sock)
87 break; 87 break;
88 } 88 }
89 ASSERT_TRUE(sock != NULL); 89 ASSERT_TRUE(sock != NULL);
90 listen_sock_ = sock; 90 listen_sock_ = sock;
91 listen_port_ = port; 91 listen_port_ = port;
92 92
93 AddressList addr; 93 AddressList addr;
94 scoped_ptr<HostResolver> resolver( 94 scoped_ptr<HostResolver> resolver(
95 CreateSystemHostResolver(HostResolver::kDefaultParallelism, 95 CreateSystemHostResolver(HostResolver::kDefaultParallelism,
96 NULL, NULL)); 96 NULL));
97 HostResolver::RequestInfo info(HostPortPair("localhost", listen_port_)); 97 HostResolver::RequestInfo info(HostPortPair("localhost", listen_port_));
98 int rv = resolver->Resolve(info, &addr, NULL, NULL, BoundNetLog()); 98 int rv = resolver->Resolve(info, &addr, NULL, NULL, BoundNetLog());
99 CHECK_EQ(rv, OK); 99 CHECK_EQ(rv, OK);
100 sock_.reset(new TCPClientSocket(addr, &net_log_, NetLog::Source())); 100 sock_.reset(new TCPClientSocket(addr, &net_log_, NetLog::Source()));
101 } 101 }
102 102
103 TEST_F(TCPClientSocketTest, Connect) { 103 TEST_F(TCPClientSocketTest, Connect) {
104 TestCompletionCallback callback; 104 TestCompletionCallback callback;
105 EXPECT_FALSE(sock_->IsConnected()); 105 EXPECT_FALSE(sock_->IsConnected());
106 106
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 // Close the server socket, so there will at least be a 0-byte read. 342 // Close the server socket, so there will at least be a 0-byte read.
343 CloseServerSocket(); 343 CloseServerSocket();
344 344
345 rv = callback.WaitForResult(); 345 rv = callback.WaitForResult();
346 EXPECT_GE(rv, 0); 346 EXPECT_GE(rv, 0);
347 } 347 }
348 348
349 } // namespace 349 } // namespace
350 350
351 } // namespace net 351 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/proxy_script_fetcher_impl_unittest.cc ('k') | net/test/test_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698