Chromium Code Reviews| 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_sett ings_test_utils.h" | 5 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_sett ings_test_utils.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/prefs/pref_registry_simple.h" | 10 #include "base/prefs/pref_registry_simple.h" |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 262 base::MessageLoopForUI loop; | 262 base::MessageLoopForUI loop; |
| 263 scoped_ptr<DataReductionProxyConfigurator> configurator( | 263 scoped_ptr<DataReductionProxyConfigurator> configurator( |
| 264 new TestDataReductionProxyConfigurator( | 264 new TestDataReductionProxyConfigurator( |
| 265 scoped_refptr<base::TestSimpleTaskRunner>( | 265 scoped_refptr<base::TestSimpleTaskRunner>( |
| 266 new base::TestSimpleTaskRunner()), &net_log_, | 266 new base::TestSimpleTaskRunner()), &net_log_, |
| 267 event_store_.get())); | 267 event_store_.get())); |
| 268 settings_->SetProxyConfigurator(configurator.get()); | 268 settings_->SetProxyConfigurator(configurator.get()); |
| 269 scoped_refptr<net::TestURLRequestContextGetter> request_context = | 269 scoped_refptr<net::TestURLRequestContextGetter> request_context = |
| 270 new net::TestURLRequestContextGetter(base::MessageLoopProxy::current()); | 270 new net::TestURLRequestContextGetter(base::MessageLoopProxy::current()); |
| 271 | 271 |
| 272 settings_->InitDataReductionProxySettings( | 272 settings_->InitDataReductionProxySettings(&pref_service_, |
| 273 &pref_service_, | 273 request_context.get(), &net_log_, |
| 274 request_context.get(), | 274 event_store_.get(), true); |
|
bengr
2015/02/10 20:18:31
Do we also test with quic off?
tbansal1
2015/02/10 22:24:38
Added in data_reduction_proxy_settings_unittest.cc
| |
| 275 &net_log_, | |
| 276 event_store_.get()); | |
| 277 settings_->SetOnDataReductionEnabledCallback( | 275 settings_->SetOnDataReductionEnabledCallback( |
| 278 base::Bind(&DataReductionProxySettingsTestBase:: | 276 base::Bind(&DataReductionProxySettingsTestBase:: |
| 279 RegisterSyntheticFieldTrialCallback, | 277 RegisterSyntheticFieldTrialCallback, |
| 280 base::Unretained(this))); | 278 base::Unretained(this))); |
| 281 | 279 |
| 282 base::MessageLoop::current()->RunUntilIdle(); | 280 base::MessageLoop::current()->RunUntilIdle(); |
| 283 EXPECT_EQ(enabled_at_startup, proxy_enabled_); | 281 EXPECT_EQ(enabled_at_startup, proxy_enabled_); |
| 284 } | 282 } |
| 285 | 283 |
| 286 } // namespace data_reduction_proxy | 284 } // namespace data_reduction_proxy |
| OLD | NEW |