Chromium Code Reviews| Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_protocol_unittest.cc |
| diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_protocol_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_protocol_unittest.cc |
| index 7d378f711d5a2ae95a1ec2df2d22520317fa5405..8b674d06450c0d9b8dc67458318372e347217afc 100644 |
| --- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_protocol_unittest.cc |
| +++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_protocol_unittest.cc |
| @@ -775,20 +775,22 @@ class DataReductionProxyBypassProtocolEndToEndTest : public testing::Test { |
| void ResetDependencies() { |
| context_.reset(new net::TestURLRequestContext(true)); |
| storage_.reset(new net::URLRequestContextStorage(context_.get())); |
| mock_socket_factory_.reset(new net::MockClientSocketFactory()); |
| context_->set_client_socket_factory(mock_socket_factory_.get()); |
| drp_test_context_ = |
| DataReductionProxyTestContext::Builder() |
| .WithMockClientSocketFactory(mock_socket_factory_.get()) |
| .WithURLRequestContext(context_.get()) |
| .Build(); |
| + proxy_delegate_ = drp_test_context_->io_data()->CreateProxyDelegate(); |
| + context_->set_proxy_delegate(proxy_delegate_.get()); |
| } |
| void AttachToContextAndInit() { |
| drp_test_context_->AttachToURLRequestContext(storage_.get()); |
| context_->Init(); |
| } |
| net::TestURLRequestContext* context() { return context_.get(); } |
| net::URLRequestContextStorage* storage() { return storage_.get(); } |
| net::MockClientSocketFactory* mock_socket_factory() { |
| @@ -796,20 +798,21 @@ class DataReductionProxyBypassProtocolEndToEndTest : public testing::Test { |
| } |
| DataReductionProxyTestContext* drp_test_context() { |
| return drp_test_context_.get(); |
| } |
| private: |
| base::MessageLoopForIO loop_; |
| scoped_ptr<net::TestURLRequestContext> context_; |
| scoped_ptr<net::URLRequestContextStorage> storage_; |
| scoped_ptr<net::MockClientSocketFactory> mock_socket_factory_; |
| + scoped_ptr<net::ProxyDelegate> proxy_delegate_; |
|
bengr
2016/02/08 23:23:29
#include "net/base/proxy_delegate.h"
RyanSturm
2016/02/09 00:46:02
Done.
|
| scoped_ptr<DataReductionProxyTestContext> drp_test_context_; |
| DISALLOW_COPY_AND_ASSIGN(DataReductionProxyBypassProtocolEndToEndTest); |
| }; |
| TEST_F(DataReductionProxyBypassProtocolEndToEndTest, |
| BypassLogicAlwaysAppliesWhenViaHeaderPresent) { |
| const struct { |
| const char* first_response; |
| bool expected_retry; |