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

Side by Side Diff: components/policy/core/common/generate_policy_source_unittest.cc

Issue 1304843004: Add source column to chrome://policy showing the origins of policies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed another test. Created 5 years, 3 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
OLDNEW
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 <cstring> 5 #include <cstring>
6 #include <string> 6 #include <string>
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 213
214 const base::Value* multiprof_behavior = 214 const base::Value* multiprof_behavior =
215 policy_map.GetValue(key::kChromeOsMultiProfileUserBehavior); 215 policy_map.GetValue(key::kChromeOsMultiProfileUserBehavior);
216 base::StringValue expected("primary-only"); 216 base::StringValue expected("primary-only");
217 EXPECT_TRUE(expected.Equals(multiprof_behavior)); 217 EXPECT_TRUE(expected.Equals(multiprof_behavior));
218 218
219 // If policy already configured, it's not changed to enterprise defaults. 219 // If policy already configured, it's not changed to enterprise defaults.
220 policy_map.Set(key::kChromeOsMultiProfileUserBehavior, 220 policy_map.Set(key::kChromeOsMultiProfileUserBehavior,
221 POLICY_LEVEL_MANDATORY, 221 POLICY_LEVEL_MANDATORY,
222 POLICY_SCOPE_USER, 222 POLICY_SCOPE_USER,
223 POLICY_SOURCE_CLOUD,
223 new base::StringValue("test_value"), 224 new base::StringValue("test_value"),
224 NULL); 225 NULL);
225 SetEnterpriseUsersDefaults(&policy_map); 226 SetEnterpriseUsersDefaults(&policy_map);
226 multiprof_behavior = 227 multiprof_behavior =
227 policy_map.GetValue(key::kChromeOsMultiProfileUserBehavior); 228 policy_map.GetValue(key::kChromeOsMultiProfileUserBehavior);
228 expected = base::StringValue("test_value"); 229 expected = base::StringValue("test_value");
229 EXPECT_TRUE(expected.Equals(multiprof_behavior)); 230 EXPECT_TRUE(expected.Equals(multiprof_behavior));
230 } 231 }
231 #endif 232 #endif
232 233
233 } // namespace policy 234 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698