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

Unified Diff: net/socket/tcp_socket_unittest.cc

Issue 1565303002: Change IPEndpoint::address() to return a net::IPAddress (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Android Created 4 years, 11 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
Index: net/socket/tcp_socket_unittest.cc
diff --git a/net/socket/tcp_socket_unittest.cc b/net/socket/tcp_socket_unittest.cc
index d9d13c58eaaaad12bc446cabfbb5fea753ef583f..a9e1e3d55f5267c6fc938883b3ce49b3fc9e272a 100644
--- a/net/socket/tcp_socket_unittest.cc
+++ b/net/socket/tcp_socket_unittest.cc
@@ -86,7 +86,8 @@ class TCPSocketTest : public PlatformTest {
EXPECT_TRUE(accepted_socket.get());
// Both sockets should be on the loopback network interface.
- EXPECT_EQ(accepted_address.address(), local_address_.address());
+ EXPECT_EQ(accepted_address.address_number(),
+ local_address_.address_number());
}
AddressList local_address_list() const {
@@ -120,7 +121,7 @@ TEST_F(TCPSocketTest, Accept) {
EXPECT_TRUE(accepted_socket.get());
// Both sockets should be on the loopback network interface.
- EXPECT_EQ(accepted_address.address(), local_address_.address());
+ EXPECT_EQ(accepted_address.address_number(), local_address_.address_number());
EXPECT_EQ(OK, connect_callback.WaitForResult());
}
@@ -192,8 +193,9 @@ TEST_F(TCPSocketTest, Accept2Connections) {
EXPECT_TRUE(accepted_socket2.get());
EXPECT_NE(accepted_socket.get(), accepted_socket2.get());
- EXPECT_EQ(accepted_address.address(), local_address_.address());
- EXPECT_EQ(accepted_address2.address(), local_address_.address());
+ EXPECT_EQ(accepted_address.address_number(), local_address_.address_number());
+ EXPECT_EQ(accepted_address2.address_number(),
+ local_address_.address_number());
}
// Test listening and accepting with a socket bound to an IPv6 address.
@@ -220,7 +222,7 @@ TEST_F(TCPSocketTest, AcceptIPv6) {
EXPECT_TRUE(accepted_socket.get());
// Both sockets should be on the loopback network interface.
- EXPECT_EQ(accepted_address.address(), local_address_.address());
+ EXPECT_EQ(accepted_address.address_number(), local_address_.address_number());
EXPECT_EQ(OK, connect_callback.WaitForResult());
}
@@ -244,7 +246,7 @@ TEST_F(TCPSocketTest, ReadWrite) {
ASSERT_TRUE(accepted_socket.get());
// Both sockets should be on the loopback network interface.
- EXPECT_EQ(accepted_address.address(), local_address_.address());
+ EXPECT_EQ(accepted_address.address_number(), local_address_.address_number());
EXPECT_EQ(OK, connect_callback.WaitForResult());

Powered by Google App Engine
This is Rietveld 408576698