| OLD | NEW |
| 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 "base/prefs/pref_value_map.h" |
| 5 #include "chrome/browser/policy/configuration_policy_handler.h" | 6 #include "chrome/browser/policy/configuration_policy_handler.h" |
| 6 #include "chrome/browser/policy/policy_error_map.h" | 7 #include "chrome/browser/policy/policy_error_map.h" |
| 7 #include "chrome/browser/policy/policy_map.h" | 8 #include "chrome/browser/policy/policy_map.h" |
| 8 #include "chrome/browser/prefs/pref_value_map.h" | |
| 9 #include "chrome/common/pref_names.h" | 9 #include "chrome/common/pref_names.h" |
| 10 #include "policy/policy_constants.h" | 10 #include "policy/policy_constants.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 12 | 12 |
| 13 namespace policy { | 13 namespace policy { |
| 14 | 14 |
| 15 TEST(ExtensionListPolicyHandlerTest, CheckPolicySettings) { | 15 TEST(ExtensionListPolicyHandlerTest, CheckPolicySettings) { |
| 16 base::ListValue list; | 16 base::ListValue list; |
| 17 PolicyMap policy_map; | 17 PolicyMap policy_map; |
| 18 PolicyErrorMap errors; | 18 PolicyErrorMap errors; |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 ASSERT_TRUE(prefs.GetValue(prefs::kManagedDefaultCookiesSetting, &val)); | 187 ASSERT_TRUE(prefs.GetValue(prefs::kManagedDefaultCookiesSetting, &val)); |
| 188 EXPECT_TRUE(base::FundamentalValue(CONTENT_SETTING_SESSION_ONLY).Equals(val)); | 188 EXPECT_TRUE(base::FundamentalValue(CONTENT_SETTING_SESSION_ONLY).Equals(val)); |
| 189 | 189 |
| 190 policy_map.Clear(); | 190 policy_map.Clear(); |
| 191 prefs.Clear(); | 191 prefs.Clear(); |
| 192 handler.ApplyPolicySettings(policy_map, &prefs); | 192 handler.ApplyPolicySettings(policy_map, &prefs); |
| 193 EXPECT_FALSE(prefs.GetValue(prefs::kManagedDefaultCookiesSetting, &val)); | 193 EXPECT_FALSE(prefs.GetValue(prefs::kManagedDefaultCookiesSetting, &val)); |
| 194 } | 194 } |
| 195 | 195 |
| 196 } // namespace policy | 196 } // namespace policy |
| OLD | NEW |