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

Unified Diff: net/socket/socks5_client_socket_unittest.cc

Issue 155618: Use manually constructed IPv6 socket addresses for tests, rather than system ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 11 years, 5 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
« no previous file with comments | « net/base/mock_host_resolver.cc ('k') | net/socket/socks_client_socket_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/socks5_client_socket_unittest.cc
===================================================================
--- net/socket/socks5_client_socket_unittest.cc (revision 21052)
+++ net/socket/socks5_client_socket_unittest.cc (working copy)
@@ -179,18 +179,8 @@
const uint8 ipv6_addr[] = { 0x20, 0x01, 0x0d, 0xb8, 0x87, 0x14, 0x3a, 0x90,
0x00, 0x00, 0x00, 0x00, 0x00, 0x000, 0x00, 0x12 };
- host_resolver_->rules()->AddRule(hostname, "2001:db8:8714:3a90::12");
+ host_resolver_->rules()->AddIPv6Rule(hostname, "2001:db8:8714:3a90::12");
- AddressList address_list;
- HostResolver::RequestInfo info(hostname, 80);
- int rv = host_resolver_->Resolve(info, &address_list, NULL, NULL);
- if (rv != OK || !address_list.head()) {
- // This machine does not support IPv6. We skip this test altogether.
- // TODO(arindam): create a MockIPv6HostResolver to manually
- // populate the |address_list| in case of a machine with no IPv6 suppport.
- return;
- }
-
std::string request(kSOCKS5IPv6Request,
arraysize(kSOCKS5IPv6Request));
request.append(reinterpret_cast<const char*>(&ipv6_addr), sizeof(ipv6_addr));
@@ -205,7 +195,7 @@
user_sock_.reset(BuildMockSocket(data_reads, data_writes, hostname, 80));
- rv = user_sock_->Connect(&callback_);
+ int rv = user_sock_->Connect(&callback_);
EXPECT_EQ(ERR_IO_PENDING, rv);
rv = callback_.WaitForResult();
EXPECT_EQ(OK, rv);
« no previous file with comments | « net/base/mock_host_resolver.cc ('k') | net/socket/socks_client_socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698