Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1250)

Side by Side Diff: chrome/browser/policy/configuration_policy_pref_store_unittest.cc

Issue 13132004: Implement Enterprise Key API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/policy/configuration_policy_handler_list.cc ('k') | chrome/browser/prefs/browser_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698