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

Side by Side Diff: chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos_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 (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/chromeos/policy/user_cloud_policy_manager_chromeos.h" 5 #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 // attach it to the main Profile. 133 // attach it to the main Profile.
134 signin_profile_ = TestingProfile::Builder().BuildIncognito(profile_); 134 signin_profile_ = TestingProfile::Builder().BuildIncognito(profile_);
135 ASSERT_EQ(signin_profile_, chromeos::ProfileHelper::GetSigninProfile()); 135 ASSERT_EQ(signin_profile_, chromeos::ProfileHelper::GetSigninProfile());
136 136
137 chrome::RegisterLocalState(prefs_.registry()); 137 chrome::RegisterLocalState(prefs_.registry());
138 138
139 // Set up a policy map for testing. 139 // Set up a policy map for testing.
140 GetExpectedDefaultPolicy(&policy_map_); 140 GetExpectedDefaultPolicy(&policy_map_);
141 policy_map_.Set(key::kHomepageLocation, POLICY_LEVEL_MANDATORY, 141 policy_map_.Set(key::kHomepageLocation, POLICY_LEVEL_MANDATORY,
142 POLICY_SCOPE_USER, POLICY_SOURCE_CLOUD, 142 POLICY_SCOPE_USER, POLICY_SOURCE_CLOUD,
143 base::MakeUnique<base::StringValue>("http://chromium.org"), 143 base::MakeUnique<base::Value>("http://chromium.org"),
144 nullptr); 144 nullptr);
145 expected_bundle_.Get(PolicyNamespace(POLICY_DOMAIN_CHROME, std::string())) 145 expected_bundle_.Get(PolicyNamespace(POLICY_DOMAIN_CHROME, std::string()))
146 .CopyFrom(policy_map_); 146 .CopyFrom(policy_map_);
147 147
148 // Create fake policy blobs to deliver to the client. 148 // Create fake policy blobs to deliver to the client.
149 em::DeviceRegisterResponse* register_response = 149 em::DeviceRegisterResponse* register_response =
150 register_blob_.mutable_register_response(); 150 register_blob_.mutable_register_response();
151 register_response->set_device_management_token("dmtoken123"); 151 register_response->set_device_management_token("dmtoken123");
152 152
153 em::CloudPolicySettings policy_proto; 153 em::CloudPolicySettings policy_proto;
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 NonBlockingRefreshFetchWithPreloadedStore) { 637 NonBlockingRefreshFetchWithPreloadedStore) {
638 // Tests the initialization of a manager with non-blocking initial policy 638 // Tests the initialization of a manager with non-blocking initial policy
639 // fetch, when a previously cached policy and DMToken are already loaded 639 // fetch, when a previously cached policy and DMToken are already loaded
640 // before the manager is constructed. The manager gets initialized straight 640 // before the manager is constructed. The manager gets initialized straight
641 // away after the construction. 641 // away after the construction.
642 MakeManagerWithPreloadedStore(false, 0); 642 MakeManagerWithPreloadedStore(false, 0);
643 EXPECT_TRUE(manager_->policies().Equals(expected_bundle_)); 643 EXPECT_TRUE(manager_->policies().Equals(expected_bundle_));
644 } 644 }
645 645
646 } // namespace policy 646 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698