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

Side by Side Diff: components/policy/core/common/policy_loader_ios_unittest.mm

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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/policy/core/common/policy_loader_ios.h" 5 #include "components/policy/core/common/policy_loader_ios.h"
6 6
7 #import <UIKit/UIKit.h> 7 #import <UIKit/UIKit.h>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 @"EncodedChromePolicy": encodedChromePolicy, 249 @"EncodedChromePolicy": encodedChromePolicy,
250 }; 250 };
251 251
252 [[NSUserDefaults standardUserDefaults] setObject:wrapper 252 [[NSUserDefaults standardUserDefaults] setObject:wrapper
253 forKey:kConfigurationKey]; 253 forKey:kConfigurationKey];
254 254
255 PolicyBundle expected; 255 PolicyBundle expected;
256 PolicyMap& expectedMap = 256 PolicyMap& expectedMap =
257 expected.Get(PolicyNamespace(POLICY_DOMAIN_CHROME, "")); 257 expected.Get(PolicyNamespace(POLICY_DOMAIN_CHROME, ""));
258 expectedMap.Set("shared", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, 258 expectedMap.Set("shared", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE,
259 POLICY_SOURCE_PLATFORM, new base::StringValue("right"), 259 POLICY_SOURCE_PLATFORM, new base::Value("right"), nullptr);
260 nullptr);
261 expectedMap.Set("key2", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, 260 expectedMap.Set("key2", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE,
262 POLICY_SOURCE_PLATFORM, new base::StringValue("value2"), 261 POLICY_SOURCE_PLATFORM, new base::Value("value2"), nullptr);
263 nullptr);
264 262
265 scoped_refptr<base::TestSimpleTaskRunner> taskRunner = 263 scoped_refptr<base::TestSimpleTaskRunner> taskRunner =
266 new base::TestSimpleTaskRunner(); 264 new base::TestSimpleTaskRunner();
267 PolicyLoaderIOS loader(taskRunner); 265 PolicyLoaderIOS loader(taskRunner);
268 std::unique_ptr<PolicyBundle> bundle = loader.Load(); 266 std::unique_ptr<PolicyBundle> bundle = loader.Load();
269 ASSERT_TRUE(bundle); 267 ASSERT_TRUE(bundle);
270 EXPECT_TRUE(bundle->Equals(expected)); 268 EXPECT_TRUE(bundle->Equals(expected));
271 } 269 }
272 270
273 } // namespace policy 271 } // namespace policy
OLDNEW
« no previous file with comments | « components/policy/core/common/policy_bundle_unittest.cc ('k') | components/policy/core/common/policy_loader_mac_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698