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

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

Issue 11243002: Move the bits of Prefs where production code has only trivially easy (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments, fix gypi problem Created 8 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_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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698