OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "chrome/browser/policy/configuration_policy_handler.h" | 9 #include "chrome/browser/policy/configuration_policy_handler.h" |
10 #include "chrome/browser/policy/configuration_policy_pref_store.h" | 10 #include "chrome/browser/policy/configuration_policy_pref_store.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 ASSERT_TRUE(value); | 84 ASSERT_TRUE(value); |
85 EXPECT_TRUE(in_value->Equals(value)); | 85 EXPECT_TRUE(in_value->Equals(value)); |
86 } | 86 } |
87 | 87 |
88 INSTANTIATE_TEST_CASE_P( | 88 INSTANTIATE_TEST_CASE_P( |
89 ConfigurationPolicyPrefStoreListTestInstance, | 89 ConfigurationPolicyPrefStoreListTestInstance, |
90 ConfigurationPolicyPrefStoreListTest, | 90 ConfigurationPolicyPrefStoreListTest, |
91 testing::Values( | 91 testing::Values( |
92 PolicyAndPref(key::kRestoreOnStartupURLs, | 92 PolicyAndPref(key::kRestoreOnStartupURLs, |
93 prefs::kURLsToRestoreOnStartup), | 93 prefs::kURLsToRestoreOnStartup), |
94 PolicyAndPref(key::kExtensionInstallWhitelist, | |
95 prefs::kExtensionInstallAllowList), | |
96 PolicyAndPref(key::kExtensionInstallBlacklist, | |
97 prefs::kExtensionInstallDenyList), | |
98 PolicyAndPref(key::kDisabledPlugins, | 94 PolicyAndPref(key::kDisabledPlugins, |
99 prefs::kPluginsDisabledPlugins), | 95 prefs::kPluginsDisabledPlugins), |
100 PolicyAndPref(key::kDisabledPluginsExceptions, | 96 PolicyAndPref(key::kDisabledPluginsExceptions, |
101 prefs::kPluginsDisabledPluginsExceptions), | 97 prefs::kPluginsDisabledPluginsExceptions), |
102 PolicyAndPref(key::kEnabledPlugins, | 98 PolicyAndPref(key::kEnabledPlugins, |
103 prefs::kPluginsEnabledPlugins), | 99 prefs::kPluginsEnabledPlugins), |
104 PolicyAndPref(key::kDisabledSchemes, | 100 PolicyAndPref(key::kDisabledSchemes, |
105 prefs::kDisabledSchemes), | 101 prefs::kDisabledSchemes), |
106 PolicyAndPref(key::kAutoSelectCertificateForUrls, | 102 PolicyAndPref(key::kAutoSelectCertificateForUrls, |
107 prefs::kManagedAutoSelectCertificateForUrls), | 103 prefs::kManagedAutoSelectCertificateForUrls), |
(...skipping 929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1037 policy_.Set(key::kDefaultJavaScriptSetting, POLICY_LEVEL_MANDATORY, | 1033 policy_.Set(key::kDefaultJavaScriptSetting, POLICY_LEVEL_MANDATORY, |
1038 POLICY_SCOPE_USER, | 1034 POLICY_SCOPE_USER, |
1039 base::Value::CreateIntegerValue(CONTENT_SETTING_ALLOW)); | 1035 base::Value::CreateIntegerValue(CONTENT_SETTING_ALLOW)); |
1040 provider_.NotifyPolicyUpdated(); | 1036 provider_.NotifyPolicyUpdated(); |
1041 EXPECT_EQ(PrefStore::READ_OK, | 1037 EXPECT_EQ(PrefStore::READ_OK, |
1042 store_->GetValue(prefs::kManagedDefaultJavaScriptSetting, &value)); | 1038 store_->GetValue(prefs::kManagedDefaultJavaScriptSetting, &value)); |
1043 EXPECT_TRUE(base::FundamentalValue(CONTENT_SETTING_ALLOW).Equals(value)); | 1039 EXPECT_TRUE(base::FundamentalValue(CONTENT_SETTING_ALLOW).Equals(value)); |
1044 } | 1040 } |
1045 | 1041 |
1046 } // namespace policy | 1042 } // namespace policy |
OLD | NEW |