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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 prefs::kProxyBypassList), | 107 prefs::kProxyBypassList), |
108 TypeAndName(kPolicyApplicationLocale, | 108 TypeAndName(kPolicyApplicationLocale, |
109 prefs::kApplicationLocale), | 109 prefs::kApplicationLocale), |
110 TypeAndName(kPolicyApplicationLocale, | 110 TypeAndName(kPolicyApplicationLocale, |
111 prefs::kApplicationLocale), | 111 prefs::kApplicationLocale), |
112 TypeAndName(kPolicyAuthSchemes, | 112 TypeAndName(kPolicyAuthSchemes, |
113 prefs::kAuthSchemes), | 113 prefs::kAuthSchemes), |
114 TypeAndName(kPolicyAuthServerWhitelist, | 114 TypeAndName(kPolicyAuthServerWhitelist, |
115 prefs::kAuthServerWhitelist), | 115 prefs::kAuthServerWhitelist), |
116 TypeAndName(kPolicyAuthNegotiateDelegateWhitelist, | 116 TypeAndName(kPolicyAuthNegotiateDelegateWhitelist, |
117 prefs::kAuthNegotiateDelegateWhitelist))); | 117 prefs::kAuthNegotiateDelegateWhitelist), |
| 118 TypeAndName(kPolicyGSSAPILibraryName, |
| 119 prefs::kGSSAPILibraryName))); |
118 | 120 |
119 // Test cases for boolean-valued policy settings. | 121 // Test cases for boolean-valued policy settings. |
120 class ConfigurationPolicyPrefStoreBooleanTest | 122 class ConfigurationPolicyPrefStoreBooleanTest |
121 : public testing::TestWithParam<TypeAndName> { | 123 : public testing::TestWithParam<TypeAndName> { |
122 }; | 124 }; |
123 | 125 |
124 TEST_P(ConfigurationPolicyPrefStoreBooleanTest, GetDefault) { | 126 TEST_P(ConfigurationPolicyPrefStoreBooleanTest, GetDefault) { |
125 ConfigurationPolicyPrefStore store(NULL); | 127 ConfigurationPolicyPrefStore store(NULL); |
126 bool result = false; | 128 bool result = false; |
127 EXPECT_FALSE(store.prefs()->GetBoolean(GetParam().pref_name(), &result)); | 129 EXPECT_FALSE(store.prefs()->GetBoolean(GetParam().pref_name(), &result)); |
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
628 TEST_F(ConfigurationPolicyPrefStoreAutoFillTest, Disabled) { | 630 TEST_F(ConfigurationPolicyPrefStoreAutoFillTest, Disabled) { |
629 ConfigurationPolicyPrefStore store(NULL); | 631 ConfigurationPolicyPrefStore store(NULL); |
630 store.Apply(kPolicyAutoFillEnabled, Value::CreateBooleanValue(false)); | 632 store.Apply(kPolicyAutoFillEnabled, Value::CreateBooleanValue(false)); |
631 // Disabling AutoFill should switch the pref to managed. | 633 // Disabling AutoFill should switch the pref to managed. |
632 bool result = true; | 634 bool result = true; |
633 EXPECT_TRUE(store.prefs()->GetBoolean(prefs::kAutoFillEnabled, &result)); | 635 EXPECT_TRUE(store.prefs()->GetBoolean(prefs::kAutoFillEnabled, &result)); |
634 EXPECT_FALSE(result); | 636 EXPECT_FALSE(result); |
635 } | 637 } |
636 | 638 |
637 } // namespace policy | 639 } // namespace policy |
OLD | NEW |