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

Unified Diff: net/ftp/ftp_network_transaction_unittest.cc

Issue 10309002: Reimplements net::AddressList without struct addrinfo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: get_canonical_name -> canonical_name. iterator to indexing Created 8 years, 7 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/ftp/ftp_network_transaction.cc ('k') | net/http/http_auth_handler_negotiate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/ftp/ftp_network_transaction_unittest.cc
diff --git a/net/ftp/ftp_network_transaction_unittest.cc b/net/ftp/ftp_network_transaction_unittest.cc
index 5ec91393daade1f40c4a29ccd87bdcfbbca4001e..8fc56826d84ea52be75c05d1b94f2ed4e66a0a64 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());
}
}
« no previous file with comments | « net/ftp/ftp_network_transaction.cc ('k') | net/http/http_auth_handler_negotiate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698