| 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 #ifndef COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_SETTINGS_TE
ST_UTILS_H_ | 5 #ifndef COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_SETTINGS_TE
ST_UTILS_H_ |
| 6 #define COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_SETTINGS_TE
ST_UTILS_H_ | 6 #define COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_SETTINGS_TE
ST_UTILS_H_ |
| 7 | 7 |
| 8 | 8 |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/prefs/testing_pref_service.h" | 10 #include "base/prefs/testing_pref_service.h" |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 bool expected_restricted, | 150 bool expected_restricted, |
| 151 bool expected_fallback_restricted); | 151 bool expected_fallback_restricted); |
| 152 void CheckProbeOnIPChange(const std::string& probe_url, | 152 void CheckProbeOnIPChange(const std::string& probe_url, |
| 153 const std::string& warmup_url, | 153 const std::string& warmup_url, |
| 154 const std::string& response, | 154 const std::string& response, |
| 155 bool request_success, | 155 bool request_success, |
| 156 bool expected_enabled, | 156 bool expected_enabled, |
| 157 bool expected_fallback_restricted); | 157 bool expected_fallback_restricted); |
| 158 void CheckOnPrefChange(bool enabled, bool expected_enabled, bool managed); | 158 void CheckOnPrefChange(bool enabled, bool expected_enabled, bool managed); |
| 159 void CheckInitDataReductionProxy(bool enabled_at_startup); | 159 void CheckInitDataReductionProxy(bool enabled_at_startup); |
| 160 void RegisterSyntheticFieldTrialCallback(bool proxy_enabled) { |
| 161 proxy_enabled_ = proxy_enabled; |
| 162 } |
| 160 | 163 |
| 161 TestingPrefServiceSimple pref_service_; | 164 TestingPrefServiceSimple pref_service_; |
| 162 scoped_ptr<DataReductionProxySettings> settings_; | 165 scoped_ptr<DataReductionProxySettings> settings_; |
| 163 scoped_ptr<TestDataReductionProxyParams> expected_params_; | 166 scoped_ptr<TestDataReductionProxyParams> expected_params_; |
| 164 base::Time last_update_time_; | 167 base::Time last_update_time_; |
| 168 bool proxy_enabled_; |
| 165 }; | 169 }; |
| 166 | 170 |
| 167 // Test implementations should be subclasses of an instantiation of this | 171 // Test implementations should be subclasses of an instantiation of this |
| 168 // class parameterized for whatever DataReductionProxySettings class | 172 // class parameterized for whatever DataReductionProxySettings class |
| 169 // is being tested. | 173 // is being tested. |
| 170 template <class C> | 174 template <class C> |
| 171 class ConcreteDataReductionProxySettingsTest | 175 class ConcreteDataReductionProxySettingsTest |
| 172 : public DataReductionProxySettingsTestBase { | 176 : public DataReductionProxySettingsTestBase { |
| 173 public: | 177 public: |
| 174 typedef MockDataReductionProxySettings<C> MockSettings; | 178 typedef MockDataReductionProxySettings<C> MockSettings; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 193 response, | 197 response, |
| 194 result, | 198 result, |
| 195 success, | 199 success, |
| 196 expected_calls); | 200 expected_calls); |
| 197 } | 201 } |
| 198 }; | 202 }; |
| 199 | 203 |
| 200 } // namespace data_reduction_proxy | 204 } // namespace data_reduction_proxy |
| 201 | 205 |
| 202 #endif // COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_SETTINGS
_TEST_UTILS_H_ | 206 #endif // COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_SETTINGS
_TEST_UTILS_H_ |
| OLD | NEW |