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_bypa
ss_protocol.h" | 5 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_bypa
ss_protocol.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 if (expected_num_bad_proxies == 2u) { | 304 if (expected_num_bad_proxies == 2u) { |
305 ProxyRetryInfoMap::const_iterator i = | 305 ProxyRetryInfoMap::const_iterator i = |
306 retry_info.find(GetProxyKey(bad_proxy2)); | 306 retry_info.find(GetProxyKey(bad_proxy2)); |
307 ASSERT_TRUE(i != retry_info.end()); | 307 ASSERT_TRUE(i != retry_info.end()); |
308 EXPECT_TRUE(expected_min_duration <= (*i).second.current_delay); | 308 EXPECT_TRUE(expected_min_duration <= (*i).second.current_delay); |
309 EXPECT_TRUE((*i).second.current_delay <= expected_max_duration); | 309 EXPECT_TRUE((*i).second.current_delay <= expected_max_duration); |
310 } | 310 } |
311 } | 311 } |
312 | 312 |
313 protected: | 313 protected: |
| 314 base::MessageLoopForIO message_loop_; |
314 scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_; | 315 scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_; |
315 | 316 |
316 scoped_ptr<net::URLRequestInterceptor> simple_interceptor_; | 317 scoped_ptr<net::URLRequestInterceptor> simple_interceptor_; |
317 net::MockClientSocketFactory mock_socket_factory_; | 318 net::MockClientSocketFactory mock_socket_factory_; |
318 scoped_ptr<net::TestNetworkDelegate> network_delegate_; | 319 scoped_ptr<net::TestNetworkDelegate> network_delegate_; |
319 scoped_ptr<ProxyService> proxy_service_; | 320 scoped_ptr<ProxyService> proxy_service_; |
320 scoped_ptr<DataReductionProxyTestContext> test_context_; | 321 scoped_ptr<DataReductionProxyTestContext> test_context_; |
321 scoped_ptr<DataReductionProxyBypassStats> bypass_stats_; | 322 scoped_ptr<DataReductionProxyBypassStats> bypass_stats_; |
322 net::StaticHttpUserAgentSettings http_user_agent_settings_; | 323 net::StaticHttpUserAgentSettings http_user_agent_settings_; |
323 | 324 |
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
863 EXPECT_EQ(net::URLRequestStatus::SUCCESS, r->status().status()); | 864 EXPECT_EQ(net::URLRequestStatus::SUCCESS, r->status().status()); |
864 EXPECT_EQ(net::OK, r->status().error()); | 865 EXPECT_EQ(net::OK, r->status().error()); |
865 | 866 |
866 EXPECT_EQ("Bypass message", d.data_received()); | 867 EXPECT_EQ("Bypass message", d.data_received()); |
867 | 868 |
868 // We should have no entries in our bad proxy list. | 869 // We should have no entries in our bad proxy list. |
869 TestBadProxies(0, -1, "", ""); | 870 TestBadProxies(0, -1, "", ""); |
870 } | 871 } |
871 | 872 |
872 } // namespace data_reduction_proxy | 873 } // namespace data_reduction_proxy |
OLD | NEW |