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