summaryrefslogtreecommitdiffstats
path: root/net/socket
diff options
context:
space:
mode:
Diffstat (limited to 'net/socket')
-rw-r--r--net/socket/socks5_client_socket_unittest.cc14
-rw-r--r--net/socket/socks_client_socket_unittest.cc2
2 files changed, 3 insertions, 13 deletions
diff --git a/net/socket/socks5_client_socket_unittest.cc b/net/socket/socks5_client_socket_unittest.cc
index b225887..33b3fa3 100644
--- a/net/socket/socks5_client_socket_unittest.cc
+++ b/net/socket/socks5_client_socket_unittest.cc
@@ -179,17 +179,7 @@ TEST_F(SOCKS5ClientSocketTest, IPv6Domain) {
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");
-
- 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;
- }
+ host_resolver_->rules()->AddIPv6Rule(hostname, "2001:db8:8714:3a90::12");
std::string request(kSOCKS5IPv6Request,
arraysize(kSOCKS5IPv6Request));
@@ -205,7 +195,7 @@ TEST_F(SOCKS5ClientSocketTest, IPv6Domain) {
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);
diff --git a/net/socket/socks_client_socket_unittest.cc b/net/socket/socks_client_socket_unittest.cc
index 3d7fa85..32eb725 100644
--- a/net/socket/socks_client_socket_unittest.cc
+++ b/net/socket/socks_client_socket_unittest.cc
@@ -253,7 +253,7 @@ TEST_F(SOCKSClientSocketTest, SOCKS4AFailedDNS) {
TEST_F(SOCKSClientSocketTest, SOCKS4AIfDomainInIPv6) {
const char hostname[] = "an.ipv6.address";
- host_resolver_->rules()->AddRule(hostname, "2001:db8:8714:3a90::12");
+ host_resolver_->rules()->AddIPv6Rule(hostname, "2001:db8:8714:3a90::12");
std::string request(kSOCKS4aInitialRequest,
arraysize(kSOCKS4aInitialRequest));