| 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 prefs::kApplicationLocale), | 121 prefs::kApplicationLocale), |
| 122 TypeAndName(kPolicyAuthSchemes, | 122 TypeAndName(kPolicyAuthSchemes, |
| 123 prefs::kAuthSchemes), | 123 prefs::kAuthSchemes), |
| 124 TypeAndName(kPolicyAuthServerWhitelist, | 124 TypeAndName(kPolicyAuthServerWhitelist, |
| 125 prefs::kAuthServerWhitelist), | 125 prefs::kAuthServerWhitelist), |
| 126 TypeAndName(kPolicyAuthNegotiateDelegateWhitelist, | 126 TypeAndName(kPolicyAuthNegotiateDelegateWhitelist, |
| 127 prefs::kAuthNegotiateDelegateWhitelist), | 127 prefs::kAuthNegotiateDelegateWhitelist), |
| 128 TypeAndName(kPolicyDownloadDirectory, | 128 TypeAndName(kPolicyDownloadDirectory, |
| 129 prefs::kDownloadDefaultDirectory), | 129 prefs::kDownloadDefaultDirectory), |
| 130 TypeAndName(kPolicyGSSAPILibraryName, | 130 TypeAndName(kPolicyGSSAPILibraryName, |
| 131 prefs::kGSSAPILibraryName))); | 131 prefs::kGSSAPILibraryName), |
| 132 TypeAndName(kPolicyDiskCacheDir, |
| 133 prefs::kDiskCacheDir))); |
| 132 | 134 |
| 133 // Test cases for boolean-valued policy settings. | 135 // Test cases for boolean-valued policy settings. |
| 134 class ConfigurationPolicyPrefStoreBooleanTest | 136 class ConfigurationPolicyPrefStoreBooleanTest |
| 135 : public ConfigurationPolicyPrefStoreTestBase< | 137 : public ConfigurationPolicyPrefStoreTestBase< |
| 136 testing::TestWithParam<TypeAndName> > { | 138 testing::TestWithParam<TypeAndName> > { |
| 137 }; | 139 }; |
| 138 | 140 |
| 139 TEST_P(ConfigurationPolicyPrefStoreBooleanTest, GetDefault) { | 141 TEST_P(ConfigurationPolicyPrefStoreBooleanTest, GetDefault) { |
| 140 EXPECT_EQ(PrefStore::READ_NO_VALUE, | 142 EXPECT_EQ(PrefStore::READ_NO_VALUE, |
| 141 store_->GetValue(GetParam().pref_name(), NULL)); | 143 store_->GetValue(GetParam().pref_name(), NULL)); |
| (...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 823 | 825 |
| 824 provider_.SetInitializationComplete(true); | 826 provider_.SetInitializationComplete(true); |
| 825 EXPECT_FALSE(store_->IsInitializationComplete()); | 827 EXPECT_FALSE(store_->IsInitializationComplete()); |
| 826 | 828 |
| 827 store_->OnUpdatePolicy(); | 829 store_->OnUpdatePolicy(); |
| 828 Mock::VerifyAndClearExpectations(&observer_); | 830 Mock::VerifyAndClearExpectations(&observer_); |
| 829 EXPECT_TRUE(store_->IsInitializationComplete()); | 831 EXPECT_TRUE(store_->IsInitializationComplete()); |
| 830 } | 832 } |
| 831 | 833 |
| 832 } // namespace policy | 834 } // namespace policy |
| OLD | NEW |