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

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

Issue 397793002: Eliminate CreateBooleanValue from test files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix bad merge Created 6 years, 5 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 | Annotate | Revision Log
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 #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/command_line.h" 7 #include "base/command_line.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/prefs/pref_registry_simple.h" 9 #include "base/prefs/pref_registry_simple.h"
10 #include "base/prefs/scoped_user_pref_update.h" 10 #include "base/prefs/scoped_user_pref_update.h"
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 bool managed) { 262 bool managed) {
263 // Always have a sucessful probe for pref change tests. 263 // Always have a sucessful probe for pref change tests.
264 SetProbeResult(kProbeURLWithOKResponse, 264 SetProbeResult(kProbeURLWithOKResponse,
265 kWarmupURLWithNoContentResponse, 265 kWarmupURLWithNoContentResponse,
266 "OK", 266 "OK",
267 FetchResult(enabled, true), 267 FetchResult(enabled, true),
268 true, 268 true,
269 expected_enabled ? 1 : 0); 269 expected_enabled ? 1 : 0);
270 if (managed) { 270 if (managed) {
271 pref_service_.SetManagedPref(prefs::kDataReductionProxyEnabled, 271 pref_service_.SetManagedPref(prefs::kDataReductionProxyEnabled,
272 base::Value::CreateBooleanValue(enabled)); 272 new base::FundamentalValue(enabled));
273 } else { 273 } else {
274 pref_service_.SetBoolean(prefs::kDataReductionProxyEnabled, enabled); 274 pref_service_.SetBoolean(prefs::kDataReductionProxyEnabled, enabled);
275 } 275 }
276 base::MessageLoop::current()->RunUntilIdle(); 276 base::MessageLoop::current()->RunUntilIdle();
277 // Never expect the proxy to be restricted for pref change tests. 277 // Never expect the proxy to be restricted for pref change tests.
278 CheckProxyConfigs(expected_enabled, false, false); 278 CheckProxyConfigs(expected_enabled, false, false);
279 } 279 }
280 280
281 void DataReductionProxySettingsTestBase::CheckInitDataReductionProxy( 281 void DataReductionProxySettingsTestBase::CheckInitDataReductionProxy(
282 bool enabled_at_startup) { 282 bool enabled_at_startup) {
(...skipping 11 matching lines...) Expand all
294 new net::TestURLRequestContextGetter(base::MessageLoopProxy::current()); 294 new net::TestURLRequestContextGetter(base::MessageLoopProxy::current());
295 settings_->InitDataReductionProxySettings(&pref_service_, 295 settings_->InitDataReductionProxySettings(&pref_service_,
296 &pref_service_, 296 &pref_service_,
297 request_context.get()); 297 request_context.get());
298 298
299 base::MessageLoop::current()->RunUntilIdle(); 299 base::MessageLoop::current()->RunUntilIdle();
300 CheckProxyConfigs(enabled_at_startup, false, false); 300 CheckProxyConfigs(enabled_at_startup, false, false);
301 } 301 }
302 302
303 } // namespace data_reduction_proxy 303 } // namespace data_reduction_proxy
OLDNEW
« no previous file with comments | « chromeos/dbus/shill_profile_client_unittest.cc ('k') | components/password_manager/core/browser/password_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698