| 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/proxy_config_dictionary.h" | 9 #include "chrome/browser/prefs/proxy_config_dictionary.h" |
| 10 #include "chrome/common/pref_names.h" | 10 #include "chrome/common/pref_names.h" |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 prefs::kPluginsAllowOutdated), | 228 prefs::kPluginsAllowOutdated), |
| 229 TypeAndName(kPolicyAlwaysAuthorizePlugins, | 229 TypeAndName(kPolicyAlwaysAuthorizePlugins, |
| 230 prefs::kPluginsAlwaysAuthorize), | 230 prefs::kPluginsAlwaysAuthorize), |
| 231 TypeAndName(kPolicyBookmarkBarEnabled, | 231 TypeAndName(kPolicyBookmarkBarEnabled, |
| 232 prefs::kEnableBookmarkBar), | 232 prefs::kEnableBookmarkBar), |
| 233 TypeAndName(kPolicyEditBookmarksEnabled, | 233 TypeAndName(kPolicyEditBookmarksEnabled, |
| 234 prefs::kEditBookmarksEnabled), | 234 prefs::kEditBookmarksEnabled), |
| 235 TypeAndName(kPolicyAllowFileSelectionDialogs, | 235 TypeAndName(kPolicyAllowFileSelectionDialogs, |
| 236 prefs::kAllowFileSelectionDialogs), | 236 prefs::kAllowFileSelectionDialogs), |
| 237 TypeAndName(kPolicyAllowCrossOriginAuthPrompt, | 237 TypeAndName(kPolicyAllowCrossOriginAuthPrompt, |
| 238 prefs::kAllowCrossOriginAuthPrompt))); | 238 prefs::kAllowCrossOriginAuthPrompt), |
| 239 TypeAndName(kPolicyImportBookmarks, |
| 240 prefs::kImportBookmarks), |
| 241 TypeAndName(kPolicyImportHistory, |
| 242 prefs::kImportHistory), |
| 243 TypeAndName(kPolicyImportHomepage, |
| 244 prefs::kImportHomepage), |
| 245 TypeAndName(kPolicyImportSearchEngine, |
| 246 prefs::kImportSearchEngine), |
| 247 TypeAndName(kPolicyImportSavedPasswords, |
| 248 prefs::kImportSavedPasswords))); |
| 239 | 249 |
| 240 #if defined(OS_CHROMEOS) | 250 #if defined(OS_CHROMEOS) |
| 241 INSTANTIATE_TEST_CASE_P( | 251 INSTANTIATE_TEST_CASE_P( |
| 242 CrosConfigurationPolicyPrefStoreBooleanTestInstance, | 252 CrosConfigurationPolicyPrefStoreBooleanTestInstance, |
| 243 ConfigurationPolicyPrefStoreBooleanTest, | 253 ConfigurationPolicyPrefStoreBooleanTest, |
| 244 testing::Values( | 254 testing::Values( |
| 245 TypeAndName(kPolicyChromeOsLockOnIdleSuspend, | 255 TypeAndName(kPolicyChromeOsLockOnIdleSuspend, |
| 246 prefs::kEnableScreenLock))); | 256 prefs::kEnableScreenLock))); |
| 247 #endif // defined(OS_CHROMEOS) | 257 #endif // defined(OS_CHROMEOS) |
| 248 | 258 |
| (...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 863 | 873 |
| 864 provider_.SetInitializationComplete(true); | 874 provider_.SetInitializationComplete(true); |
| 865 EXPECT_FALSE(store_->IsInitializationComplete()); | 875 EXPECT_FALSE(store_->IsInitializationComplete()); |
| 866 | 876 |
| 867 store_->OnUpdatePolicy(); | 877 store_->OnUpdatePolicy(); |
| 868 Mock::VerifyAndClearExpectations(&observer_); | 878 Mock::VerifyAndClearExpectations(&observer_); |
| 869 EXPECT_TRUE(store_->IsInitializationComplete()); | 879 EXPECT_TRUE(store_->IsInitializationComplete()); |
| 870 } | 880 } |
| 871 | 881 |
| 872 } // namespace policy | 882 } // namespace policy |
| OLD | NEW |