OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/file_path.h" | 5 #include "base/file_path.h" |
6 #include "base/memory/ref_counted.h" | 6 #include "base/memory/ref_counted.h" |
7 #include "chrome/browser/policy/configuration_policy_pref_store.h" | 7 #include "chrome/browser/policy/configuration_policy_pref_store.h" |
8 #include "chrome/browser/policy/mock_configuration_policy_provider.h" | 8 #include "chrome/browser/policy/mock_configuration_policy_provider.h" |
9 #include "chrome/browser/prefs/incognito_mode_prefs.h" | 9 #include "chrome/browser/prefs/incognito_mode_prefs.h" |
10 #include "chrome/browser/prefs/proxy_config_dictionary.h" | 10 #include "chrome/browser/prefs/proxy_config_dictionary.h" |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 prefs::kPluginsAllowOutdated), | 231 prefs::kPluginsAllowOutdated), |
232 TypeAndName(kPolicyAlwaysAuthorizePlugins, | 232 TypeAndName(kPolicyAlwaysAuthorizePlugins, |
233 prefs::kPluginsAlwaysAuthorize), | 233 prefs::kPluginsAlwaysAuthorize), |
234 TypeAndName(kPolicyBookmarkBarEnabled, | 234 TypeAndName(kPolicyBookmarkBarEnabled, |
235 prefs::kEnableBookmarkBar), | 235 prefs::kEnableBookmarkBar), |
236 TypeAndName(kPolicyEditBookmarksEnabled, | 236 TypeAndName(kPolicyEditBookmarksEnabled, |
237 prefs::kEditBookmarksEnabled), | 237 prefs::kEditBookmarksEnabled), |
238 TypeAndName(kPolicyAllowFileSelectionDialogs, | 238 TypeAndName(kPolicyAllowFileSelectionDialogs, |
239 prefs::kAllowFileSelectionDialogs), | 239 prefs::kAllowFileSelectionDialogs), |
240 TypeAndName(kPolicyAllowCrossOriginAuthPrompt, | 240 TypeAndName(kPolicyAllowCrossOriginAuthPrompt, |
241 prefs::kAllowCrossOriginAuthPrompt))); | 241 prefs::kAllowCrossOriginAuthPrompt), |
| 242 TypeAndName(kPolicyImportBookmarks, |
| 243 prefs::kImportBookmarks), |
| 244 TypeAndName(kPolicyImportHistory, |
| 245 prefs::kImportHistory), |
| 246 TypeAndName(kPolicyImportHomepage, |
| 247 prefs::kImportHomepage), |
| 248 TypeAndName(kPolicyImportSearchEngine, |
| 249 prefs::kImportSearchEngine), |
| 250 TypeAndName(kPolicyImportSavedPasswords, |
| 251 prefs::kImportSavedPasswords))); |
242 | 252 |
243 #if defined(OS_CHROMEOS) | 253 #if defined(OS_CHROMEOS) |
244 INSTANTIATE_TEST_CASE_P( | 254 INSTANTIATE_TEST_CASE_P( |
245 CrosConfigurationPolicyPrefStoreBooleanTestInstance, | 255 CrosConfigurationPolicyPrefStoreBooleanTestInstance, |
246 ConfigurationPolicyPrefStoreBooleanTest, | 256 ConfigurationPolicyPrefStoreBooleanTest, |
247 testing::Values( | 257 testing::Values( |
248 TypeAndName(kPolicyChromeOsLockOnIdleSuspend, | 258 TypeAndName(kPolicyChromeOsLockOnIdleSuspend, |
249 prefs::kEnableScreenLock))); | 259 prefs::kEnableScreenLock))); |
250 #endif // defined(OS_CHROMEOS) | 260 #endif // defined(OS_CHROMEOS) |
251 | 261 |
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
960 | 970 |
961 provider_.SetInitializationComplete(true); | 971 provider_.SetInitializationComplete(true); |
962 EXPECT_FALSE(store_->IsInitializationComplete()); | 972 EXPECT_FALSE(store_->IsInitializationComplete()); |
963 | 973 |
964 store_->OnUpdatePolicy(); | 974 store_->OnUpdatePolicy(); |
965 Mock::VerifyAndClearExpectations(&observer_); | 975 Mock::VerifyAndClearExpectations(&observer_); |
966 EXPECT_TRUE(store_->IsInitializationComplete()); | 976 EXPECT_TRUE(store_->IsInitializationComplete()); |
967 } | 977 } |
968 | 978 |
969 } // namespace policy | 979 } // namespace policy |
OLD | NEW |