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

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

Issue 11859029: Add a policy to hide the Web Store on new tabs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use 'invisible' CSS class name Created 7 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) 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/file_path.h" 7 #include "base/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 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 prefs::kImportHomepage), 277 prefs::kImportHomepage),
278 PolicyAndPref(key::kImportSearchEngine, 278 PolicyAndPref(key::kImportSearchEngine,
279 prefs::kImportSearchEngine), 279 prefs::kImportSearchEngine),
280 PolicyAndPref(key::kImportSavedPasswords, 280 PolicyAndPref(key::kImportSavedPasswords,
281 prefs::kImportSavedPasswords), 281 prefs::kImportSavedPasswords),
282 PolicyAndPref(key::kEnableMemoryInfo, 282 PolicyAndPref(key::kEnableMemoryInfo,
283 prefs::kEnableMemoryInfo), 283 prefs::kEnableMemoryInfo),
284 PolicyAndPref(key::kDisablePrintPreview, 284 PolicyAndPref(key::kDisablePrintPreview,
285 prefs::kPrintPreviewDisabled), 285 prefs::kPrintPreviewDisabled),
286 PolicyAndPref(key::kDeveloperToolsDisabled, 286 PolicyAndPref(key::kDeveloperToolsDisabled,
287 prefs::kDevToolsDisabled))); 287 prefs::kDevToolsDisabled),
288 PolicyAndPref(key::kHideWebStoreIcon,
289 prefs::kHideWebStoreIcon)));
288 290
289 #if defined(OS_CHROMEOS) 291 #if defined(OS_CHROMEOS)
290 INSTANTIATE_TEST_CASE_P( 292 INSTANTIATE_TEST_CASE_P(
291 CrosConfigurationPolicyPrefStoreBooleanTestInstance, 293 CrosConfigurationPolicyPrefStoreBooleanTestInstance,
292 ConfigurationPolicyPrefStoreBooleanTest, 294 ConfigurationPolicyPrefStoreBooleanTest,
293 testing::Values( 295 testing::Values(
294 PolicyAndPref(key::kChromeOsLockOnIdleSuspend, 296 PolicyAndPref(key::kChromeOsLockOnIdleSuspend,
295 prefs::kEnableScreenLock), 297 prefs::kEnableScreenLock),
296 PolicyAndPref(key::kDriveDisabled, 298 PolicyAndPref(key::kDriveDisabled,
297 prefs::kDisableDrive), 299 prefs::kDisableDrive),
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after
1069 policy.Set(key::kDefaultJavaScriptSetting, POLICY_LEVEL_MANDATORY, 1071 policy.Set(key::kDefaultJavaScriptSetting, POLICY_LEVEL_MANDATORY,
1070 POLICY_SCOPE_USER, 1072 POLICY_SCOPE_USER,
1071 base::Value::CreateIntegerValue(CONTENT_SETTING_ALLOW)); 1073 base::Value::CreateIntegerValue(CONTENT_SETTING_ALLOW));
1072 UpdateProviderPolicy(policy); 1074 UpdateProviderPolicy(policy);
1073 EXPECT_TRUE(store_->GetValue(prefs::kManagedDefaultJavaScriptSetting, 1075 EXPECT_TRUE(store_->GetValue(prefs::kManagedDefaultJavaScriptSetting,
1074 &value)); 1076 &value));
1075 EXPECT_TRUE(base::FundamentalValue(CONTENT_SETTING_ALLOW).Equals(value)); 1077 EXPECT_TRUE(base::FundamentalValue(CONTENT_SETTING_ALLOW).Equals(value));
1076 } 1078 }
1077 1079
1078 } // namespace policy 1080 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698