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/browser/data_reduction_proxy_settings_
test_utils.h" | 5 #include "components/data_reduction_proxy/browser/data_reduction_proxy_settings_
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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 } | 107 } |
108 last_update_time_ = base::Time::Now().LocalMidnight(); | 108 last_update_time_ = base::Time::Now().LocalMidnight(); |
109 pref_service_.SetInt64( | 109 pref_service_.SetInt64( |
110 prefs::kDailyHttpContentLengthLastUpdateDate, | 110 prefs::kDailyHttpContentLengthLastUpdateDate, |
111 last_update_time_.ToInternalValue()); | 111 last_update_time_.ToInternalValue()); |
112 expected_params_.reset(new TestDataReductionProxyParams( | 112 expected_params_.reset(new TestDataReductionProxyParams( |
113 DataReductionProxyParams::kAllowed | | 113 DataReductionProxyParams::kAllowed | |
114 DataReductionProxyParams::kFallbackAllowed | | 114 DataReductionProxyParams::kFallbackAllowed | |
115 DataReductionProxyParams::kPromoAllowed, | 115 DataReductionProxyParams::kPromoAllowed, |
116 TestDataReductionProxyParams::HAS_EVERYTHING & | 116 TestDataReductionProxyParams::HAS_EVERYTHING & |
117 ~TestDataReductionProxyParams::HAS_DEV_ORIGIN)); | 117 ~TestDataReductionProxyParams::HAS_DEV_ORIGIN & |
| 118 ~TestDataReductionProxyParams::HAS_DEV_FALLBACK_ORIGIN)); |
118 } | 119 } |
119 | 120 |
120 template <class C> | 121 template <class C> |
121 void DataReductionProxySettingsTestBase::ResetSettings(bool allowed, | 122 void DataReductionProxySettingsTestBase::ResetSettings(bool allowed, |
122 bool fallback_allowed, | 123 bool fallback_allowed, |
123 bool alt_allowed, | 124 bool alt_allowed, |
124 bool promo_allowed, | 125 bool promo_allowed, |
125 bool holdback) { | 126 bool holdback) { |
126 int flags = 0; | 127 int flags = 0; |
127 if (allowed) | 128 if (allowed) |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 base::Bind(&DataReductionProxySettingsTestBase:: | 310 base::Bind(&DataReductionProxySettingsTestBase:: |
310 RegisterSyntheticFieldTrialCallback, | 311 RegisterSyntheticFieldTrialCallback, |
311 base::Unretained(this))); | 312 base::Unretained(this))); |
312 | 313 |
313 base::MessageLoop::current()->RunUntilIdle(); | 314 base::MessageLoop::current()->RunUntilIdle(); |
314 CheckProxyConfigs(enabled_at_startup, false, false); | 315 CheckProxyConfigs(enabled_at_startup, false, false); |
315 EXPECT_EQ(enabled_at_startup, proxy_enabled_); | 316 EXPECT_EQ(enabled_at_startup, proxy_enabled_); |
316 } | 317 } |
317 | 318 |
318 } // namespace data_reduction_proxy | 319 } // namespace data_reduction_proxy |
OLD | NEW |