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

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

Issue 16254003: WIP (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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/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/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
11 #include "base/values.h" 11 #include "base/values.h"
12 #include "chrome/browser/policy/async_policy_provider.h" 12 #include "chrome/browser/policy/async_policy_provider.h"
13 #include "chrome/browser/policy/config_dir_policy_loader.h" 13 #include "chrome/browser/policy/config_dir_policy_loader.h"
14 #include "chrome/browser/policy/configuration_policy_provider_test.h" 14 #include "chrome/browser/policy/configuration_policy_provider_test.h"
15 #include "chrome/browser/policy/policy_bundle.h" 15 #include "chrome/browser/policy/policy_bundle.h"
16 #include "chrome/browser/policy/policy_map.h" 16 #include "chrome/browser/policy/policy_map.h"
17 #include "chrome/browser/policy/policy_namespace.h"
17 18
18 namespace policy { 19 namespace policy {
19 20
20 namespace { 21 namespace {
21 22
22 // Subdirectory of the config dir that contains mandatory policies. 23 // Subdirectory of the config dir that contains mandatory policies.
23 const base::FilePath::CharType kMandatoryPath[] = FILE_PATH_LITERAL("managed"); 24 const base::FilePath::CharType kMandatoryPath[] = FILE_PATH_LITERAL("managed");
24 25
25 class TestHarness : public PolicyProviderTestHarness { 26 class TestHarness : public PolicyProviderTestHarness {
26 public: 27 public:
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 ConfigDirPolicyLoader loader(harness_.test_dir(), POLICY_SCOPE_USER); 220 ConfigDirPolicyLoader loader(harness_.test_dir(), POLICY_SCOPE_USER);
220 scoped_ptr<PolicyBundle> bundle(loader.Load()); 221 scoped_ptr<PolicyBundle> bundle(loader.Load());
221 ASSERT_TRUE(bundle.get()); 222 ASSERT_TRUE(bundle.get());
222 PolicyBundle expected_bundle; 223 PolicyBundle expected_bundle;
223 expected_bundle.Get(PolicyNamespace(POLICY_DOMAIN_CHROME, std::string())) 224 expected_bundle.Get(PolicyNamespace(POLICY_DOMAIN_CHROME, std::string()))
224 .LoadFrom(&test_dict_foo, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER); 225 .LoadFrom(&test_dict_foo, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER);
225 EXPECT_TRUE(bundle->Equals(expected_bundle)); 226 EXPECT_TRUE(bundle->Equals(expected_bundle));
226 } 227 }
227 228
228 } // namespace policy 229 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/config_dir_policy_loader.cc ('k') | chrome/browser/policy/configuration_policy_pref_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698