| Index: net/http/http_network_transaction_unittest.cc
|
| diff --git a/net/http/http_network_transaction_unittest.cc b/net/http/http_network_transaction_unittest.cc
|
| index f2637776848f8d70ff90d8ac41cef2bd15a14bf7..e06504ce1725110104f3eeebec04895909e7ed21 100644
|
| --- a/net/http/http_network_transaction_unittest.cc
|
| +++ b/net/http/http_network_transaction_unittest.cc
|
| @@ -2398,8 +2398,8 @@ TEST_P(HttpNetworkTransactionTest, BasicAuthProxyNoKeepAliveHttp10) {
|
| request.load_flags = LOAD_DO_NOT_SEND_AUTH_DATA;
|
|
|
| // Configure against proxy server "myproxy:70".
|
| - session_deps_.proxy_service.reset(
|
| - ProxyService::CreateFixedFromPacResult("PROXY myproxy:70"));
|
| + session_deps_.proxy_service =
|
| + ProxyService::CreateFixedFromPacResult("PROXY myproxy:70");
|
| BoundTestNetLog log;
|
| session_deps_.net_log = log.bound().net_log();
|
| scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_));
|
| @@ -2516,8 +2516,8 @@ TEST_P(HttpNetworkTransactionTest, BasicAuthProxyNoKeepAliveHttp11) {
|
| request.load_flags = LOAD_DO_NOT_SEND_AUTH_DATA;
|
|
|
| // Configure against proxy server "myproxy:70".
|
| - session_deps_.proxy_service.reset(
|
| - ProxyService::CreateFixedFromPacResult("PROXY myproxy:70"));
|
| + session_deps_.proxy_service =
|
| + ProxyService::CreateFixedFromPacResult("PROXY myproxy:70");
|
| BoundTestNetLog log;
|
| session_deps_.net_log = log.bound().net_log();
|
| scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_));
|
| @@ -2637,7 +2637,7 @@ TEST_P(HttpNetworkTransactionTest, BasicAuthProxyKeepAliveHttp10) {
|
| request.load_flags = LOAD_DO_NOT_SEND_AUTH_DATA;
|
|
|
| // Configure against proxy server "myproxy:70".
|
| - session_deps_.proxy_service.reset(ProxyService::CreateFixed("myproxy:70"));
|
| + session_deps_.proxy_service = ProxyService::CreateFixed("myproxy:70");
|
| BoundTestNetLog log;
|
| session_deps_.net_log = log.bound().net_log();
|
| scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_));
|
| @@ -2744,7 +2744,7 @@ TEST_P(HttpNetworkTransactionTest, BasicAuthProxyKeepAliveHttp11) {
|
| request.load_flags = LOAD_DO_NOT_SEND_AUTH_DATA;
|
|
|
| // Configure against proxy server "myproxy:70".
|
| - session_deps_.proxy_service.reset(ProxyService::CreateFixed("myproxy:70"));
|
| + session_deps_.proxy_service = ProxyService::CreateFixed("myproxy:70");
|
| BoundTestNetLog log;
|
| session_deps_.net_log = log.bound().net_log();
|
| scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_));
|
| @@ -2848,7 +2848,7 @@ TEST_P(HttpNetworkTransactionTest, BasicAuthProxyCancelTunnel) {
|
| request.load_flags = 0;
|
|
|
| // Configure against proxy server "myproxy:70".
|
| - session_deps_.proxy_service.reset(ProxyService::CreateFixed("myproxy:70"));
|
| + session_deps_.proxy_service = ProxyService::CreateFixed("myproxy:70");
|
|
|
| scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_));
|
|
|
| @@ -2908,7 +2908,7 @@ TEST_P(HttpNetworkTransactionTest, SanitizeProxyAuthHeaders) {
|
| request.load_flags = 0;
|
|
|
| // Configure against proxy server "myproxy:70".
|
| - session_deps_.proxy_service.reset(ProxyService::CreateFixed("myproxy:70"));
|
| + session_deps_.proxy_service = ProxyService::CreateFixed("myproxy:70");
|
|
|
| scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_));
|
|
|
| @@ -3016,7 +3016,7 @@ TEST_P(HttpNetworkTransactionTest,
|
| request.method = "GET";
|
| request.url = GURL("https://www.example.org/");
|
|
|
| - session_deps_.proxy_service.reset(ProxyService::CreateFixed("myproxy:70"));
|
| + session_deps_.proxy_service = ProxyService::CreateFixed("myproxy:70");
|
| BoundTestNetLog log;
|
| session_deps_.net_log = log.bound().net_log();
|
| scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_));
|
| @@ -3081,8 +3081,7 @@ TEST_P(HttpNetworkTransactionTest, HttpProxyLoadTimingNoPacTwoRequests) {
|
| request2.url = GURL("https://www.example.org/2");
|
|
|
| // Configure against proxy server "myproxy:70".
|
| - session_deps_.proxy_service.reset(
|
| - ProxyService::CreateFixed("PROXY myproxy:70"));
|
| + session_deps_.proxy_service = ProxyService::CreateFixed("PROXY myproxy:70");
|
| BoundTestNetLog log;
|
| session_deps_.net_log = log.bound().net_log();
|
| scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_));
|
| @@ -3182,8 +3181,8 @@ TEST_P(HttpNetworkTransactionTest, HttpProxyLoadTimingWithPacTwoRequests) {
|
| request2.url = GURL("https://www.example.org/2");
|
|
|
| // Configure against proxy server "myproxy:70".
|
| - session_deps_.proxy_service.reset(
|
| - ProxyService::CreateFixedFromPacResult("PROXY myproxy:70"));
|
| + session_deps_.proxy_service =
|
| + ProxyService::CreateFixedFromPacResult("PROXY myproxy:70");
|
| BoundTestNetLog log;
|
| session_deps_.net_log = log.bound().net_log();
|
| scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_));
|
| @@ -3280,8 +3279,7 @@ TEST_P(HttpNetworkTransactionTest, HttpsProxyGet) {
|
| request.url = GURL("http://www.example.org/");
|
|
|
| // Configure against https proxy server "proxy:70".
|
| - session_deps_.proxy_service.reset(ProxyService::CreateFixed(
|
| - "https://proxy:70"));
|
| + session_deps_.proxy_service = ProxyService::CreateFixed("https://proxy:70");
|
| BoundTestNetLog log;
|
| session_deps_.net_log = log.bound().net_log();
|
| scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_));
|
| @@ -3343,8 +3341,7 @@ TEST_P(HttpNetworkTransactionTest, HttpsProxySpdyGet) {
|
| request.load_flags = 0;
|
|
|
| // Configure against https proxy server "proxy:70".
|
| - session_deps_.proxy_service.reset(ProxyService::CreateFixed(
|
| - "https://proxy:70"));
|
| + session_deps_.proxy_service = ProxyService::CreateFixed("https://proxy:70");
|
| BoundTestNetLog log;
|
| session_deps_.net_log = log.bound().net_log();
|
| scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_));
|
| @@ -3404,8 +3401,7 @@ TEST_P(HttpNetworkTransactionTest, HttpsProxySpdyGetWithSessionRace) {
|
| request.load_flags = 0;
|
|
|
| // Configure SPDY proxy server "proxy:70".
|
| - session_deps_.proxy_service.reset(
|
| - ProxyService::CreateFixed("https://proxy:70"));
|
| + session_deps_.proxy_service = ProxyService::CreateFixed("https://proxy:70");
|
| BoundTestNetLog log;
|
| session_deps_.net_log = log.bound().net_log();
|
| scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_));
|
| @@ -3474,8 +3470,7 @@ TEST_P(HttpNetworkTransactionTest, HttpsProxySpdyGetWithProxyAuth) {
|
| request.load_flags = 0;
|
|
|
| // Configure against https proxy server "myproxy:70".
|
| - session_deps_.proxy_service.reset(
|
| - ProxyService::CreateFixed("https://myproxy:70"));
|
| + session_deps_.proxy_service = ProxyService::CreateFixed("https://myproxy:70");
|
| BoundTestNetLog log;
|
| session_deps_.net_log = log.bound().net_log();
|
| scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_));
|
| @@ -3575,8 +3570,7 @@ TEST_P(HttpNetworkTransactionTest, HttpsProxySpdyConnectHttps) {
|
| request.load_flags = 0;
|
|
|
| // Configure against https proxy server "proxy:70".
|
| - session_deps_.proxy_service.reset(ProxyService::CreateFixed(
|
| - "https://proxy:70"));
|
| + session_deps_.proxy_service = ProxyService::CreateFixed("https://proxy:70");
|
| BoundTestNetLog log;
|
| session_deps_.net_log = log.bound().net_log();
|
| scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_));
|
| @@ -3660,8 +3654,7 @@ TEST_P(HttpNetworkTransactionTest, HttpsProxySpdyConnectSpdy) {
|
| request.load_flags = 0;
|
|
|
| // Configure against https proxy server "proxy:70".
|
| - session_deps_.proxy_service.reset(ProxyService::CreateFixed(
|
| - "https://proxy:70"));
|
| + session_deps_.proxy_service = ProxyService::CreateFixed("https://proxy:70");
|
| BoundTestNetLog log;
|
| session_deps_.net_log = log.bound().net_log();
|
| scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_));
|
| @@ -3752,8 +3745,7 @@ TEST_P(HttpNetworkTransactionTest, HttpsProxySpdyConnectFailure) {
|
| request.load_flags = 0;
|
|
|
| // Configure against https proxy server "proxy:70".
|
| - session_deps_.proxy_service.reset(ProxyService::CreateFixed(
|
| - "https://proxy:70"));
|
| + session_deps_.proxy_service = ProxyService::CreateFixed("https://proxy:70");
|
| BoundTestNetLog log;
|
| session_deps_.net_log = log.bound().net_log();
|
| scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_));
|
| @@ -3804,8 +3796,7 @@ TEST_P(HttpNetworkTransactionTest, HttpsProxySpdyConnectFailure) {
|
| TEST_P(HttpNetworkTransactionTest,
|
| HttpsProxySpdyConnectHttpsLoadTimingTwoRequestsTwoServers) {
|
| // Configure against https proxy server "proxy:70".
|
| - session_deps_.proxy_service.reset(ProxyService::CreateFixed(
|
| - "https://proxy:70"));
|
| + session_deps_.proxy_service = ProxyService::CreateFixed("https://proxy:70");
|
| BoundTestNetLog log;
|
| session_deps_.net_log = log.bound().net_log();
|
| scoped_refptr<HttpNetworkSession> session(
|
| @@ -3947,8 +3938,7 @@ TEST_P(HttpNetworkTransactionTest,
|
| TEST_P(HttpNetworkTransactionTest,
|
| HttpsProxySpdyConnectHttpsLoadTimingTwoRequestsSameServer) {
|
| // Configure against https proxy server "proxy:70".
|
| - session_deps_.proxy_service.reset(ProxyService::CreateFixed(
|
| - "https://proxy:70"));
|
| + session_deps_.proxy_service = ProxyService::CreateFixed("https://proxy:70");
|
| BoundTestNetLog log;
|
| session_deps_.net_log = log.bound().net_log();
|
| scoped_refptr<HttpNetworkSession> session(
|
| @@ -4071,8 +4061,7 @@ TEST_P(HttpNetworkTransactionTest,
|
| // Proxy to different servers.
|
| TEST_P(HttpNetworkTransactionTest, HttpsProxySpdyLoadTimingTwoHttpRequests) {
|
| // Configure against https proxy server "proxy:70".
|
| - session_deps_.proxy_service.reset(ProxyService::CreateFixed(
|
| - "https://proxy:70"));
|
| + session_deps_.proxy_service = ProxyService::CreateFixed("https://proxy:70");
|
| BoundTestNetLog log;
|
| session_deps_.net_log = log.bound().net_log();
|
| scoped_refptr<HttpNetworkSession> session(
|
| @@ -4178,8 +4167,7 @@ TEST_P(HttpNetworkTransactionTest, HttpsProxyAuthRetry) {
|
| request.load_flags = LOAD_DO_NOT_SEND_AUTH_DATA;
|
|
|
| // Configure against https proxy server "myproxy:70".
|
| - session_deps_.proxy_service.reset(
|
| - ProxyService::CreateFixed("https://myproxy:70"));
|
| + session_deps_.proxy_service = ProxyService::CreateFixed("https://myproxy:70");
|
| BoundTestNetLog log;
|
| session_deps_.net_log = log.bound().net_log();
|
| scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_));
|
| @@ -4278,7 +4266,7 @@ void HttpNetworkTransactionTest::ConnectStatusHelperWithExpectedStatus(
|
| request.load_flags = 0;
|
|
|
| // Configure against proxy server "myproxy:70".
|
| - session_deps_.proxy_service.reset(ProxyService::CreateFixed("myproxy:70"));
|
| + session_deps_.proxy_service = ProxyService::CreateFixed("myproxy:70");
|
| scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_));
|
|
|
| // Since we have proxy, should try to establish tunnel.
|
| @@ -4496,7 +4484,7 @@ TEST_P(HttpNetworkTransactionTest, BasicAuthProxyThenServer) {
|
| request.load_flags = 0;
|
|
|
| // Configure against proxy server "myproxy:70".
|
| - session_deps_.proxy_service.reset(ProxyService::CreateFixed("myproxy:70"));
|
| + session_deps_.proxy_service = ProxyService::CreateFixed("myproxy:70");
|
| scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_));
|
|
|
| scoped_ptr<HttpTransaction> trans(
|
| @@ -4999,7 +4987,7 @@ TEST_P(HttpNetworkTransactionTest,
|
| request.load_flags = 0;
|
|
|
| // Configure against proxy server "myproxy:70".
|
| - session_deps_.proxy_service.reset(ProxyService::CreateFixed("myproxy:70"));
|
| + session_deps_.proxy_service = ProxyService::CreateFixed("myproxy:70");
|
|
|
| scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_));
|
|
|
| @@ -6315,7 +6303,7 @@ TEST_P(HttpNetworkTransactionTest, HTTPSBadCertificate) {
|
| // Test HTTPS connections to a site with a bad certificate, going through a
|
| // proxy
|
| TEST_P(HttpNetworkTransactionTest, HTTPSBadCertificateViaProxy) {
|
| - session_deps_.proxy_service.reset(ProxyService::CreateFixed("myproxy:70"));
|
| + session_deps_.proxy_service = ProxyService::CreateFixed("myproxy:70");
|
|
|
| HttpRequestInfo request;
|
| request.method = "GET";
|
| @@ -6397,8 +6385,8 @@ TEST_P(HttpNetworkTransactionTest, HTTPSBadCertificateViaProxy) {
|
|
|
| // Test HTTPS connections to a site, going through an HTTPS proxy
|
| TEST_P(HttpNetworkTransactionTest, HTTPSViaHttpsProxy) {
|
| - session_deps_.proxy_service.reset(
|
| - ProxyService::CreateFixedFromPacResult("HTTPS proxy:70"));
|
| + session_deps_.proxy_service =
|
| + ProxyService::CreateFixedFromPacResult("HTTPS proxy:70");
|
| TestNetLog net_log;
|
| session_deps_.net_log = &net_log;
|
|
|
| @@ -6463,8 +6451,8 @@ TEST_P(HttpNetworkTransactionTest, HTTPSViaHttpsProxy) {
|
|
|
| // Test an HTTPS Proxy's ability to redirect a CONNECT request
|
| TEST_P(HttpNetworkTransactionTest, RedirectOfHttpsConnectViaHttpsProxy) {
|
| - session_deps_.proxy_service.reset(
|
| - ProxyService::CreateFixedFromPacResult("HTTPS proxy:70"));
|
| + session_deps_.proxy_service =
|
| + ProxyService::CreateFixedFromPacResult("HTTPS proxy:70");
|
| TestNetLog net_log;
|
| session_deps_.net_log = &net_log;
|
|
|
| @@ -6540,8 +6528,7 @@ TEST_P(HttpNetworkTransactionTest, RedirectOfHttpsConnectViaHttpsProxy) {
|
|
|
| // Test an HTTPS (SPDY) Proxy's ability to redirect a CONNECT request
|
| TEST_P(HttpNetworkTransactionTest, RedirectOfHttpsConnectViaSpdyProxy) {
|
| - session_deps_.proxy_service.reset(
|
| - ProxyService::CreateFixed("https://proxy:70"));
|
| + session_deps_.proxy_service = ProxyService::CreateFixed("https://proxy:70");
|
|
|
| HttpRequestInfo request;
|
| request.method = "GET";
|
| @@ -6600,8 +6587,7 @@ TEST_P(HttpNetworkTransactionTest, RedirectOfHttpsConnectViaSpdyProxy) {
|
| // Test that an HTTPS proxy's response to a CONNECT request is filtered.
|
| TEST_P(HttpNetworkTransactionTest,
|
| ErrorResponseToHttpsConnectViaHttpsProxy) {
|
| - session_deps_.proxy_service.reset(
|
| - ProxyService::CreateFixed("https://proxy:70"));
|
| + session_deps_.proxy_service = ProxyService::CreateFixed("https://proxy:70");
|
|
|
| HttpRequestInfo request;
|
| request.method = "GET";
|
| @@ -6647,8 +6633,7 @@ TEST_P(HttpNetworkTransactionTest,
|
| // Test that a SPDY proxy's response to a CONNECT request is filtered.
|
| TEST_P(HttpNetworkTransactionTest,
|
| ErrorResponseToHttpsConnectViaSpdyProxy) {
|
| - session_deps_.proxy_service.reset(
|
| - ProxyService::CreateFixed("https://proxy:70"));
|
| + session_deps_.proxy_service = ProxyService::CreateFixed("https://proxy:70");
|
|
|
| HttpRequestInfo request;
|
| request.method = "GET";
|
| @@ -6712,8 +6697,8 @@ TEST_P(HttpNetworkTransactionTest, BasicAuthSpdyProxy) {
|
| request.load_flags = LOAD_DO_NOT_SEND_AUTH_DATA;
|
|
|
| // Configure against https proxy server "myproxy:70".
|
| - session_deps_.proxy_service.reset(
|
| - ProxyService::CreateFixedFromPacResult("HTTPS myproxy:70"));
|
| + session_deps_.proxy_service =
|
| + ProxyService::CreateFixedFromPacResult("HTTPS myproxy:70");
|
| BoundTestNetLog log;
|
| session_deps_.net_log = log.bound().net_log();
|
| scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_));
|
| @@ -6853,8 +6838,8 @@ TEST_P(HttpNetworkTransactionTest, CrossOriginProxyPush) {
|
| push_request.url = GURL("http://www.another-origin.com/foo.dat");
|
|
|
| // Configure against https proxy server "myproxy:70".
|
| - session_deps_.proxy_service.reset(
|
| - ProxyService::CreateFixedFromPacResult("HTTPS myproxy:70"));
|
| + session_deps_.proxy_service =
|
| + ProxyService::CreateFixedFromPacResult("HTTPS myproxy:70");
|
| BoundTestNetLog log;
|
| session_deps_.net_log = log.bound().net_log();
|
|
|
| @@ -6967,8 +6952,7 @@ TEST_P(HttpNetworkTransactionTest, CrossOriginProxyPushCorrectness) {
|
| request.url = GURL("http://www.example.org/");
|
|
|
| // Configure against https proxy server "myproxy:70".
|
| - session_deps_.proxy_service.reset(
|
| - ProxyService::CreateFixed("https://myproxy:70"));
|
| + session_deps_.proxy_service = ProxyService::CreateFixed("https://myproxy:70");
|
| BoundTestNetLog log;
|
| session_deps_.net_log = log.bound().net_log();
|
|
|
| @@ -7043,8 +7027,7 @@ TEST_P(HttpNetworkTransactionTest, CrossOriginProxyPushCorrectness) {
|
| // Test HTTPS connections to a site with a bad certificate, going through an
|
| // HTTPS proxy
|
| TEST_P(HttpNetworkTransactionTest, HTTPSBadCertificateViaHttpsProxy) {
|
| - session_deps_.proxy_service.reset(ProxyService::CreateFixed(
|
| - "https://proxy:70"));
|
| + session_deps_.proxy_service = ProxyService::CreateFixed("https://proxy:70");
|
|
|
| HttpRequestInfo request;
|
| request.method = "GET";
|
| @@ -7173,7 +7156,7 @@ TEST_P(HttpNetworkTransactionTest, BuildRequest_UserAgentOverTunnel) {
|
| request.extra_headers.SetHeader(HttpRequestHeaders::kUserAgent,
|
| "Chromium Ultra Awesome X Edition");
|
|
|
| - session_deps_.proxy_service.reset(ProxyService::CreateFixed("myproxy:70"));
|
| + session_deps_.proxy_service = ProxyService::CreateFixed("myproxy:70");
|
| scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_));
|
| scoped_ptr<HttpTransaction> trans(
|
| new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
|
| @@ -7527,8 +7510,8 @@ TEST_P(HttpNetworkTransactionTest, SOCKS4_HTTP_GET) {
|
| request.url = GURL("http://www.example.org/");
|
| request.load_flags = 0;
|
|
|
| - session_deps_.proxy_service.reset(
|
| - ProxyService::CreateFixedFromPacResult("SOCKS myproxy:1080"));
|
| + session_deps_.proxy_service =
|
| + ProxyService::CreateFixedFromPacResult("SOCKS myproxy:1080");
|
| TestNetLog net_log;
|
| session_deps_.net_log = &net_log;
|
|
|
| @@ -7586,8 +7569,8 @@ TEST_P(HttpNetworkTransactionTest, SOCKS4_SSL_GET) {
|
| request.url = GURL("https://www.example.org/");
|
| request.load_flags = 0;
|
|
|
| - session_deps_.proxy_service.reset(
|
| - ProxyService::CreateFixedFromPacResult("SOCKS myproxy:1080"));
|
| + session_deps_.proxy_service =
|
| + ProxyService::CreateFixedFromPacResult("SOCKS myproxy:1080");
|
| TestNetLog net_log;
|
| session_deps_.net_log = &net_log;
|
|
|
| @@ -7650,8 +7633,8 @@ TEST_P(HttpNetworkTransactionTest, SOCKS4_HTTP_GET_no_PAC) {
|
| request.url = GURL("http://www.example.org/");
|
| request.load_flags = 0;
|
|
|
| - session_deps_.proxy_service.reset(
|
| - ProxyService::CreateFixed("socks4://myproxy:1080"));
|
| + session_deps_.proxy_service =
|
| + ProxyService::CreateFixed("socks4://myproxy:1080");
|
| TestNetLog net_log;
|
| session_deps_.net_log = &net_log;
|
|
|
| @@ -7709,8 +7692,8 @@ TEST_P(HttpNetworkTransactionTest, SOCKS5_HTTP_GET) {
|
| request.url = GURL("http://www.example.org/");
|
| request.load_flags = 0;
|
|
|
| - session_deps_.proxy_service.reset(
|
| - ProxyService::CreateFixedFromPacResult("SOCKS5 myproxy:1080"));
|
| + session_deps_.proxy_service =
|
| + ProxyService::CreateFixedFromPacResult("SOCKS5 myproxy:1080");
|
| TestNetLog net_log;
|
| session_deps_.net_log = &net_log;
|
|
|
| @@ -7781,8 +7764,8 @@ TEST_P(HttpNetworkTransactionTest, SOCKS5_SSL_GET) {
|
| request.url = GURL("https://www.example.org/");
|
| request.load_flags = 0;
|
|
|
| - session_deps_.proxy_service.reset(
|
| - ProxyService::CreateFixedFromPacResult("SOCKS5 myproxy:1080"));
|
| + session_deps_.proxy_service =
|
| + ProxyService::CreateFixedFromPacResult("SOCKS5 myproxy:1080");
|
| TestNetLog net_log;
|
| session_deps_.net_log = &net_log;
|
|
|
| @@ -7938,8 +7921,8 @@ TEST_P(HttpNetworkTransactionTest, GroupNameForDirectConnections) {
|
| session_deps_.use_alternative_services = true;
|
|
|
| for (size_t i = 0; i < arraysize(tests); ++i) {
|
| - session_deps_.proxy_service.reset(
|
| - ProxyService::CreateFixed(tests[i].proxy_server));
|
| + session_deps_.proxy_service =
|
| + ProxyService::CreateFixed(tests[i].proxy_server);
|
| scoped_refptr<HttpNetworkSession> session(
|
| SetupSessionForGroupNameTests(GetParam(), &session_deps_));
|
|
|
| @@ -8000,8 +7983,8 @@ TEST_P(HttpNetworkTransactionTest, GroupNameForHTTPProxyConnections) {
|
| session_deps_.use_alternative_services = true;
|
|
|
| for (size_t i = 0; i < arraysize(tests); ++i) {
|
| - session_deps_.proxy_service.reset(
|
| - ProxyService::CreateFixed(tests[i].proxy_server));
|
| + session_deps_.proxy_service =
|
| + ProxyService::CreateFixed(tests[i].proxy_server);
|
| scoped_refptr<HttpNetworkSession> session(
|
| SetupSessionForGroupNameTests(GetParam(), &session_deps_));
|
|
|
| @@ -8070,8 +8053,8 @@ TEST_P(HttpNetworkTransactionTest, GroupNameForSOCKSConnections) {
|
| session_deps_.use_alternative_services = true;
|
|
|
| for (size_t i = 0; i < arraysize(tests); ++i) {
|
| - session_deps_.proxy_service.reset(
|
| - ProxyService::CreateFixed(tests[i].proxy_server));
|
| + session_deps_.proxy_service =
|
| + ProxyService::CreateFixed(tests[i].proxy_server);
|
| scoped_refptr<HttpNetworkSession> session(
|
| SetupSessionForGroupNameTests(GetParam(), &session_deps_));
|
|
|
| @@ -8108,8 +8091,8 @@ TEST_P(HttpNetworkTransactionTest, ReconsiderProxyAfterFailedConnection) {
|
| request.method = "GET";
|
| request.url = GURL("http://www.example.org/");
|
|
|
| - session_deps_.proxy_service.reset(
|
| - ProxyService::CreateFixed("myproxy:70;foobar:80"));
|
| + session_deps_.proxy_service =
|
| + ProxyService::CreateFixed("myproxy:70;foobar:80");
|
|
|
| // This simulates failure resolving all hostnames; that means we will fail
|
| // connecting to both proxies (myproxy:70 and foobar:80).
|
| @@ -8346,7 +8329,7 @@ TEST_P(HttpNetworkTransactionTest, DrainResetOK) {
|
|
|
| // Test HTTPS connections going through a proxy that sends extra data.
|
| TEST_P(HttpNetworkTransactionTest, HTTPSViaProxyWithExtraData) {
|
| - session_deps_.proxy_service.reset(ProxyService::CreateFixed("myproxy:70"));
|
| + session_deps_.proxy_service = ProxyService::CreateFixed("myproxy:70");
|
|
|
| HttpRequestInfo request;
|
| request.method = "GET";
|
| @@ -10288,10 +10271,10 @@ TEST_P(HttpNetworkTransactionTest, GenerateAuthToken) {
|
| auth_factory->AddMockHandler(auth_handler, HttpAuth::AUTH_SERVER);
|
| }
|
| if (test_config.proxy_url) {
|
| - session_deps_.proxy_service.reset(
|
| - ProxyService::CreateFixed(test_config.proxy_url));
|
| + session_deps_.proxy_service =
|
| + ProxyService::CreateFixed(test_config.proxy_url);
|
| } else {
|
| - session_deps_.proxy_service.reset(ProxyService::CreateDirect());
|
| + session_deps_.proxy_service = ProxyService::CreateDirect();
|
| }
|
|
|
| HttpRequestInfo request;
|
| @@ -10378,7 +10361,7 @@ TEST_P(HttpNetworkTransactionTest, MultiRoundAuth) {
|
| HttpAuthHandlerMock::Factory* auth_factory(
|
| new HttpAuthHandlerMock::Factory());
|
| session_deps_.http_auth_handler_factory.reset(auth_factory);
|
| - session_deps_.proxy_service.reset(ProxyService::CreateDirect());
|
| + session_deps_.proxy_service = ProxyService::CreateDirect();
|
| session_deps_.host_resolver->rules()->AddRule("www.example.com", "10.0.0.1");
|
| session_deps_.host_resolver->set_synchronous_mode(true);
|
|
|
| @@ -10689,8 +10672,8 @@ TEST_P(HttpNetworkTransactionTest, SpdyAlternateProtocolThroughProxy) {
|
| session_deps_.use_alternative_services = true;
|
| session_deps_.next_protos = SpdyNextProtos();
|
|
|
| - session_deps_.proxy_service.reset(
|
| - ProxyService::CreateFixedFromPacResult("PROXY myproxy:70"));
|
| + session_deps_.proxy_service =
|
| + ProxyService::CreateFixedFromPacResult("PROXY myproxy:70");
|
| TestNetLog net_log;
|
| session_deps_.net_log = &net_log;
|
| GURL request_url;
|
| @@ -10938,8 +10921,8 @@ TEST_P(HttpNetworkTransactionTest, CancelAfterHeaders) {
|
|
|
| // Test a basic GET request through a proxy.
|
| TEST_P(HttpNetworkTransactionTest, ProxyGet) {
|
| - session_deps_.proxy_service.reset(
|
| - ProxyService::CreateFixedFromPacResult("PROXY myproxy:70"));
|
| + session_deps_.proxy_service =
|
| + ProxyService::CreateFixedFromPacResult("PROXY myproxy:70");
|
| BoundTestNetLog log;
|
| session_deps_.net_log = log.bound().net_log();
|
| scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_));
|
| @@ -11002,8 +10985,8 @@ TEST_P(HttpNetworkTransactionTest, ProxyGet) {
|
|
|
| // Test a basic HTTPS GET request through a proxy.
|
| TEST_P(HttpNetworkTransactionTest, ProxyTunnelGet) {
|
| - session_deps_.proxy_service.reset(
|
| - ProxyService::CreateFixedFromPacResult("PROXY myproxy:70"));
|
| + session_deps_.proxy_service =
|
| + ProxyService::CreateFixedFromPacResult("PROXY myproxy:70");
|
| BoundTestNetLog log;
|
| session_deps_.net_log = log.bound().net_log();
|
| scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_));
|
| @@ -11080,7 +11063,7 @@ TEST_P(HttpNetworkTransactionTest, ProxyTunnelGet) {
|
| // Test a basic HTTPS GET request through a proxy, but the server hangs up
|
| // while establishing the tunnel.
|
| TEST_P(HttpNetworkTransactionTest, ProxyTunnelGetHangup) {
|
| - session_deps_.proxy_service.reset(ProxyService::CreateFixed("myproxy:70"));
|
| + session_deps_.proxy_service = ProxyService::CreateFixed("myproxy:70");
|
| BoundTestNetLog log;
|
| session_deps_.net_log = log.bound().net_log();
|
| scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_));
|
| @@ -11451,8 +11434,7 @@ TEST_P(HttpNetworkTransactionTest,
|
| // The test is repeated twice, first for connecting to an HTTPS endpoint,
|
| // then for connecting to an HTTP endpoint.
|
| TEST_P(HttpNetworkTransactionTest, ClientAuthCertCache_Proxy_Fail) {
|
| - session_deps_.proxy_service.reset(
|
| - ProxyService::CreateFixed("https://proxy:70"));
|
| + session_deps_.proxy_service = ProxyService::CreateFixed("https://proxy:70");
|
| BoundTestNetLog log;
|
| session_deps_.net_log = log.bound().net_log();
|
|
|
| @@ -12438,8 +12420,8 @@ TEST_P(HttpNetworkTransactionTest, DoNotUseSpdySessionForHttpOverTunnel) {
|
| MockConnect connect_data1(ASYNC, OK);
|
| data1.set_connect_data(connect_data1);
|
|
|
| - session_deps_.proxy_service.reset(
|
| - ProxyService::CreateFixedFromPacResult("HTTPS proxy:70"));
|
| + session_deps_.proxy_service =
|
| + ProxyService::CreateFixedFromPacResult("HTTPS proxy:70");
|
| TestNetLog log;
|
| session_deps_.net_log = &log;
|
| SSLSocketDataProvider ssl1(ASYNC, OK); // to the proxy
|
| @@ -14217,8 +14199,8 @@ TEST_P(HttpNetworkTransactionTest, ProxyHeadersNotSentOverWssTunnel) {
|
| AddWebSocketHeaders(&request.extra_headers);
|
|
|
| // Configure against proxy server "myproxy:70".
|
| - session_deps_.proxy_service.reset(
|
| - ProxyService::CreateFixedFromPacResult("PROXY myproxy:70"));
|
| + session_deps_.proxy_service =
|
| + ProxyService::CreateFixedFromPacResult("PROXY myproxy:70");
|
|
|
| scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_));
|
|
|
| @@ -14323,8 +14305,8 @@ TEST_P(HttpNetworkTransactionTest, ProxyHeadersNotSentOverWsTunnel) {
|
| AddWebSocketHeaders(&request.extra_headers);
|
|
|
| // Configure against proxy server "myproxy:70".
|
| - session_deps_.proxy_service.reset(
|
| - ProxyService::CreateFixedFromPacResult("PROXY myproxy:70"));
|
| + session_deps_.proxy_service =
|
| + ProxyService::CreateFixedFromPacResult("PROXY myproxy:70");
|
|
|
| scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_));
|
|
|
|
|