| 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/ref_counted.h" | 6 #include "base/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/notification_service.h" | 10 #include "chrome/common/notification_service.h" |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 EXPECT_TRUE(FundamentalValue(2).Equals(value)); | 222 EXPECT_TRUE(FundamentalValue(2).Equals(value)); |
| 223 } | 223 } |
| 224 | 224 |
| 225 INSTANTIATE_TEST_CASE_P( | 225 INSTANTIATE_TEST_CASE_P( |
| 226 ConfigurationPolicyPrefStoreIntegerTestInstance, | 226 ConfigurationPolicyPrefStoreIntegerTestInstance, |
| 227 ConfigurationPolicyPrefStoreIntegerTest, | 227 ConfigurationPolicyPrefStoreIntegerTest, |
| 228 testing::Values( | 228 testing::Values( |
| 229 TypeAndName(kPolicyRestoreOnStartup, | 229 TypeAndName(kPolicyRestoreOnStartup, |
| 230 prefs::kRestoreOnStartup), | 230 prefs::kRestoreOnStartup), |
| 231 TypeAndName(kPolicyPolicyRefreshRate, | 231 TypeAndName(kPolicyPolicyRefreshRate, |
| 232 prefs::kPolicyRefreshRate))); | 232 prefs::kPolicyUserPolicyRefreshRate))); |
| 233 | 233 |
| 234 // Test cases for the proxy policy settings. | 234 // Test cases for the proxy policy settings. |
| 235 class ConfigurationPolicyPrefStoreProxyTest : public testing::Test { | 235 class ConfigurationPolicyPrefStoreProxyTest : public testing::Test { |
| 236 protected: | 236 protected: |
| 237 // Verify that all the proxy prefs are set to the specified expected values. | 237 // Verify that all the proxy prefs are set to the specified expected values. |
| 238 static void VerifyProxyPrefs( | 238 static void VerifyProxyPrefs( |
| 239 const ConfigurationPolicyPrefStore& store, | 239 const ConfigurationPolicyPrefStore& store, |
| 240 const std::string& expected_proxy_server, | 240 const std::string& expected_proxy_server, |
| 241 const std::string& expected_proxy_pac_url, | 241 const std::string& expected_proxy_pac_url, |
| 242 const std::string& expected_proxy_bypass_list, | 242 const std::string& expected_proxy_bypass_list, |
| (...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 703 | 703 |
| 704 provider_.SetInitializationComplete(true); | 704 provider_.SetInitializationComplete(true); |
| 705 EXPECT_FALSE(store_->IsInitializationComplete()); | 705 EXPECT_FALSE(store_->IsInitializationComplete()); |
| 706 | 706 |
| 707 store_->OnUpdatePolicy(); | 707 store_->OnUpdatePolicy(); |
| 708 Mock::VerifyAndClearExpectations(&observer_); | 708 Mock::VerifyAndClearExpectations(&observer_); |
| 709 EXPECT_TRUE(store_->IsInitializationComplete()); | 709 EXPECT_TRUE(store_->IsInitializationComplete()); |
| 710 } | 710 } |
| 711 | 711 |
| 712 } // namespace policy | 712 } // namespace policy |
| OLD | NEW |