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

Unified Diff: net/url_request/url_request_ftp_job_unittest.cc

Issue 2334623003: Store net::ProxyServer in HttpResponseInfo object (Closed)
Patch Set: PS Created 4 years, 3 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_ftp_job_unittest.cc
diff --git a/net/url_request/url_request_ftp_job_unittest.cc b/net/url_request/url_request_ftp_job_unittest.cc
index e478e2a17515d211a7a4e2479ef9e42dac4492cb..029b54654311d3fba565886d7ae9b5e1d44da505 100644
--- a/net/url_request/url_request_ftp_job_unittest.cc
+++ b/net/url_request/url_request_ftp_job_unittest.cc
@@ -19,6 +19,7 @@
#include "net/proxy/mock_proxy_resolver.h"
#include "net/proxy/proxy_config_service.h"
#include "net/proxy/proxy_config_service_fixed.h"
+#include "net/proxy/proxy_server.h"
#include "net/socket/socket_test_util.h"
#include "net/test/gtest_util.h"
#include "net/url_request/ftp_protocol_handler.h"
@@ -311,8 +312,9 @@ TEST_F(URLRequestFtpJobTest, FtpProxyRequest) {
base::RunLoop().Run();
EXPECT_TRUE(url_request->status().is_success());
- EXPECT_TRUE(url_request->proxy_server().Equals(
- HostPortPair::FromString("localhost:80")));
+ EXPECT_EQ(ProxyServer(ProxyServer::SCHEME_HTTP,
+ HostPortPair::FromString("localhost:80")),
+ url_request->proxy_server());
EXPECT_EQ(1, network_delegate()->completed_requests());
EXPECT_EQ(0, network_delegate()->error_count());
EXPECT_FALSE(request_delegate.auth_required_called());
@@ -407,8 +409,9 @@ TEST_F(URLRequestFtpJobTest, FtpProxyRequestNeedProxyAuthNoCredentials) {
base::RunLoop().Run();
EXPECT_TRUE(url_request->status().is_success());
- EXPECT_TRUE(url_request->proxy_server().Equals(
- HostPortPair::FromString("localhost:80")));
+ EXPECT_EQ(ProxyServer(ProxyServer::SCHEME_HTTP,
+ HostPortPair::FromString("localhost:80")),
+ url_request->proxy_server());
EXPECT_EQ(1, network_delegate()->completed_requests());
EXPECT_EQ(0, network_delegate()->error_count());
EXPECT_TRUE(request_delegate.auth_required_called());
@@ -715,8 +718,9 @@ TEST_F(URLRequestFtpJobTest, FtpProxyRequestReuseSocket) {
base::RunLoop().Run();
EXPECT_TRUE(url_request1->status().is_success());
- EXPECT_TRUE(url_request1->proxy_server().Equals(
- HostPortPair::FromString("localhost:80")));
+ EXPECT_EQ(ProxyServer(ProxyServer::SCHEME_HTTP,
+ HostPortPair::FromString("localhost:80")),
+ url_request1->proxy_server());
EXPECT_EQ(1, network_delegate()->completed_requests());
EXPECT_EQ(0, network_delegate()->error_count());
EXPECT_FALSE(request_delegate1.auth_required_called());

Powered by Google App Engine
This is Rietveld 408576698