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

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

Issue 2664753002: Remove base::StringValue (Closed)
Patch Set: Rebase Created 3 years, 9 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 <memory> 6 #include <memory>
7 #include <string> 7 #include <string>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 207
208 #if defined(OS_CHROMEOS) 208 #if defined(OS_CHROMEOS)
209 TEST(GeneratePolicySource, SetEnterpriseDefaults) { 209 TEST(GeneratePolicySource, SetEnterpriseDefaults) {
210 PolicyMap policy_map; 210 PolicyMap policy_map;
211 211
212 // If policy not configured yet, set the enterprise default. 212 // If policy not configured yet, set the enterprise default.
213 SetEnterpriseUsersDefaults(&policy_map); 213 SetEnterpriseUsersDefaults(&policy_map);
214 214
215 const base::Value* multiprof_behavior = 215 const base::Value* multiprof_behavior =
216 policy_map.GetValue(key::kChromeOsMultiProfileUserBehavior); 216 policy_map.GetValue(key::kChromeOsMultiProfileUserBehavior);
217 base::StringValue expected("primary-only"); 217 base::Value expected("primary-only");
218 EXPECT_TRUE(expected.Equals(multiprof_behavior)); 218 EXPECT_TRUE(expected.Equals(multiprof_behavior));
219 219
220 // If policy already configured, it's not changed to enterprise defaults. 220 // If policy already configured, it's not changed to enterprise defaults.
221 policy_map.Set(key::kChromeOsMultiProfileUserBehavior, POLICY_LEVEL_MANDATORY, 221 policy_map.Set(key::kChromeOsMultiProfileUserBehavior, POLICY_LEVEL_MANDATORY,
222 POLICY_SCOPE_USER, POLICY_SOURCE_CLOUD, 222 POLICY_SCOPE_USER, POLICY_SOURCE_CLOUD,
223 base::MakeUnique<base::StringValue>("test_value"), nullptr); 223 base::MakeUnique<base::Value>("test_value"), nullptr);
224 SetEnterpriseUsersDefaults(&policy_map); 224 SetEnterpriseUsersDefaults(&policy_map);
225 multiprof_behavior = 225 multiprof_behavior =
226 policy_map.GetValue(key::kChromeOsMultiProfileUserBehavior); 226 policy_map.GetValue(key::kChromeOsMultiProfileUserBehavior);
227 expected = base::StringValue("test_value"); 227 expected = base::Value("test_value");
228 EXPECT_TRUE(expected.Equals(multiprof_behavior)); 228 EXPECT_TRUE(expected.Equals(multiprof_behavior));
229 } 229 }
230 #endif 230 #endif
231 231
232 } // namespace policy 232 } // namespace policy
OLDNEW
« no previous file with comments | « components/policy/core/common/configuration_policy_provider_test.cc ('k') | components/policy/core/common/mac_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698