OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <gtest/gtest.h> | 5 #include <gtest/gtest.h> |
6 | 6 |
7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
8 #include "chrome/browser/policy/configuration_policy_pref_store.h" | 8 #include "chrome/browser/policy/configuration_policy_pref_store.h" |
9 #include "chrome/browser/policy/mock_configuration_policy_provider.h" | 9 #include "chrome/browser/policy/mock_configuration_policy_provider.h" |
10 #include "chrome/common/pref_names.h" | 10 #include "chrome/common/pref_names.h" |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 prefs::kPrintingEnabled), | 178 prefs::kPrintingEnabled), |
179 TypeAndName(kPolicyJavascriptEnabled, | 179 TypeAndName(kPolicyJavascriptEnabled, |
180 prefs::kWebKitJavascriptEnabled), | 180 prefs::kWebKitJavascriptEnabled), |
181 TypeAndName(kPolicySavingBrowserHistoryDisabled, | 181 TypeAndName(kPolicySavingBrowserHistoryDisabled, |
182 prefs::kSavingBrowserHistoryDisabled), | 182 prefs::kSavingBrowserHistoryDisabled), |
183 TypeAndName(kPolicySavingBrowserHistoryDisabled, | 183 TypeAndName(kPolicySavingBrowserHistoryDisabled, |
184 prefs::kSavingBrowserHistoryDisabled), | 184 prefs::kSavingBrowserHistoryDisabled), |
185 TypeAndName(kPolicyDisableAuthNegotiateCnameLookup, | 185 TypeAndName(kPolicyDisableAuthNegotiateCnameLookup, |
186 prefs::kDisableAuthNegotiateCnameLookup), | 186 prefs::kDisableAuthNegotiateCnameLookup), |
187 TypeAndName(kPolicyEnableAuthNegotiatePort, | 187 TypeAndName(kPolicyEnableAuthNegotiatePort, |
188 prefs::kEnableAuthNegotiatePort))); | 188 prefs::kEnableAuthNegotiatePort), |
| 189 TypeAndName(kPolicyDisable3DAPIs, |
| 190 prefs::kDisable3DAPIs))); |
189 | 191 |
190 #if defined(OS_CHROMEOS) | 192 #if defined(OS_CHROMEOS) |
191 INSTANTIATE_TEST_CASE_P( | 193 INSTANTIATE_TEST_CASE_P( |
192 CrosConfigurationPolicyPrefStoreBooleanTestInstance, | 194 CrosConfigurationPolicyPrefStoreBooleanTestInstance, |
193 ConfigurationPolicyPrefStoreBooleanTest, | 195 ConfigurationPolicyPrefStoreBooleanTest, |
194 testing::Values( | 196 testing::Values( |
195 TypeAndName(kPolicyChromeOsLockOnIdleSuspend, | 197 TypeAndName(kPolicyChromeOsLockOnIdleSuspend, |
196 prefs::kEnableScreenLock))); | 198 prefs::kEnableScreenLock))); |
197 #endif // defined(OS_CHROMEOS) | 199 #endif // defined(OS_CHROMEOS) |
198 | 200 |
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
622 | 624 |
623 TEST_F(ConfigurationPolicyPrefStoreAutoFillTest, Disabled) { | 625 TEST_F(ConfigurationPolicyPrefStoreAutoFillTest, Disabled) { |
624 store_.Apply(kPolicyAutoFillEnabled, Value::CreateBooleanValue(false)); | 626 store_.Apply(kPolicyAutoFillEnabled, Value::CreateBooleanValue(false)); |
625 // Disabling AutoFill should switch the pref to managed. | 627 // Disabling AutoFill should switch the pref to managed. |
626 bool result = true; | 628 bool result = true; |
627 EXPECT_TRUE(store_.prefs()->GetBoolean(prefs::kAutoFillEnabled, &result)); | 629 EXPECT_TRUE(store_.prefs()->GetBoolean(prefs::kAutoFillEnabled, &result)); |
628 EXPECT_FALSE(result); | 630 EXPECT_FALSE(result); |
629 } | 631 } |
630 | 632 |
631 } // namespace policy | 633 } // namespace policy |
OLD | NEW |