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 706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
848 | 850 |
849 provider_.SetInitializationComplete(true); | 851 provider_.SetInitializationComplete(true); |
850 EXPECT_FALSE(store_->IsInitializationComplete()); | 852 EXPECT_FALSE(store_->IsInitializationComplete()); |
851 | 853 |
852 store_->OnUpdatePolicy(); | 854 store_->OnUpdatePolicy(); |
853 Mock::VerifyAndClearExpectations(&observer_); | 855 Mock::VerifyAndClearExpectations(&observer_); |
854 EXPECT_TRUE(store_->IsInitializationComplete()); | 856 EXPECT_TRUE(store_->IsInitializationComplete()); |
855 } | 857 } |
856 | 858 |
857 } // namespace policy | 859 } // namespace policy |
OLD | NEW |