diff options
author | szym@chromium.org <szym@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-07 21:44:56 +0000 |
---|---|---|
committer | szym@chromium.org <szym@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-07 21:44:56 +0000 |
commit | 7054e78fe6a2fcda72b06dc196b5f91cfdc75872 (patch) | |
tree | 2efdd9b07a784a17905d737df9b762d88a6cd1c4 /net/ftp/ftp_network_transaction_unittest.cc | |
parent | cd46545164adf645d744f3955b256cf89412cdc6 (diff) | |
download | chromium_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/ftp/ftp_network_transaction_unittest.cc')
-rw-r--r-- | net/ftp/ftp_network_transaction_unittest.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/net/ftp/ftp_network_transaction_unittest.cc b/net/ftp/ftp_network_transaction_unittest.cc index 5ec9139..8fc5682 100644 --- a/net/ftp/ftp_network_transaction_unittest.cc +++ b/net/ftp/ftp_network_transaction_unittest.cc @@ -14,7 +14,6 @@ #include "net/base/io_buffer.h" #include "net/base/mock_host_resolver.h" #include "net/base/net_util.h" -#include "net/base/sys_addrinfo.h" #include "net/base/test_completion_callback.h" #include "net/ftp/ftp_network_session.h" #include "net/ftp/ftp_request_info.h" @@ -1069,10 +1068,9 @@ TEST_F(FtpNetworkTransactionTest, DownloadTransactionEvilPasvUnsafeHost) { // Even if the PASV response specified some other address, we connect // to the address we used for control connection (which could be 127.0.0.1 // or ::1 depending on whether we use IPv6). - const struct addrinfo* addrinfo = data_socket->addresses().head(); - while (addrinfo) { - EXPECT_NE("10.1.2.3", NetAddressToString(addrinfo)); - addrinfo = addrinfo->ai_next; + for (AddressList::const_iterator it = data_socket->addresses().begin(); + it != data_socket->addresses().end(); ++it) { + EXPECT_NE("10.1.2.3", it->ToStringWithoutPort()); } } |