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

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

Issue 99333002: Revert of Move ConfigurationPolicyProvider, etc. to components/policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
11 #include "base/message_loop/message_loop_proxy.h" 11 #include "base/message_loop/message_loop_proxy.h"
12 #include "base/sequenced_task_runner.h" 12 #include "base/sequenced_task_runner.h"
13 #include "base/strings/string_number_conversions.h" 13 #include "base/strings/string_number_conversions.h"
14 #include "base/values.h" 14 #include "base/values.h"
15 #include "chrome/browser/policy/async_policy_provider.h" 15 #include "chrome/browser/policy/async_policy_provider.h"
16 #include "chrome/browser/policy/config_dir_policy_loader.h" 16 #include "chrome/browser/policy/config_dir_policy_loader.h"
17 #include "components/policy/core/common/configuration_policy_provider_test.h" 17 #include "chrome/browser/policy/configuration_policy_provider_test.h"
18 #include "components/policy/core/common/policy_bundle.h" 18 #include "components/policy/core/common/policy_bundle.h"
19 #include "components/policy/core/common/policy_map.h" 19 #include "components/policy/core/common/policy_map.h"
20 20
21 namespace policy { 21 namespace policy {
22 22
23 namespace { 23 namespace {
24 24
25 // Subdirectory of the config dir that contains mandatory policies. 25 // Subdirectory of the config dir that contains mandatory policies.
26 const base::FilePath::CharType kMandatoryPath[] = FILE_PATH_LITERAL("managed"); 26 const base::FilePath::CharType kMandatoryPath[] = FILE_PATH_LITERAL("managed");
27 27
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 loop_.message_loop_proxy(), harness_.test_dir(), POLICY_SCOPE_USER); 227 loop_.message_loop_proxy(), harness_.test_dir(), POLICY_SCOPE_USER);
228 scoped_ptr<PolicyBundle> bundle(loader.Load()); 228 scoped_ptr<PolicyBundle> bundle(loader.Load());
229 ASSERT_TRUE(bundle.get()); 229 ASSERT_TRUE(bundle.get());
230 PolicyBundle expected_bundle; 230 PolicyBundle expected_bundle;
231 expected_bundle.Get(PolicyNamespace(POLICY_DOMAIN_CHROME, std::string())) 231 expected_bundle.Get(PolicyNamespace(POLICY_DOMAIN_CHROME, std::string()))
232 .LoadFrom(&test_dict_foo, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER); 232 .LoadFrom(&test_dict_foo, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER);
233 EXPECT_TRUE(bundle->Equals(expected_bundle)); 233 EXPECT_TRUE(bundle->Equals(expected_bundle));
234 } 234 }
235 235
236 } // namespace policy 236 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698