OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_netw
ork_delegate.h" | 5 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_netw
ork_delegate.h" |
6 | 6 |
7 #include "base/metrics/field_trial.h" | 7 #include "base/metrics/field_trial.h" |
8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
9 #include "base/test/histogram_tester.h" | 9 #include "base/test/histogram_tester.h" |
10 #include "base/test/mock_entropy_provider.h" | 10 #include "base/test/mock_entropy_provider.h" |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 } | 140 } |
141 | 141 |
142 TestDataReductionProxyConfig* config() { | 142 TestDataReductionProxyConfig* config() { |
143 return test_context_->config(); | 143 return test_context_->config(); |
144 } | 144 } |
145 | 145 |
146 scoped_ptr<DataReductionProxyNetworkDelegate> | 146 scoped_ptr<DataReductionProxyNetworkDelegate> |
147 data_reduction_proxy_network_delegate_; | 147 data_reduction_proxy_network_delegate_; |
148 | 148 |
149 private: | 149 private: |
| 150 base::MessageLoopForIO message_loop_; |
150 net::TestURLRequestContext context_; | 151 net::TestURLRequestContext context_; |
151 net::TestDelegate delegate_; | 152 net::TestDelegate delegate_; |
152 // |test_job_interceptor_| is owned by |test_job_factory_|. | 153 // |test_job_interceptor_| is owned by |test_job_factory_|. |
153 net::TestJobInterceptor* test_job_interceptor_; | 154 net::TestJobInterceptor* test_job_interceptor_; |
154 net::URLRequestJobFactoryImpl test_job_factory_; | 155 net::URLRequestJobFactoryImpl test_job_factory_; |
155 | 156 |
156 net::ProxyConfig config_; | 157 net::ProxyConfig config_; |
157 net::NetworkDelegate* network_delegate_; | 158 net::NetworkDelegate* network_delegate_; |
158 scoped_ptr<DataReductionProxyTestContext> test_context_; | 159 scoped_ptr<DataReductionProxyTestContext> test_context_; |
159 }; | 160 }; |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 &result); | 384 &result); |
384 EXPECT_TRUE(result.is_direct()); | 385 EXPECT_TRUE(result.is_direct()); |
385 | 386 |
386 OnResolveProxyHandler(url, load_flags, data_reduction_proxy_config, | 387 OnResolveProxyHandler(url, load_flags, data_reduction_proxy_config, |
387 empty_proxy_retry_info, config(), | 388 empty_proxy_retry_info, config(), |
388 &other_proxy_info); | 389 &other_proxy_info); |
389 EXPECT_FALSE(other_proxy_info.is_direct()); | 390 EXPECT_FALSE(other_proxy_info.is_direct()); |
390 } | 391 } |
391 | 392 |
392 } // namespace data_reduction_proxy | 393 } // namespace data_reduction_proxy |
OLD | NEW |