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/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/prefs/pref_store_observer_mock.h" | 10 #include "base/prefs/pref_store_observer_mock.h" |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 prefs::kDisableDrive), | 301 prefs::kDisableDrive), |
302 PolicyAndPref(key::kDriveDisabledOverCellular, | 302 PolicyAndPref(key::kDriveDisabledOverCellular, |
303 prefs::kDisableDriveOverCellular), | 303 prefs::kDisableDriveOverCellular), |
304 PolicyAndPref(key::kExternalStorageDisabled, | 304 PolicyAndPref(key::kExternalStorageDisabled, |
305 prefs::kExternalStorageDisabled), | 305 prefs::kExternalStorageDisabled), |
306 PolicyAndPref(key::kShowAccessibilityOptionsInSystemTrayMenu, | 306 PolicyAndPref(key::kShowAccessibilityOptionsInSystemTrayMenu, |
307 prefs::kShouldAlwaysShowAccessibilityMenu), | 307 prefs::kShouldAlwaysShowAccessibilityMenu), |
308 PolicyAndPref(key::kAudioOutputAllowed, | 308 PolicyAndPref(key::kAudioOutputAllowed, |
309 prefs::kAudioOutputAllowed), | 309 prefs::kAudioOutputAllowed), |
310 PolicyAndPref(key::kAudioCaptureAllowed, | 310 PolicyAndPref(key::kAudioCaptureAllowed, |
311 prefs::kAudioCaptureAllowed))); | 311 prefs::kAudioCaptureAllowed), |
| 312 PolicyAndPref(key::kAttestationEnabledForUser, |
| 313 prefs::kAttestationEnabled))); |
312 #endif // defined(OS_CHROMEOS) | 314 #endif // defined(OS_CHROMEOS) |
313 | 315 |
314 // Test cases for integer-valued policy settings. | 316 // Test cases for integer-valued policy settings. |
315 class ConfigurationPolicyPrefStoreIntegerTest | 317 class ConfigurationPolicyPrefStoreIntegerTest |
316 : public ConfigurationPolicyPrefStoreTest, | 318 : public ConfigurationPolicyPrefStoreTest, |
317 public testing::WithParamInterface<PolicyAndPref> {}; | 319 public testing::WithParamInterface<PolicyAndPref> {}; |
318 | 320 |
319 TEST_P(ConfigurationPolicyPrefStoreIntegerTest, GetDefault) { | 321 TEST_P(ConfigurationPolicyPrefStoreIntegerTest, GetDefault) { |
320 EXPECT_FALSE(store_->GetValue(GetParam().pref_name(), NULL)); | 322 EXPECT_FALSE(store_->GetValue(GetParam().pref_name(), NULL)); |
321 } | 323 } |
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1100 policy.Set(key::kDefaultJavaScriptSetting, POLICY_LEVEL_MANDATORY, | 1102 policy.Set(key::kDefaultJavaScriptSetting, POLICY_LEVEL_MANDATORY, |
1101 POLICY_SCOPE_USER, | 1103 POLICY_SCOPE_USER, |
1102 base::Value::CreateIntegerValue(CONTENT_SETTING_ALLOW)); | 1104 base::Value::CreateIntegerValue(CONTENT_SETTING_ALLOW)); |
1103 UpdateProviderPolicy(policy); | 1105 UpdateProviderPolicy(policy); |
1104 EXPECT_TRUE(store_->GetValue(prefs::kManagedDefaultJavaScriptSetting, | 1106 EXPECT_TRUE(store_->GetValue(prefs::kManagedDefaultJavaScriptSetting, |
1105 &value)); | 1107 &value)); |
1106 EXPECT_TRUE(base::FundamentalValue(CONTENT_SETTING_ALLOW).Equals(value)); | 1108 EXPECT_TRUE(base::FundamentalValue(CONTENT_SETTING_ALLOW).Equals(value)); |
1107 } | 1109 } |
1108 | 1110 |
1109 } // namespace policy | 1111 } // namespace policy |
OLD | NEW |