| 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/incognito_mode_prefs.h" | 9 #include "chrome/browser/prefs/incognito_mode_prefs.h" |
| 10 #include "chrome/browser/prefs/proxy_config_dictionary.h" | 10 #include "chrome/browser/prefs/proxy_config_dictionary.h" |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 | 283 |
| 284 INSTANTIATE_TEST_CASE_P( | 284 INSTANTIATE_TEST_CASE_P( |
| 285 ConfigurationPolicyPrefStoreIntegerTestInstance, | 285 ConfigurationPolicyPrefStoreIntegerTestInstance, |
| 286 ConfigurationPolicyPrefStoreIntegerTest, | 286 ConfigurationPolicyPrefStoreIntegerTest, |
| 287 testing::Values( | 287 testing::Values( |
| 288 TypeAndName(kPolicyRestoreOnStartup, | 288 TypeAndName(kPolicyRestoreOnStartup, |
| 289 prefs::kRestoreOnStartup), | 289 prefs::kRestoreOnStartup), |
| 290 TypeAndName(kPolicyPolicyRefreshRate, | 290 TypeAndName(kPolicyPolicyRefreshRate, |
| 291 prefs::kUserPolicyRefreshRate), | 291 prefs::kUserPolicyRefreshRate), |
| 292 TypeAndName(kPolicyMaxConnectionsPerProxy, | 292 TypeAndName(kPolicyMaxConnectionsPerProxy, |
| 293 prefs::kMaxConnectionsPerProxy), | 293 prefs::kMaxConnectionsPerProxy))); |
| 294 TypeAndName(kPolicyDefaultAutoSelectCertificateSetting, | |
| 295 prefs::kManagedDefaultAutoSelectCertificateSetting))); | |
| 296 | 294 |
| 297 // Test cases for the proxy policy settings. | 295 // Test cases for the proxy policy settings. |
| 298 class ConfigurationPolicyPrefStoreProxyTest : public testing::Test { | 296 class ConfigurationPolicyPrefStoreProxyTest : public testing::Test { |
| 299 protected: | 297 protected: |
| 300 // Verify that all the proxy prefs are set to the specified expected values. | 298 // Verify that all the proxy prefs are set to the specified expected values. |
| 301 static void VerifyProxyPrefs( | 299 static void VerifyProxyPrefs( |
| 302 const ConfigurationPolicyPrefStore& store, | 300 const ConfigurationPolicyPrefStore& store, |
| 303 const std::string& expected_proxy_server, | 301 const std::string& expected_proxy_server, |
| 304 const std::string& expected_proxy_pac_url, | 302 const std::string& expected_proxy_pac_url, |
| 305 const std::string& expected_proxy_bypass_list, | 303 const std::string& expected_proxy_bypass_list, |
| (...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 974 | 972 |
| 975 provider_.SetInitializationComplete(true); | 973 provider_.SetInitializationComplete(true); |
| 976 EXPECT_FALSE(store_->IsInitializationComplete()); | 974 EXPECT_FALSE(store_->IsInitializationComplete()); |
| 977 | 975 |
| 978 store_->OnUpdatePolicy(); | 976 store_->OnUpdatePolicy(); |
| 979 Mock::VerifyAndClearExpectations(&observer_); | 977 Mock::VerifyAndClearExpectations(&observer_); |
| 980 EXPECT_TRUE(store_->IsInitializationComplete()); | 978 EXPECT_TRUE(store_->IsInitializationComplete()); |
| 981 } | 979 } |
| 982 | 980 |
| 983 } // namespace policy | 981 } // namespace policy |
| OLD | NEW |