| 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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 prefs::kPrintingEnabled), | 170 prefs::kPrintingEnabled), |
| 171 TypeAndName(kPolicyJavascriptEnabled, | 171 TypeAndName(kPolicyJavascriptEnabled, |
| 172 prefs::kWebKitJavascriptEnabled), | 172 prefs::kWebKitJavascriptEnabled), |
| 173 TypeAndName(kPolicySavingBrowserHistoryDisabled, | 173 TypeAndName(kPolicySavingBrowserHistoryDisabled, |
| 174 prefs::kSavingBrowserHistoryDisabled), | 174 prefs::kSavingBrowserHistoryDisabled), |
| 175 TypeAndName(kPolicySavingBrowserHistoryDisabled, | 175 TypeAndName(kPolicySavingBrowserHistoryDisabled, |
| 176 prefs::kSavingBrowserHistoryDisabled), | 176 prefs::kSavingBrowserHistoryDisabled), |
| 177 TypeAndName(kPolicyDisableAuthNegotiateCnameLookup, | 177 TypeAndName(kPolicyDisableAuthNegotiateCnameLookup, |
| 178 prefs::kDisableAuthNegotiateCnameLookup), | 178 prefs::kDisableAuthNegotiateCnameLookup), |
| 179 TypeAndName(kPolicyEnableAuthNegotiatePort, | 179 TypeAndName(kPolicyEnableAuthNegotiatePort, |
| 180 prefs::kEnableAuthNegotiatePort))); | 180 prefs::kEnableAuthNegotiatePort), |
| 181 TypeAndName(kPolicyDisable3DAPIs, |
| 182 prefs::kDisable3DAPIs))); |
| 181 | 183 |
| 182 #if defined(OS_CHROMEOS) | 184 #if defined(OS_CHROMEOS) |
| 183 INSTANTIATE_TEST_CASE_P( | 185 INSTANTIATE_TEST_CASE_P( |
| 184 CrosConfigurationPolicyPrefStoreBooleanTestInstance, | 186 CrosConfigurationPolicyPrefStoreBooleanTestInstance, |
| 185 ConfigurationPolicyPrefStoreBooleanTest, | 187 ConfigurationPolicyPrefStoreBooleanTest, |
| 186 testing::Values( | 188 testing::Values( |
| 187 TypeAndName(kPolicyChromeOsLockOnIdleSuspend, | 189 TypeAndName(kPolicyChromeOsLockOnIdleSuspend, |
| 188 prefs::kEnableScreenLock))); | 190 prefs::kEnableScreenLock))); |
| 189 #endif // defined(OS_CHROMEOS) | 191 #endif // defined(OS_CHROMEOS) |
| 190 | 192 |
| (...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 630 TEST_F(ConfigurationPolicyPrefStoreAutoFillTest, Disabled) { | 632 TEST_F(ConfigurationPolicyPrefStoreAutoFillTest, Disabled) { |
| 631 ConfigurationPolicyPrefStore store(NULL); | 633 ConfigurationPolicyPrefStore store(NULL); |
| 632 store.Apply(kPolicyAutoFillEnabled, Value::CreateBooleanValue(false)); | 634 store.Apply(kPolicyAutoFillEnabled, Value::CreateBooleanValue(false)); |
| 633 // Disabling AutoFill should switch the pref to managed. | 635 // Disabling AutoFill should switch the pref to managed. |
| 634 bool result = true; | 636 bool result = true; |
| 635 EXPECT_TRUE(store.prefs()->GetBoolean(prefs::kAutoFillEnabled, &result)); | 637 EXPECT_TRUE(store.prefs()->GetBoolean(prefs::kAutoFillEnabled, &result)); |
| 636 EXPECT_FALSE(result); | 638 EXPECT_FALSE(result); |
| 637 } | 639 } |
| 638 | 640 |
| 639 } // namespace policy | 641 } // namespace policy |
| OLD | NEW |