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

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

Issue 6179002: Added group policy for disabling all client-side 3D APIs in Chromium ... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/597/src/
Patch Set: '' Created 9 years, 11 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 | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/policy/configuration_policy_pref_store.cc ('k') | chrome/browser/policy/configuration_policy_store_interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698