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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 EXPECT_TRUE(FundamentalValue(2).Equals(value)); | 266 EXPECT_TRUE(FundamentalValue(2).Equals(value)); |
267 } | 267 } |
268 | 268 |
269 INSTANTIATE_TEST_CASE_P( | 269 INSTANTIATE_TEST_CASE_P( |
270 ConfigurationPolicyPrefStoreIntegerTestInstance, | 270 ConfigurationPolicyPrefStoreIntegerTestInstance, |
271 ConfigurationPolicyPrefStoreIntegerTest, | 271 ConfigurationPolicyPrefStoreIntegerTest, |
272 testing::Values( | 272 testing::Values( |
273 TypeAndName(kPolicyRestoreOnStartup, | 273 TypeAndName(kPolicyRestoreOnStartup, |
274 prefs::kRestoreOnStartup), | 274 prefs::kRestoreOnStartup), |
275 TypeAndName(kPolicyPolicyRefreshRate, | 275 TypeAndName(kPolicyPolicyRefreshRate, |
276 prefs::kPolicyRefreshRate))); | 276 prefs::kUserPolicyRefreshRate))); |
277 | 277 |
278 // Test cases for the proxy policy settings. | 278 // Test cases for the proxy policy settings. |
279 class ConfigurationPolicyPrefStoreProxyTest : public testing::Test { | 279 class ConfigurationPolicyPrefStoreProxyTest : public testing::Test { |
280 protected: | 280 protected: |
281 // Verify that all the proxy prefs are set to the specified expected values. | 281 // Verify that all the proxy prefs are set to the specified expected values. |
282 static void VerifyProxyPrefs( | 282 static void VerifyProxyPrefs( |
283 const ConfigurationPolicyPrefStore& store, | 283 const ConfigurationPolicyPrefStore& store, |
284 const std::string& expected_proxy_server, | 284 const std::string& expected_proxy_server, |
285 const std::string& expected_proxy_pac_url, | 285 const std::string& expected_proxy_pac_url, |
286 const std::string& expected_proxy_bypass_list, | 286 const std::string& expected_proxy_bypass_list, |
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
863 | 863 |
864 provider_.SetInitializationComplete(true); | 864 provider_.SetInitializationComplete(true); |
865 EXPECT_FALSE(store_->IsInitializationComplete()); | 865 EXPECT_FALSE(store_->IsInitializationComplete()); |
866 | 866 |
867 store_->OnUpdatePolicy(); | 867 store_->OnUpdatePolicy(); |
868 Mock::VerifyAndClearExpectations(&observer_); | 868 Mock::VerifyAndClearExpectations(&observer_); |
869 EXPECT_TRUE(store_->IsInitializationComplete()); | 869 EXPECT_TRUE(store_->IsInitializationComplete()); |
870 } | 870 } |
871 | 871 |
872 } // namespace policy | 872 } // namespace policy |
OLD | NEW |