summaryrefslogtreecommitdiffstats
path: root/net/socket/tcp_client_socket_unittest.cc
diff options
context:
space:
mode:
authorszym@chromium.org <szym@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-07 21:44:56 +0000
committerszym@chromium.org <szym@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-07 21:44:56 +0000
commit7054e78fe6a2fcda72b06dc196b5f91cfdc75872 (patch)
tree2efdd9b07a784a17905d737df9b762d88a6cd1c4 /net/socket/tcp_client_socket_unittest.cc
parentcd46545164adf645d744f3955b256cf89412cdc6 (diff)
downloadchromium_src-7054e78fe6a2fcda72b06dc196b5f91cfdc75872.zip
chromium_src-7054e78fe6a2fcda72b06dc196b5f91cfdc75872.tar.gz
chromium_src-7054e78fe6a2fcda72b06dc196b5f91cfdc75872.tar.bz2
Reimplements net::AddressList without struct addrinfo.
net::AddressList extends std::vector<std::IPEndPoint> by canonical name. (Canonical name is planned to be removed as well.) Removes dependency on sys_addrinfo.h throughout the codebase. Introduces net::SockaddrStorage for convenience. BUG=125696 TEST=green waterfall Review URL: http://codereview.chromium.org/10309002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135731 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket/tcp_client_socket_unittest.cc')
-rw-r--r--net/socket/tcp_client_socket_unittest.cc13
1 files changed, 3 insertions, 10 deletions
diff --git a/net/socket/tcp_client_socket_unittest.cc b/net/socket/tcp_client_socket_unittest.cc
index 991b645..c2589b8 100644
--- a/net/socket/tcp_client_socket_unittest.cc
+++ b/net/socket/tcp_client_socket_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -11,7 +11,6 @@
#include "net/base/ip_endpoint.h"
#include "net/base/net_errors.h"
#include "net/base/net_util.h"
-#include "net/base/sys_addrinfo.h"
#include "net/base/test_completion_callback.h"
#include "net/socket/tcp_server_socket.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -31,10 +30,7 @@ TEST(TCPClientSocketTest, BindLoopbackToLoopback) {
IPEndPoint server_address;
ASSERT_EQ(OK, server.GetLocalAddress(&server_address));
- TCPClientSocket socket(
- AddressList::CreateFromIPAddress(server_address.address(),
- server_address.port()),
- NULL, NetLog::Source());
+ TCPClientSocket socket(AddressList(server_address), NULL, NetLog::Source());
EXPECT_EQ(OK, socket.Bind(IPEndPoint(lo_address, 0)));
@@ -88,10 +84,7 @@ TEST(TCPClientSocketTest, BindLoopbackToIPv6) {
IPEndPoint server_address;
ASSERT_EQ(OK, server.GetLocalAddress(&server_address));
- TCPClientSocket socket(
- AddressList::CreateFromIPAddress(server_address.address(),
- server_address.port()),
- NULL, NetLog::Source());
+ TCPClientSocket socket(AddressList(server_address), NULL, NetLog::Source());
IPAddressNumber ipv4_lo_ip;
ASSERT_TRUE(ParseIPLiteralToNumber("127.0.0.1", &ipv4_lo_ip));