Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(883)

Side by Side Diff: components/data_reduction_proxy/browser/data_reduction_proxy_settings_test_utils.h

Issue 421653005: Adding synthetic field trial for DataReductionProxyEnabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@newPltWithCL
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 160
161 TestingPrefServiceSimple pref_service_; 161 TestingPrefServiceSimple pref_service_;
162 scoped_ptr<DataReductionProxySettings> settings_; 162 scoped_ptr<DataReductionProxySettings> settings_;
163 scoped_ptr<TestDataReductionProxyParams> expected_params_; 163 scoped_ptr<TestDataReductionProxyParams> expected_params_;
164 base::Time last_update_time_; 164 base::Time last_update_time_;
165
166 bool proxy_enabled_;
167 void RegisterSyntheticFieldTrialCallback(bool proxy_enabled) {
Alexei Svitkine (slow) 2014/07/30 17:27:04 Functions should come before variables.
megjablon 2014/07/30 18:50:48 Done.
168 proxy_enabled_ = proxy_enabled;
169 }
165 }; 170 };
166 171
167 // Test implementations should be subclasses of an instantiation of this 172 // Test implementations should be subclasses of an instantiation of this
168 // class parameterized for whatever DataReductionProxySettings class 173 // class parameterized for whatever DataReductionProxySettings class
169 // is being tested. 174 // is being tested.
170 template <class C> 175 template <class C>
171 class ConcreteDataReductionProxySettingsTest 176 class ConcreteDataReductionProxySettingsTest
172 : public DataReductionProxySettingsTestBase { 177 : public DataReductionProxySettingsTestBase {
173 public: 178 public:
174 typedef MockDataReductionProxySettings<C> MockSettings; 179 typedef MockDataReductionProxySettings<C> MockSettings;
(...skipping 18 matching lines...) Expand all
193 response, 198 response,
194 result, 199 result,
195 success, 200 success,
196 expected_calls); 201 expected_calls);
197 } 202 }
198 }; 203 };
199 204
200 } // namespace data_reduction_proxy 205 } // namespace data_reduction_proxy
201 206
202 #endif // COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_SETTINGS _TEST_UTILS_H_ 207 #endif // COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_SETTINGS _TEST_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698