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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 TypeAndName(kPolicyDefaultPluginsSetting, | 296 TypeAndName(kPolicyDefaultPluginsSetting, |
297 prefs::kManagedDefaultPluginsSetting), | 297 prefs::kManagedDefaultPluginsSetting), |
298 TypeAndName(kPolicyDefaultPopupsSetting, | 298 TypeAndName(kPolicyDefaultPopupsSetting, |
299 prefs::kManagedDefaultPopupsSetting), | 299 prefs::kManagedDefaultPopupsSetting), |
300 TypeAndName(kPolicyDefaultNotificationsSetting, | 300 TypeAndName(kPolicyDefaultNotificationsSetting, |
301 prefs::kManagedDefaultNotificationsSetting), | 301 prefs::kManagedDefaultNotificationsSetting), |
302 TypeAndName(kPolicyDefaultGeolocationSetting, | 302 TypeAndName(kPolicyDefaultGeolocationSetting, |
303 prefs::kManagedDefaultGeolocationSetting), | 303 prefs::kManagedDefaultGeolocationSetting), |
304 TypeAndName(kPolicyRestoreOnStartup, | 304 TypeAndName(kPolicyRestoreOnStartup, |
305 prefs::kRestoreOnStartup), | 305 prefs::kRestoreOnStartup), |
| 306 TypeAndName(kPolicyDiskCacheSize, |
| 307 prefs::kDiskCacheSize), |
| 308 TypeAndName(kPolicyMediaCacheSize, |
| 309 prefs::kMediaCacheSize), |
306 TypeAndName(kPolicyPolicyRefreshRate, | 310 TypeAndName(kPolicyPolicyRefreshRate, |
307 prefs::kUserPolicyRefreshRate), | 311 prefs::kUserPolicyRefreshRate), |
308 TypeAndName(kPolicyMaxConnectionsPerProxy, | 312 TypeAndName(kPolicyMaxConnectionsPerProxy, |
309 prefs::kMaxConnectionsPerProxy))); | 313 prefs::kMaxConnectionsPerProxy))); |
310 | 314 |
311 // Test cases for the proxy policy settings. | 315 // Test cases for the proxy policy settings. |
312 class ConfigurationPolicyPrefStoreProxyTest : public testing::Test { | 316 class ConfigurationPolicyPrefStoreProxyTest : public testing::Test { |
313 protected: | 317 protected: |
314 // Verify that all the proxy prefs are set to the specified expected values. | 318 // Verify that all the proxy prefs are set to the specified expected values. |
315 static void VerifyProxyPrefs( | 319 static void VerifyProxyPrefs( |
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1030 // DefaultJavaScriptSetting overrides JavascriptEnabled. | 1034 // DefaultJavaScriptSetting overrides JavascriptEnabled. |
1031 provider_.AddPolicy(kPolicyDefaultJavaScriptSetting, | 1035 provider_.AddPolicy(kPolicyDefaultJavaScriptSetting, |
1032 Value::CreateIntegerValue(CONTENT_SETTING_ALLOW)); | 1036 Value::CreateIntegerValue(CONTENT_SETTING_ALLOW)); |
1033 store_->OnUpdatePolicy(); | 1037 store_->OnUpdatePolicy(); |
1034 EXPECT_EQ(PrefStore::READ_OK, | 1038 EXPECT_EQ(PrefStore::READ_OK, |
1035 store_->GetValue(prefs::kManagedDefaultJavaScriptSetting, &value)); | 1039 store_->GetValue(prefs::kManagedDefaultJavaScriptSetting, &value)); |
1036 EXPECT_TRUE(base::FundamentalValue(CONTENT_SETTING_ALLOW).Equals(value)); | 1040 EXPECT_TRUE(base::FundamentalValue(CONTENT_SETTING_ALLOW).Equals(value)); |
1037 } | 1041 } |
1038 | 1042 |
1039 } // namespace policy | 1043 } // namespace policy |
OLD | NEW |