| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/prefs/incognito_mode_prefs.h" | 5 #include "chrome/browser/prefs/incognito_mode_prefs.h" |
| 6 #include "chrome/browser/profiles/incognito_mode_policy_handler.h" | 6 #include "chrome/browser/profiles/incognito_mode_policy_handler.h" |
| 7 #include "chrome/common/pref_names.h" | 7 #include "chrome/common/pref_names.h" |
| 8 #include "components/policy/core/browser/configuration_policy_pref_store.h" | 8 #include "components/policy/core/browser/configuration_policy_pref_store.h" |
| 9 #include "components/policy/core/browser/configuration_policy_pref_store_test.h" | 9 #include "components/policy/core/browser/configuration_policy_pref_store_test.h" |
| 10 #include "grit/generated_resources.h" | |
| 11 #include "policy/policy_constants.h" | 10 #include "policy/policy_constants.h" |
| 12 | 11 |
| 13 namespace policy { | 12 namespace policy { |
| 14 | 13 |
| 15 // Tests Incognito mode availability preference setting. | 14 // Tests Incognito mode availability preference setting. |
| 16 class IncognitoModePolicyHandlerTest | 15 class IncognitoModePolicyHandlerTest |
| 17 : public ConfigurationPolicyPrefStoreTest { | 16 : public ConfigurationPolicyPrefStoreTest { |
| 18 public: | 17 public: |
| 19 virtual void SetUp() OVERRIDE { | 18 virtual void SetUp() OVERRIDE { |
| 20 handler_list_.AddHandler(make_scoped_ptr<ConfigurationPolicyHandler>( | 19 handler_list_.AddHandler(make_scoped_ptr<ConfigurationPolicyHandler>( |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 VerifyValues(IncognitoModePrefs::ENABLED); | 105 VerifyValues(IncognitoModePrefs::ENABLED); |
| 107 } | 106 } |
| 108 | 107 |
| 109 TEST_F(IncognitoModePolicyHandlerTest, | 108 TEST_F(IncognitoModePolicyHandlerTest, |
| 110 ObsoletePolicySetsPreferenceToDisabled) { | 109 ObsoletePolicySetsPreferenceToDisabled) { |
| 111 SetPolicies(INCOGNITO_ENABLED_FALSE, kIncognitoModeAvailabilityNotSet); | 110 SetPolicies(INCOGNITO_ENABLED_FALSE, kIncognitoModeAvailabilityNotSet); |
| 112 VerifyValues(IncognitoModePrefs::DISABLED); | 111 VerifyValues(IncognitoModePrefs::DISABLED); |
| 113 } | 112 } |
| 114 | 113 |
| 115 } // namespace policy | 114 } // namespace policy |
| OLD | NEW |