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

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

Issue 27536003: Moved prefs::kUserPolicyRefreshRate to component/policy/policy_pref_names. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 2 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 "chrome/browser/policy/configuration_policy_pref_store_unittest.h" 5 #include "chrome/browser/policy/configuration_policy_pref_store_unittest.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
11 #include "base/prefs/pref_store_observer_mock.h" 11 #include "base/prefs/pref_store_observer_mock.h"
12 #include "base/run_loop.h" 12 #include "base/run_loop.h"
13 #include "chrome/browser/policy/configuration_policy_handler.h" 13 #include "chrome/browser/policy/configuration_policy_handler.h"
14 #include "chrome/browser/policy/configuration_policy_pref_store.h" 14 #include "chrome/browser/policy/configuration_policy_pref_store.h"
15 #include "chrome/browser/policy/external_data_fetcher.h" 15 #include "chrome/browser/policy/external_data_fetcher.h"
16 #include "chrome/browser/policy/policy_map.h" 16 #include "chrome/browser/policy/policy_map.h"
17 #include "chrome/browser/policy/policy_service_impl.h" 17 #include "chrome/browser/policy/policy_service_impl.h"
18 #include "chrome/browser/prefs/incognito_mode_prefs.h" 18 #include "chrome/browser/prefs/incognito_mode_prefs.h"
19 #include "chrome/common/content_settings.h" 19 #include "chrome/common/content_settings.h"
20 #include "chrome/common/pref_names.h" 20 #include "chrome/common/pref_names.h"
21 #include "components/policy/core/common/policy_pref_names.h"
21 #include "policy/policy_constants.h" 22 #include "policy/policy_constants.h"
22 #include "testing/gmock/include/gmock/gmock.h" 23 #include "testing/gmock/include/gmock/gmock.h"
23 24
24 using testing::Mock; 25 using testing::Mock;
25 using testing::Return; 26 using testing::Return;
26 using testing::_; 27 using testing::_;
27 28
28 namespace policy { 29 namespace policy {
29 30
30 // Holds a set of test parameters, consisting of pref name and policy name. 31 // Holds a set of test parameters, consisting of pref name and policy name.
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 prefs::kManagedDefaultNotificationsSetting), 348 prefs::kManagedDefaultNotificationsSetting),
348 PolicyAndPref(key::kDefaultGeolocationSetting, 349 PolicyAndPref(key::kDefaultGeolocationSetting,
349 prefs::kManagedDefaultGeolocationSetting), 350 prefs::kManagedDefaultGeolocationSetting),
350 PolicyAndPref(key::kRestoreOnStartup, 351 PolicyAndPref(key::kRestoreOnStartup,
351 prefs::kRestoreOnStartup), 352 prefs::kRestoreOnStartup),
352 PolicyAndPref(key::kDiskCacheSize, 353 PolicyAndPref(key::kDiskCacheSize,
353 prefs::kDiskCacheSize), 354 prefs::kDiskCacheSize),
354 PolicyAndPref(key::kMediaCacheSize, 355 PolicyAndPref(key::kMediaCacheSize,
355 prefs::kMediaCacheSize), 356 prefs::kMediaCacheSize),
356 PolicyAndPref(key::kPolicyRefreshRate, 357 PolicyAndPref(key::kPolicyRefreshRate,
357 prefs::kUserPolicyRefreshRate), 358 policy_prefs::kUserPolicyRefreshRate),
358 PolicyAndPref(key::kMaxConnectionsPerProxy, 359 PolicyAndPref(key::kMaxConnectionsPerProxy,
359 prefs::kMaxConnectionsPerProxy))); 360 prefs::kMaxConnectionsPerProxy)));
360 361
361 // Tests Incognito mode availability preference setting. 362 // Tests Incognito mode availability preference setting.
362 class ConfigurationPolicyPrefStoreIncognitoModeTest 363 class ConfigurationPolicyPrefStoreIncognitoModeTest
363 : public ConfigurationPolicyPrefStoreTest { 364 : public ConfigurationPolicyPrefStoreTest {
364 protected: 365 protected:
365 static const int kIncognitoModeAvailabilityNotSet = -1; 366 static const int kIncognitoModeAvailabilityNotSet = -1;
366 367
367 enum ObsoleteIncognitoEnabledValue { 368 enum ObsoleteIncognitoEnabledValue {
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 POLICY_SCOPE_USER, 709 POLICY_SCOPE_USER,
709 base::Value::CreateIntegerValue(CONTENT_SETTING_ALLOW), 710 base::Value::CreateIntegerValue(CONTENT_SETTING_ALLOW),
710 NULL); 711 NULL);
711 UpdateProviderPolicy(policy); 712 UpdateProviderPolicy(policy);
712 EXPECT_TRUE(store_->GetValue(prefs::kManagedDefaultJavaScriptSetting, 713 EXPECT_TRUE(store_->GetValue(prefs::kManagedDefaultJavaScriptSetting,
713 &value)); 714 &value));
714 EXPECT_TRUE(base::FundamentalValue(CONTENT_SETTING_ALLOW).Equals(value)); 715 EXPECT_TRUE(base::FundamentalValue(CONTENT_SETTING_ALLOW).Equals(value));
715 } 716 }
716 717
717 } // namespace policy 718 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/configuration_policy_handler_list.cc ('k') | chrome/browser/policy/policy_statistics_collector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698