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

Unified Diff: net/url_request/url_request_ftp_job_unittest.cc

Issue 2334623003: Store net::ProxyServer in HttpResponseInfo object (Closed)
Patch Set: Rebased, fix compile error Created 4 years, 2 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/url_request/url_request.cc ('k') | net/url_request/url_request_job.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 526269c0c8cc306ff6463d24ecf92c92040d5494..6f2642106cf96b91391bfb86575fcd4406395409 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_THAT(request_delegate.request_status(), IsOk());
- 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_THAT(request_delegate.request_status(), IsOk());
- 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());
@@ -714,8 +717,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());
« no previous file with comments | « net/url_request/url_request.cc ('k') | net/url_request/url_request_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698