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 "chrome/browser/policy/configuration_policy_handler_chromeos.h" | 5 #include "chrome/browser/policy/configuration_policy_handler_chromeos.h" |
6 | 6 |
| 7 #include "base/prefs/pref_value_map.h" |
7 #include "chrome/browser/policy/policy_error_map.h" | 8 #include "chrome/browser/policy/policy_error_map.h" |
8 #include "chrome/browser/policy/policy_map.h" | 9 #include "chrome/browser/policy/policy_map.h" |
9 #include "chrome/browser/prefs/pref_value_map.h" | |
10 #include "chrome/browser/ui/ash/chrome_launcher_prefs.h" | 10 #include "chrome/browser/ui/ash/chrome_launcher_prefs.h" |
11 #include "chrome/common/pref_names.h" | 11 #include "chrome/common/pref_names.h" |
12 #include "policy/policy_constants.h" | 12 #include "policy/policy_constants.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
14 | 14 |
15 namespace policy { | 15 namespace policy { |
16 | 16 |
17 TEST(NetworkConfigurationPolicyHandlerTest, Empty) { | 17 TEST(NetworkConfigurationPolicyHandlerTest, Empty) { |
18 PolicyMap policy_map; | 18 PolicyMap policy_map; |
19 NetworkConfigurationPolicyHandler handler( | 19 NetworkConfigurationPolicyHandler handler( |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 list.Append(entry1.DeepCopy()); | 133 list.Append(entry1.DeepCopy()); |
134 policy_map.Set(key::kPinnedLauncherApps, POLICY_LEVEL_MANDATORY, | 134 policy_map.Set(key::kPinnedLauncherApps, POLICY_LEVEL_MANDATORY, |
135 POLICY_SCOPE_USER, list.DeepCopy()); | 135 POLICY_SCOPE_USER, list.DeepCopy()); |
136 prefs.Clear(); | 136 prefs.Clear(); |
137 handler.ApplyPolicySettings(policy_map, &prefs); | 137 handler.ApplyPolicySettings(policy_map, &prefs); |
138 EXPECT_TRUE(prefs.GetValue(prefs::kPinnedLauncherApps, &value)); | 138 EXPECT_TRUE(prefs.GetValue(prefs::kPinnedLauncherApps, &value)); |
139 EXPECT_TRUE(base::Value::Equals(&expected_pinned_apps, value)); | 139 EXPECT_TRUE(base::Value::Equals(&expected_pinned_apps, value)); |
140 } | 140 } |
141 | 141 |
142 } // namespace policy | 142 } // namespace policy |
OLD | NEW |