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

Unified Diff: net/url_request/url_request_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: 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/url_request/url_request_unittest.cc
diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc
index 26185bd77e4c81bcbca145fb7ca9ab76056b5d7c..5b8bea54241c07eb8ed145cebad7aefe25a5a526 100644
--- a/net/url_request/url_request_unittest.cc
+++ b/net/url_request/url_request_unittest.cc
@@ -267,6 +267,7 @@ TEST_F(URLRequestTestHTTP, GetTest_NoCache) {
EXPECT_EQ(1, d.response_started_count());
EXPECT_FALSE(d.received_data_before_response());
EXPECT_NE(0, d.bytes_received());
+ EXPECT_EQ(test_server_.host_port_pair().ToString(), r.GetSocketAddress());
// TODO(eroman): Add back the NetLog tests...
}
@@ -287,6 +288,7 @@ TEST_F(URLRequestTestHTTP, GetTest) {
EXPECT_EQ(1, d.response_started_count());
EXPECT_FALSE(d.received_data_before_response());
EXPECT_NE(0, d.bytes_received());
+ EXPECT_EQ(test_server_.host_port_pair().ToString(), r.GetSocketAddress());
}
}
@@ -335,6 +337,7 @@ TEST_F(HTTPSRequestTest, HTTPSGetTest) {
EXPECT_FALSE(d.received_data_before_response());
EXPECT_NE(0, d.bytes_received());
CheckSSLInfo(r.ssl_info());
+ EXPECT_EQ(test_server.host_port_pair().ToString(), r.GetSocketAddress());
}
}
@@ -713,6 +716,7 @@ TEST_F(URLRequestTest, AboutBlankTest) {
EXPECT_TRUE(!r.is_pending());
EXPECT_FALSE(d.received_data_before_response());
EXPECT_EQ(d.bytes_received(), 0);
+ EXPECT_EQ("", r.GetSocketAddress());
}
}
@@ -750,6 +754,7 @@ TEST_F(URLRequestTest, DataURLImageTest) {
EXPECT_TRUE(!r.is_pending());
EXPECT_FALSE(d.received_data_before_response());
EXPECT_EQ(d.bytes_received(), 911);
+ EXPECT_EQ("", r.GetSocketAddress());
}
}
@@ -774,6 +779,7 @@ TEST_F(URLRequestTest, FileTest) {
EXPECT_EQ(1, d.response_started_count());
EXPECT_FALSE(d.received_data_before_response());
EXPECT_EQ(d.bytes_received(), static_cast<int>(file_size));
+ EXPECT_EQ("", r.GetSocketAddress());
}
}
@@ -2364,6 +2370,7 @@ TEST_F(URLRequestTestFTP, FLAKY_FTPDirectoryListing) {
EXPECT_EQ(1, d.response_started_count());
EXPECT_FALSE(d.received_data_before_response());
EXPECT_LT(0, d.bytes_received());
+ EXPECT_EQ(test_server_.host_port_pair().ToString(), r.GetSocketAddress());
}
}
@@ -2389,6 +2396,7 @@ TEST_F(URLRequestTestFTP, FLAKY_FTPGetTestAnonymous) {
EXPECT_EQ(1, d.response_started_count());
EXPECT_FALSE(d.received_data_before_response());
EXPECT_EQ(d.bytes_received(), static_cast<int>(file_size));
+ EXPECT_EQ(test_server_.host_port_pair().ToString(), r.GetSocketAddress());
}
}
@@ -2413,6 +2421,7 @@ TEST_F(URLRequestTestFTP, FLAKY_FTPGetTest) {
file_util::GetFileSize(app_path, &file_size);
EXPECT_FALSE(r.is_pending());
+ EXPECT_EQ(test_server_.host_port_pair().ToString(), r.GetSocketAddress());
EXPECT_EQ(1, d.response_started_count());
EXPECT_FALSE(d.received_data_before_response());
EXPECT_EQ(d.bytes_received(), static_cast<int>(file_size));

Powered by Google App Engine
This is Rietveld 408576698