| 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 ed7470b3a618ffba8be29837496992d3e2f5ca21..e708aa05f5e8f12e4e349c0181ccb39c86ad35fd 100644
|
| --- a/net/http/http_network_transaction_unittest.cc
|
| +++ b/net/http/http_network_transaction_unittest.cc
|
| @@ -28,6 +28,7 @@
|
| #include "net/base/auth.h"
|
| #include "net/base/chunked_upload_data_stream.h"
|
| #include "net/base/completion_callback.h"
|
| +#include "net/base/default_trusted_spdy_proxy_provider.h"
|
| #include "net/base/elements_upload_data_stream.h"
|
| #include "net/base/load_timing_info.h"
|
| #include "net/base/load_timing_info_test_util.h"
|
| @@ -63,6 +64,7 @@
|
| #include "net/proxy/proxy_config_service_fixed.h"
|
| #include "net/proxy/proxy_info.h"
|
| #include "net/proxy/proxy_resolver.h"
|
| +#include "net/proxy/proxy_server.h"
|
| #include "net/proxy/proxy_service.h"
|
| #include "net/socket/client_socket_factory.h"
|
| #include "net/socket/client_socket_pool_manager.h"
|
| @@ -7687,6 +7689,9 @@ TEST_P(HttpNetworkTransactionTest, BasicAuthSpdyProxy) {
|
| // Test that an explicitly trusted SPDY proxy can push a resource from an
|
| // origin that is different from that of its associated resource.
|
| TEST_P(HttpNetworkTransactionTest, CrossOriginProxyPush) {
|
| + DefaultTrustedSpdyProxyProvider trusted_spdy_proxy_provider(
|
| + net::ProxyServer::FromURI("https://myproxy:443",
|
| + net::ProxyServer::SCHEME_HTTP));
|
| HttpRequestInfo request;
|
| HttpRequestInfo push_request;
|
|
|
| @@ -7695,14 +7700,15 @@ TEST_P(HttpNetworkTransactionTest, CrossOriginProxyPush) {
|
| push_request.method = "GET";
|
| push_request.url = GURL("http://www.another-origin.com/foo.dat");
|
|
|
| - // Configure against https proxy server "myproxy:70".
|
| + // Configure against https proxy server "myproxy:443".
|
| session_deps_.proxy_service =
|
| - ProxyService::CreateFixedFromPacResult("HTTPS myproxy:70");
|
| + ProxyService::CreateFixedFromPacResult("HTTPS myproxy:443");
|
| BoundTestNetLog log;
|
| session_deps_.net_log = log.bound().net_log();
|
|
|
| // Enable cross-origin push.
|
| - session_deps_.trusted_spdy_proxy = "myproxy:70";
|
| + session_deps_.trusted_spdy_proxy_provider =
|
| + trusted_spdy_proxy_provider.GetWeakPtr();
|
|
|
| scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
|
|
|
| @@ -7804,18 +7810,23 @@ TEST_P(HttpNetworkTransactionTest, CrossOriginProxyPush) {
|
|
|
| // Test that an explicitly trusted SPDY proxy cannot push HTTPS content.
|
| TEST_P(HttpNetworkTransactionTest, CrossOriginProxyPushCorrectness) {
|
| + DefaultTrustedSpdyProxyProvider trusted_spdy_proxy_provider(
|
| + net::ProxyServer::FromURI("https://myproxy:443",
|
| + net::ProxyServer::SCHEME_HTTP));
|
| HttpRequestInfo request;
|
|
|
| request.method = "GET";
|
| request.url = GURL("http://www.example.org/");
|
|
|
| - // Configure against https proxy server "myproxy:70".
|
| - session_deps_.proxy_service = ProxyService::CreateFixed("https://myproxy:70");
|
| + // Configure against https proxy server "myproxy:443".
|
| + session_deps_.proxy_service =
|
| + ProxyService::CreateFixed("https://myproxy:443");
|
| BoundTestNetLog log;
|
| session_deps_.net_log = log.bound().net_log();
|
|
|
| // Enable cross-origin push.
|
| - session_deps_.trusted_spdy_proxy = "myproxy:70";
|
| + session_deps_.trusted_spdy_proxy_provider =
|
| + trusted_spdy_proxy_provider.GetWeakPtr();
|
|
|
| scoped_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
|
|
|
|
|