Index: net/spdy/spdy_session_unittest.cc |
diff --git a/net/spdy/spdy_session_unittest.cc b/net/spdy/spdy_session_unittest.cc |
index 95c8fd98b74427d79720f7554d868cb6e0e6e9a4..82ec9e1dd3624caf7f33f072fdd08d69bf1340a1 100644 |
--- a/net/spdy/spdy_session_unittest.cc |
+++ b/net/spdy/spdy_session_unittest.cc |
@@ -12,14 +12,17 @@ |
#include "base/memory/scoped_ptr.h" |
#include "base/run_loop.h" |
#include "base/test/histogram_tester.h" |
+#include "net/base/host_port_pair.h" |
#include "net/base/io_buffer.h" |
#include "net/base/ip_endpoint.h" |
+#include "net/base/proxy_delegate.h" |
#include "net/base/request_priority.h" |
#include "net/base/test_data_directory.h" |
#include "net/base/test_data_stream.h" |
#include "net/log/test_net_log.h" |
#include "net/log/test_net_log_entry.h" |
#include "net/log/test_net_log_util.h" |
+#include "net/proxy/proxy_server.h" |
#include "net/socket/client_socket_pool_manager.h" |
#include "net/socket/next_proto.h" |
#include "net/socket/socket_test_util.h" |
@@ -4825,6 +4828,11 @@ TEST_P(SpdySessionTest, TrustedSpdyProxy) { |
ASSERT_NE(GURL(kDefaultURL).host(), GURL(kHttpURLFromAnotherOrigin).host()); |
ASSERT_NE(GURL(kDefaultURL).host(), GURL(kHttpsURLFromAnotherOrigin).host()); |
+ scoped_ptr<TestProxyDelegate> proxy_delegate(new TestProxyDelegate()); |
+ proxy_delegate->set_trusted_spdy_proxy( |
+ net::ProxyServer(net::ProxyServer::SCHEME_HTTPS, |
+ HostPortPair(GURL(kDefaultURL).host(), 80))); |
+ |
// cross_origin_push contains HTTP resource for an origin different from the |
// origin of kDefaultURL, and should be accepted. |
scoped_ptr<SpdyFrame> cross_origin_push(spdy_util_.ConstructSpdyPush( |
@@ -4851,8 +4859,7 @@ TEST_P(SpdySessionTest, TrustedSpdyProxy) { |
SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes)); |
session_deps_.socket_factory->AddSocketDataProvider(&data); |
- session_deps_.trusted_spdy_proxy = |
- HostPortPair::FromURL(GURL(kDefaultURL)).ToString(); |
+ session_deps_.proxy_delegate.reset(proxy_delegate.release()); |
CreateNetworkSession(); |
CreateInsecureSpdySession(); |