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 <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 Loading... |
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, | |
224 new base::StringValue("test_value"), | 223 new base::StringValue("test_value"), |
225 NULL); | 224 NULL); |
226 SetEnterpriseUsersDefaults(&policy_map); | 225 SetEnterpriseUsersDefaults(&policy_map); |
227 multiprof_behavior = | 226 multiprof_behavior = |
228 policy_map.GetValue(key::kChromeOsMultiProfileUserBehavior); | 227 policy_map.GetValue(key::kChromeOsMultiProfileUserBehavior); |
229 expected = base::StringValue("test_value"); | 228 expected = base::StringValue("test_value"); |
230 EXPECT_TRUE(expected.Equals(multiprof_behavior)); | 229 EXPECT_TRUE(expected.Equals(multiprof_behavior)); |
231 } | 230 } |
232 #endif | 231 #endif |
233 | 232 |
234 } // namespace policy | 233 } // namespace policy |
OLD | NEW |