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

Side by Side Diff: chrome/browser/prefs/proxy_policy_unittest.cc

Issue 12340111: Introduce //components/user_prefs, use to eliminate c/b/prefs dependency in Autofill. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Pure merge of LKGR Created 7 years, 9 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/memory/ref_counted.h" 6 #include "base/memory/ref_counted.h"
7 #include "chrome/browser/policy/mock_configuration_policy_provider.h" 7 #include "chrome/browser/policy/mock_configuration_policy_provider.h"
8 #include "chrome/browser/policy/policy_map.h" 8 #include "chrome/browser/policy/policy_map.h"
9 #include "chrome/browser/policy/policy_service_impl.h" 9 #include "chrome/browser/policy/policy_service_impl.h"
10 #include "chrome/browser/prefs/browser_prefs.h" 10 #include "chrome/browser/prefs/browser_prefs.h"
11 #include "chrome/browser/prefs/pref_registry_syncable.h"
12 #include "chrome/browser/prefs/pref_service_mock_builder.h" 11 #include "chrome/browser/prefs/pref_service_mock_builder.h"
13 #include "chrome/browser/prefs/pref_service_syncable.h" 12 #include "chrome/browser/prefs/pref_service_syncable.h"
14 #include "chrome/browser/prefs/proxy_config_dictionary.h" 13 #include "chrome/browser/prefs/proxy_config_dictionary.h"
15 #include "chrome/browser/prefs/proxy_prefs.h" 14 #include "chrome/browser/prefs/proxy_prefs.h"
16 #include "chrome/common/chrome_switches.h" 15 #include "chrome/common/chrome_switches.h"
17 #include "chrome/common/pref_names.h" 16 #include "chrome/common/pref_names.h"
17 #include "components/user_prefs/pref_registry_syncable.h"
18 #include "policy/policy_constants.h" 18 #include "policy/policy_constants.h"
19 #include "testing/gtest/include/gtest/gtest.h" 19 #include "testing/gtest/include/gtest/gtest.h"
20 20
21 using ::testing::Return; 21 using ::testing::Return;
22 using ::testing::_; 22 using ::testing::_;
23 23
24 namespace policy { 24 namespace policy {
25 25
26 namespace { 26 namespace {
27 27
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 212
213 // Try a second time time with the managed PrefStore in place, the 213 // Try a second time time with the managed PrefStore in place, the
214 // auto-detect should be overridden. The default pref store must be 214 // auto-detect should be overridden. The default pref store must be
215 // in place with the appropriate default value for this to work. 215 // in place with the appropriate default value for this to work.
216 prefs.reset(CreatePrefService(true)); 216 prefs.reset(CreatePrefService(true));
217 ProxyConfigDictionary dict2(prefs->GetDictionary(prefs::kProxy)); 217 ProxyConfigDictionary dict2(prefs->GetDictionary(prefs::kProxy));
218 assertProxyModeWithoutParams(dict2, ProxyPrefs::MODE_DIRECT); 218 assertProxyModeWithoutParams(dict2, ProxyPrefs::MODE_DIRECT);
219 } 219 }
220 220
221 } // namespace policy 221 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698