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

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

Issue 383263005: Remove more CreateIntegerValue calls. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: s/SetBoolean/SetInteger Created 6 years, 5 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 | Annotate | Revision Log
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 "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 void TestHarness::InstallEmptyPolicy() {} 88 void TestHarness::InstallEmptyPolicy() {}
89 89
90 void TestHarness::InstallStringPolicy(const std::string& policy_name, 90 void TestHarness::InstallStringPolicy(const std::string& policy_name,
91 const std::string& policy_value) { 91 const std::string& policy_value) {
92 store_.policy_map_.Set(policy_name, policy_level(), policy_scope(), 92 store_.policy_map_.Set(policy_name, policy_level(), policy_scope(),
93 base::Value::CreateStringValue(policy_value), NULL); 93 base::Value::CreateStringValue(policy_value), NULL);
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(policy_name, policy_level(), policy_scope(), 98 store_.policy_map_.Set(policy_name,
99 base::Value::CreateIntegerValue(policy_value), NULL); 99 policy_level(),
100 policy_scope(),
101 new base::FundamentalValue(policy_value),
102 NULL);
100 } 103 }
101 104
102 void TestHarness::InstallBooleanPolicy(const std::string& policy_name, 105 void TestHarness::InstallBooleanPolicy(const std::string& policy_name,
103 bool policy_value) { 106 bool policy_value) {
104 store_.policy_map_.Set(policy_name, policy_level(), policy_scope(), 107 store_.policy_map_.Set(policy_name, policy_level(), policy_scope(),
105 base::Value::CreateBooleanValue(policy_value), NULL); 108 base::Value::CreateBooleanValue(policy_value), NULL);
106 } 109 }
107 110
108 void TestHarness::InstallStringListPolicy(const std::string& policy_name, 111 void TestHarness::InstallStringListPolicy(const std::string& policy_name,
109 const base::ListValue* policy_value) { 112 const base::ListValue* policy_value) {
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 store_.policy_.reset(new em::PolicyData(policy_.policy_data())); 348 store_.policy_.reset(new em::PolicyData(policy_.policy_data()));
346 EXPECT_CALL(observer_, OnUpdatePolicy(manager_.get())); 349 EXPECT_CALL(observer_, OnUpdatePolicy(manager_.get()));
347 store_.NotifyStoreError(); 350 store_.NotifyStoreError();
348 Mock::VerifyAndClearExpectations(&observer_); 351 Mock::VerifyAndClearExpectations(&observer_);
349 352
350 EXPECT_TRUE(manager_->IsInitializationComplete(POLICY_DOMAIN_CHROME)); 353 EXPECT_TRUE(manager_->IsInitializationComplete(POLICY_DOMAIN_CHROME));
351 } 354 }
352 355
353 } // namespace 356 } // namespace
354 } // namespace policy 357 } // namespace policy
OLDNEW
« no previous file with comments | « components/policy/core/browser/configuration_policy_pref_store_unittest.cc ('k') | components/policy/core/common/mac_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698