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

Side by Side Diff: components/policy/core/common/cloud/cloud_policy_manager_unittest.cc

Issue 2476493003: Remove FundamentalValue
Patch Set: Fix Created 4 years, 1 month 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 "components/policy/core/common/cloud/cloud_policy_manager.h" 5 #include "components/policy/core/common/cloud/cloud_policy_manager.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 const std::string& policy_value) { 90 const std::string& policy_value) {
91 store_.policy_map_.Set( 91 store_.policy_map_.Set(
92 policy_name, policy_level(), policy_scope(), POLICY_SOURCE_CLOUD, 92 policy_name, policy_level(), policy_scope(), POLICY_SOURCE_CLOUD,
93 base::MakeUnique<base::StringValue>(policy_value), nullptr); 93 base::MakeUnique<base::StringValue>(policy_value), nullptr);
94 } 94 }
95 95
96 void TestHarness::InstallIntegerPolicy(const std::string& policy_name, 96 void TestHarness::InstallIntegerPolicy(const std::string& policy_name,
97 int policy_value) { 97 int policy_value) {
98 store_.policy_map_.Set( 98 store_.policy_map_.Set(
99 policy_name, policy_level(), policy_scope(), POLICY_SOURCE_CLOUD, 99 policy_name, policy_level(), policy_scope(), POLICY_SOURCE_CLOUD,
100 base::MakeUnique<base::FundamentalValue>(policy_value), nullptr); 100 base::MakeUnique<base::Value>(policy_value), nullptr);
101 } 101 }
102 102
103 void TestHarness::InstallBooleanPolicy(const std::string& policy_name, 103 void TestHarness::InstallBooleanPolicy(const std::string& policy_name,
104 bool policy_value) { 104 bool policy_value) {
105 store_.policy_map_.Set( 105 store_.policy_map_.Set(
106 policy_name, policy_level(), policy_scope(), POLICY_SOURCE_CLOUD, 106 policy_name, policy_level(), policy_scope(), POLICY_SOURCE_CLOUD,
107 base::MakeUnique<base::FundamentalValue>(policy_value), nullptr); 107 base::MakeUnique<base::Value>(policy_value), nullptr);
108 } 108 }
109 109
110 void TestHarness::InstallStringListPolicy(const std::string& policy_name, 110 void TestHarness::InstallStringListPolicy(const std::string& policy_name,
111 const base::ListValue* policy_value) { 111 const base::ListValue* policy_value) {
112 store_.policy_map_.Set(policy_name, policy_level(), policy_scope(), 112 store_.policy_map_.Set(policy_name, policy_level(), policy_scope(),
113 POLICY_SOURCE_CLOUD, policy_value->CreateDeepCopy(), 113 POLICY_SOURCE_CLOUD, policy_value->CreateDeepCopy(),
114 nullptr); 114 nullptr);
115 } 115 }
116 116
117 void TestHarness::InstallDictionaryPolicy( 117 void TestHarness::InstallDictionaryPolicy(
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 store_.policy_.reset(new em::PolicyData(policy_.policy_data())); 348 store_.policy_.reset(new em::PolicyData(policy_.policy_data()));
349 EXPECT_CALL(observer_, OnUpdatePolicy(manager_.get())); 349 EXPECT_CALL(observer_, OnUpdatePolicy(manager_.get()));
350 store_.NotifyStoreError(); 350 store_.NotifyStoreError();
351 Mock::VerifyAndClearExpectations(&observer_); 351 Mock::VerifyAndClearExpectations(&observer_);
352 352
353 EXPECT_TRUE(manager_->IsInitializationComplete(POLICY_DOMAIN_CHROME)); 353 EXPECT_TRUE(manager_->IsInitializationComplete(POLICY_DOMAIN_CHROME));
354 } 354 }
355 355
356 } // namespace 356 } // namespace
357 } // namespace policy 357 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698