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

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

Issue 12212048: Linux/ChromeOS Chromium style checker cleanup, chrome/browser edition. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 10 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/files/scoped_temp_dir.h" 7 #include "base/files/scoped_temp_dir.h"
8 #include "base/json/json_string_value_serializer.h" 8 #include "base/json/json_string_value_serializer.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 163
164 // Instantiate abstract test case for 3rd party policy reading tests. 164 // Instantiate abstract test case for 3rd party policy reading tests.
165 INSTANTIATE_TEST_CASE_P( 165 INSTANTIATE_TEST_CASE_P(
166 ConfigDir3rdPartyPolicyLoaderTest, 166 ConfigDir3rdPartyPolicyLoaderTest,
167 Configuration3rdPartyPolicyProviderTest, 167 Configuration3rdPartyPolicyProviderTest,
168 testing::Values(TestHarness::Create)); 168 testing::Values(TestHarness::Create));
169 169
170 // Some tests that exercise special functionality in ConfigDirPolicyLoader. 170 // Some tests that exercise special functionality in ConfigDirPolicyLoader.
171 class ConfigDirPolicyLoaderTest : public PolicyTestBase { 171 class ConfigDirPolicyLoaderTest : public PolicyTestBase {
172 protected: 172 protected:
173 void SetUp() OVERRIDE { 173 virtual void SetUp() OVERRIDE {
174 PolicyTestBase::SetUp(); 174 PolicyTestBase::SetUp();
175 harness_.SetUp(); 175 harness_.SetUp();
176 } 176 }
177 177
178 TestHarness harness_; 178 TestHarness harness_;
179 }; 179 };
180 180
181 // The preferences dictionary is expected to be empty when there are no files to 181 // The preferences dictionary is expected to be empty when there are no files to
182 // load. 182 // load.
183 TEST_F(ConfigDirPolicyLoaderTest, ReadPrefsEmpty) { 183 TEST_F(ConfigDirPolicyLoaderTest, ReadPrefsEmpty) {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 ConfigDirPolicyLoader loader(harness_.test_dir(), POLICY_SCOPE_USER); 219 ConfigDirPolicyLoader loader(harness_.test_dir(), POLICY_SCOPE_USER);
220 scoped_ptr<PolicyBundle> bundle(loader.Load()); 220 scoped_ptr<PolicyBundle> bundle(loader.Load());
221 ASSERT_TRUE(bundle.get()); 221 ASSERT_TRUE(bundle.get());
222 PolicyBundle expected_bundle; 222 PolicyBundle expected_bundle;
223 expected_bundle.Get(PolicyNamespace(POLICY_DOMAIN_CHROME, std::string())) 223 expected_bundle.Get(PolicyNamespace(POLICY_DOMAIN_CHROME, std::string()))
224 .LoadFrom(&test_dict_foo, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER); 224 .LoadFrom(&test_dict_foo, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER);
225 EXPECT_TRUE(bundle->Equals(expected_bundle)); 225 EXPECT_TRUE(bundle->Equals(expected_bundle));
226 } 226 }
227 227
228 } // namespace policy 228 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698