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

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

Issue 8572006: Add policies to control the disk cache size. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: This time two more for realz. Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/file_path.h" 5 #include "base/file_path.h"
6 #include "base/memory/ref_counted.h" 6 #include "base/memory/ref_counted.h"
7 #include "chrome/browser/policy/configuration_policy_pref_store.h" 7 #include "chrome/browser/policy/configuration_policy_pref_store.h"
8 #include "chrome/browser/policy/mock_configuration_policy_provider.h" 8 #include "chrome/browser/policy/mock_configuration_policy_provider.h"
9 #include "chrome/browser/prefs/incognito_mode_prefs.h" 9 #include "chrome/browser/prefs/incognito_mode_prefs.h"
10 #include "chrome/browser/prefs/proxy_config_dictionary.h" 10 #include "chrome/browser/prefs/proxy_config_dictionary.h"
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 TypeAndName(kPolicyDefaultPluginsSetting, 296 TypeAndName(kPolicyDefaultPluginsSetting,
297 prefs::kManagedDefaultPluginsSetting), 297 prefs::kManagedDefaultPluginsSetting),
298 TypeAndName(kPolicyDefaultPopupsSetting, 298 TypeAndName(kPolicyDefaultPopupsSetting,
299 prefs::kManagedDefaultPopupsSetting), 299 prefs::kManagedDefaultPopupsSetting),
300 TypeAndName(kPolicyDefaultNotificationsSetting, 300 TypeAndName(kPolicyDefaultNotificationsSetting,
301 prefs::kManagedDefaultNotificationsSetting), 301 prefs::kManagedDefaultNotificationsSetting),
302 TypeAndName(kPolicyDefaultGeolocationSetting, 302 TypeAndName(kPolicyDefaultGeolocationSetting,
303 prefs::kManagedDefaultGeolocationSetting), 303 prefs::kManagedDefaultGeolocationSetting),
304 TypeAndName(kPolicyRestoreOnStartup, 304 TypeAndName(kPolicyRestoreOnStartup,
305 prefs::kRestoreOnStartup), 305 prefs::kRestoreOnStartup),
306 TypeAndName(kPolicyDiskCacheSize,
307 prefs::kDiskCacheSize),
308 TypeAndName(kPolicyMediaCacheSize,
309 prefs::kMediaCacheSize),
306 TypeAndName(kPolicyPolicyRefreshRate, 310 TypeAndName(kPolicyPolicyRefreshRate,
307 prefs::kUserPolicyRefreshRate), 311 prefs::kUserPolicyRefreshRate),
308 TypeAndName(kPolicyMaxConnectionsPerProxy, 312 TypeAndName(kPolicyMaxConnectionsPerProxy,
309 prefs::kMaxConnectionsPerProxy))); 313 prefs::kMaxConnectionsPerProxy)));
310 314
311 // Test cases for the proxy policy settings. 315 // Test cases for the proxy policy settings.
312 class ConfigurationPolicyPrefStoreProxyTest : public testing::Test { 316 class ConfigurationPolicyPrefStoreProxyTest : public testing::Test {
313 protected: 317 protected:
314 // Verify that all the proxy prefs are set to the specified expected values. 318 // Verify that all the proxy prefs are set to the specified expected values.
315 static void VerifyProxyPrefs( 319 static void VerifyProxyPrefs(
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after
1030 // DefaultJavaScriptSetting overrides JavascriptEnabled. 1034 // DefaultJavaScriptSetting overrides JavascriptEnabled.
1031 provider_.AddPolicy(kPolicyDefaultJavaScriptSetting, 1035 provider_.AddPolicy(kPolicyDefaultJavaScriptSetting,
1032 Value::CreateIntegerValue(CONTENT_SETTING_ALLOW)); 1036 Value::CreateIntegerValue(CONTENT_SETTING_ALLOW));
1033 store_->OnUpdatePolicy(); 1037 store_->OnUpdatePolicy();
1034 EXPECT_EQ(PrefStore::READ_OK, 1038 EXPECT_EQ(PrefStore::READ_OK,
1035 store_->GetValue(prefs::kManagedDefaultJavaScriptSetting, &value)); 1039 store_->GetValue(prefs::kManagedDefaultJavaScriptSetting, &value));
1036 EXPECT_TRUE(base::FundamentalValue(CONTENT_SETTING_ALLOW).Equals(value)); 1040 EXPECT_TRUE(base::FundamentalValue(CONTENT_SETTING_ALLOW).Equals(value));
1037 } 1041 }
1038 1042
1039 } // namespace policy 1043 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/configuration_policy_handler_list.cc ('k') | chrome/browser/prefs/command_line_pref_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698