| 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 14bda39448d3534d25d6c6b5e742fb08a47b8f07..2d01dbf93ccb1eee80cbed670399a11ffb87abf1 100644
|
| --- a/net/http/http_network_transaction_unittest.cc
|
| +++ b/net/http/http_network_transaction_unittest.cc
|
| @@ -2399,8 +2399,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_));
|
| @@ -2523,8 +2523,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_));
|
| @@ -2648,7 +2648,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_));
|
| @@ -2755,7 +2755,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_));
|
| @@ -2861,7 +2861,7 @@ TEST_P(HttpNetworkTransactionTest, BasicAuthProxyKeepAliveHangupDuringBody) {
|
| 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");
|
| scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_));
|
|
|
| scoped_ptr<HttpTransaction> trans(
|
| @@ -2950,7 +2950,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_));
|
|
|
| @@ -3010,7 +3010,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_));
|
|
|
| @@ -3118,7 +3118,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_));
|
| @@ -3183,8 +3183,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_));
|
| @@ -3284,8 +3283,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_));
|
| @@ -3382,8 +3381,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_));
|
| @@ -3445,8 +3443,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_));
|
| @@ -3506,8 +3503,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_));
|
| @@ -3576,8 +3572,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_));
|
| @@ -3677,8 +3672,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_));
|
| @@ -3762,8 +3756,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_));
|
| @@ -3854,8 +3847,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_));
|
| @@ -3906,8 +3898,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(
|
| @@ -4049,8 +4040,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(
|
| @@ -4173,8 +4163,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(
|
| @@ -4280,8 +4269,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_));
|
| @@ -4380,7 +4368,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.
|
| @@ -4598,7 +4586,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(
|
| @@ -5101,7 +5089,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_));
|
|
|
| @@ -6417,7 +6405,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";
|
| @@ -6499,8 +6487,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;
|
|
|
| @@ -6565,8 +6553,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;
|
|
|
| @@ -6642,8 +6630,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";
|
| @@ -6702,8 +6689,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";
|
| @@ -6749,8 +6735,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";
|
| @@ -6814,8 +6799,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_));
|
| @@ -6955,8 +6940,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();
|
|
|
| @@ -7069,8 +7054,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();
|
|
|
| @@ -7145,8 +7129,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";
|
| @@ -7275,7 +7258,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()));
|
| @@ -7629,8 +7612,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;
|
|
|
| @@ -7688,8 +7671,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;
|
|
|
| @@ -7752,8 +7735,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;
|
|
|
| @@ -7811,8 +7794,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;
|
|
|
| @@ -7883,8 +7866,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;
|
|
|
| @@ -8040,8 +8023,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_));
|
|
|
| @@ -8102,8 +8085,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_));
|
|
|
| @@ -8172,8 +8155,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_));
|
|
|
| @@ -8210,8 +8193,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).
|
| @@ -8448,7 +8431,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";
|
| @@ -10496,10 +10479,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;
|
| @@ -10585,7 +10568,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);
|
|
|
| @@ -10896,8 +10879,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;
|
| @@ -11142,8 +11125,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_));
|
| @@ -11206,8 +11189,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_));
|
| @@ -11284,7 +11267,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_));
|
| @@ -11655,8 +11638,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();
|
|
|
| @@ -12641,8 +12623,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
|
| @@ -14408,8 +14390,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_));
|
|
|
| @@ -14515,8 +14497,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_));
|
|
|
|
|