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

Unified Diff: net/ftp/ftp_network_transaction_unittest.cc

Issue 6488010: Propagate the remote socket address to URLRequest and to ViewHostMsg_FrameNavigate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address eroman's comments Created 9 years, 10 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/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 8da3bafeba6b93a8a26c7949d7a8d4e8d4549561..1d86fba23ebd2d3699b94e73410d98861d9deab5 100644
--- a/net/ftp/ftp_network_transaction_unittest.cc
+++ b/net/ftp/ftp_network_transaction_unittest.cc
@@ -9,6 +9,7 @@
#include "base/ref_counted.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
+#include "net/base/host_port_pair.h"
#include "net/base/io_buffer.h"
#include "net/base/mock_host_resolver.h"
#include "net/base/net_util.h"
@@ -831,6 +832,9 @@ TEST_F(FtpNetworkTransactionTest, DirectoryTransaction) {
EXPECT_TRUE(transaction_.GetResponseInfo()->is_directory_listing);
EXPECT_EQ(-1, transaction_.GetResponseInfo()->expected_content_size);
+ EXPECT_EQ("192.0.2.33",
+ transaction_.GetResponseInfo()->socket_address.host());
+ EXPECT_EQ(0, transaction_.GetResponseInfo()->socket_address.port());
}
TEST_F(FtpNetworkTransactionTest, DirectoryTransactionWithPasvFallback) {
@@ -904,6 +908,9 @@ TEST_F(FtpNetworkTransactionTest, DownloadTransaction) {
// We pass an artificial value of 18 as a response to the SIZE command.
EXPECT_EQ(18, transaction_.GetResponseInfo()->expected_content_size);
+ EXPECT_EQ("192.0.2.33",
+ transaction_.GetResponseInfo()->socket_address.host());
+ EXPECT_EQ(0, transaction_.GetResponseInfo()->socket_address.port());
}
TEST_F(FtpNetworkTransactionTest, DownloadTransactionWithPasvFallback) {

Powered by Google App Engine
This is Rietveld 408576698