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

Side by Side Diff: chrome/browser/policy/config_dir_policy_loader_unittest.cc

Issue 10545033: Removed the PolicyDefinitionList from the ConfigurationPolicyProvider interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 6 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 "base/compiler_specific.h" 5 #include "base/compiler_specific.h"
6 #include "base/file_util.h" 6 #include "base/file_util.h"
7 #include "base/json/json_string_value_serializer.h" 7 #include "base/json/json_string_value_serializer.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/scoped_temp_dir.h" 9 #include "base/scoped_temp_dir.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 TestHarness::~TestHarness() {} 66 TestHarness::~TestHarness() {}
67 67
68 void TestHarness::SetUp() { 68 void TestHarness::SetUp() {
69 ASSERT_TRUE(test_dir_.CreateUniqueTempDir()); 69 ASSERT_TRUE(test_dir_.CreateUniqueTempDir());
70 } 70 }
71 71
72 ConfigurationPolicyProvider* TestHarness::CreateProvider( 72 ConfigurationPolicyProvider* TestHarness::CreateProvider(
73 const PolicyDefinitionList* policy_definition_list) { 73 const PolicyDefinitionList* policy_definition_list) {
74 scoped_ptr<AsyncPolicyLoader> loader( 74 scoped_ptr<AsyncPolicyLoader> loader(
75 new ConfigDirPolicyLoader(test_dir(), POLICY_SCOPE_MACHINE)); 75 new ConfigDirPolicyLoader(test_dir(), POLICY_SCOPE_MACHINE));
76 return new AsyncPolicyProvider(policy_definition_list, loader.Pass()); 76 return new AsyncPolicyProvider(loader.Pass());
77 } 77 }
78 78
79 void TestHarness::InstallEmptyPolicy() { 79 void TestHarness::InstallEmptyPolicy() {
80 base::DictionaryValue dict; 80 base::DictionaryValue dict;
81 WriteConfigFile(dict, "policy"); 81 WriteConfigFile(dict, "policy");
82 } 82 }
83 83
84 void TestHarness::InstallStringPolicy(const std::string& policy_name, 84 void TestHarness::InstallStringPolicy(const std::string& policy_name,
85 const std::string& policy_value) { 85 const std::string& policy_value) {
86 base::DictionaryValue dict; 86 base::DictionaryValue dict;
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 expected_bundle.Get(POLICY_DOMAIN_EXTENSIONS, 238 expected_bundle.Get(POLICY_DOMAIN_EXTENSIONS,
239 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") 239 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
240 .CopyFrom(expected_policy); 240 .CopyFrom(expected_policy);
241 expected_bundle.Get(POLICY_DOMAIN_EXTENSIONS, 241 expected_bundle.Get(POLICY_DOMAIN_EXTENSIONS,
242 "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb") 242 "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb")
243 .CopyFrom(expected_policy); 243 .CopyFrom(expected_policy);
244 EXPECT_TRUE(bundle->Equals(expected_bundle)); 244 EXPECT_TRUE(bundle->Equals(expected_bundle));
245 } 245 }
246 246
247 } // namespace policy 247 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/config_dir_policy_loader.h ('k') | chrome/browser/policy/config_dir_policy_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698