OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/policy/configuration_policy_pref_store.h" | 6 #include "chrome/browser/policy/configuration_policy_pref_store.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/prefs/proxy_prefs.h" | 8 #include "chrome/browser/prefs/proxy_prefs.h" |
9 #include "chrome/common/notification_service.h" | 9 #include "chrome/common/notification_service.h" |
10 #include "chrome/common/pref_names.h" | 10 #include "chrome/common/pref_names.h" |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 EXPECT_EQ(PrefStore::READ_OK, | 213 EXPECT_EQ(PrefStore::READ_OK, |
214 store_.GetValue(GetParam().pref_name(), &value)); | 214 store_.GetValue(GetParam().pref_name(), &value)); |
215 EXPECT_TRUE(FundamentalValue(2).Equals(value)); | 215 EXPECT_TRUE(FundamentalValue(2).Equals(value)); |
216 } | 216 } |
217 | 217 |
218 INSTANTIATE_TEST_CASE_P( | 218 INSTANTIATE_TEST_CASE_P( |
219 ConfigurationPolicyPrefStoreIntegerTestInstance, | 219 ConfigurationPolicyPrefStoreIntegerTestInstance, |
220 ConfigurationPolicyPrefStoreIntegerTest, | 220 ConfigurationPolicyPrefStoreIntegerTest, |
221 testing::Values( | 221 testing::Values( |
222 TypeAndName(kPolicyRestoreOnStartup, | 222 TypeAndName(kPolicyRestoreOnStartup, |
223 prefs::kRestoreOnStartup))); | 223 prefs::kRestoreOnStartup), |
| 224 TypeAndName(kPolicyPolicyRefreshRate, |
| 225 prefs::kPolicyRefreshRate))); |
224 | 226 |
225 // Test cases for the proxy policy settings. | 227 // Test cases for the proxy policy settings. |
226 class ConfigurationPolicyPrefStoreProxyTest : public testing::Test { | 228 class ConfigurationPolicyPrefStoreProxyTest : public testing::Test { |
227 protected: | 229 protected: |
228 // Verify that all the proxy prefs are set to the specified expected values. | 230 // Verify that all the proxy prefs are set to the specified expected values. |
229 static void VerifyProxyPrefs( | 231 static void VerifyProxyPrefs( |
230 const ConfigurationPolicyPrefStore& store, | 232 const ConfigurationPolicyPrefStore& store, |
231 const std::string& expected_proxy_server, | 233 const std::string& expected_proxy_server, |
232 const std::string& expected_proxy_pac_url, | 234 const std::string& expected_proxy_pac_url, |
233 const std::string& expected_proxy_bypass_list, | 235 const std::string& expected_proxy_bypass_list, |
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
680 | 682 |
681 provider_.SetInitializationComplete(true); | 683 provider_.SetInitializationComplete(true); |
682 EXPECT_FALSE(store_.IsInitializationComplete()); | 684 EXPECT_FALSE(store_.IsInitializationComplete()); |
683 | 685 |
684 store_.OnUpdatePolicy(); | 686 store_.OnUpdatePolicy(); |
685 Mock::VerifyAndClearExpectations(&observer_); | 687 Mock::VerifyAndClearExpectations(&observer_); |
686 EXPECT_TRUE(store_.IsInitializationComplete()); | 688 EXPECT_TRUE(store_.IsInitializationComplete()); |
687 } | 689 } |
688 | 690 |
689 } // namespace policy | 691 } // namespace policy |
OLD | NEW |