Chromium Code Reviews| Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats_unittest.cc |
| diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats_unittest.cc |
| index e1c1f46775c832425d27e7af128bbab2a34a5157..2c3b0fca3f6920a70ef78a20a3dfefc7f31dd9a3 100644 |
| --- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats_unittest.cc |
| +++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats_unittest.cc |
| @@ -554,20 +554,22 @@ class DataReductionProxyBypassStatsEndToEndTest : public testing::Test { |
| // to cause one proxy fallback in order for the data reduction proxy to be |
| // fully bypassed. |
| drp_test_context_ = |
| DataReductionProxyTestContext::Builder() |
| .WithParamsFlags(DataReductionProxyParams::kAllowed) |
| .WithURLRequestContext(&context_) |
| .WithMockClientSocketFactory(&mock_socket_factory_) |
| .Build(); |
| drp_test_context_->AttachToURLRequestContext(&context_storage_); |
| context_.set_client_socket_factory(&mock_socket_factory_); |
| + proxy_delegate_ = drp_test_context_->io_data()->CreateProxyDelegate(); |
| + context_.set_proxy_delegate(proxy_delegate_.get()); |
| } |
| // Create and execute a fake request using the data reduction proxy stack. |
| // Passing in nullptr for |retry_response_headers| indicates that the request |
| // is not expected to be retried. |
| void CreateAndExecuteRequest(const GURL& url, |
| const char* initial_response_headers, |
| const char* initial_response_body, |
| const char* retry_response_headers, |
| const char* retry_response_body) { |
| @@ -692,20 +694,21 @@ class DataReductionProxyBypassStatsEndToEndTest : public testing::Test { |
| } |
| net::TestDelegate* delegate() { return &delegate_; } |
| private: |
| base::MessageLoopForIO message_loop_; |
| net::TestDelegate delegate_; |
| net::MockClientSocketFactory mock_socket_factory_; |
| net::TestURLRequestContext context_; |
| net::URLRequestContextStorage context_storage_; |
| + 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_; |
| }; |
| TEST_F(DataReductionProxyBypassStatsEndToEndTest, BypassedBytesNoRetry) { |
| struct TestCase { |
| GURL url; |
| const char* histogram_name; |
| const char* initial_response_headers; |
| }; |
| const TestCase test_cases[] = { |