OLD | NEW |
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 <CoreFoundation/CoreFoundation.h> | 5 #include <CoreFoundation/CoreFoundation.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/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/mac/scoped_cftyperef.h" | 10 #include "base/mac/scoped_cftyperef.h" |
11 #include "base/strings/sys_string_conversions.h" | 11 #include "base/strings/sys_string_conversions.h" |
12 #include "base/values.h" | 12 #include "base/values.h" |
13 #include "chrome/browser/policy/async_policy_provider.h" | 13 #include "chrome/browser/policy/async_policy_provider.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/external_data_fetcher.h" | |
16 #include "chrome/browser/policy/policy_bundle.h" | 15 #include "chrome/browser/policy/policy_bundle.h" |
17 #include "chrome/browser/policy/policy_loader_mac.h" | 16 #include "chrome/browser/policy/policy_loader_mac.h" |
18 #include "chrome/browser/policy/policy_map.h" | |
19 #include "chrome/browser/policy/preferences_mock_mac.h" | 17 #include "chrome/browser/policy/preferences_mock_mac.h" |
| 18 #include "components/policy/core/common/external_data_fetcher.h" |
| 19 #include "components/policy/core/common/policy_map.h" |
20 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
21 | 21 |
22 using base::ScopedCFTypeRef; | 22 using base::ScopedCFTypeRef; |
23 | 23 |
24 namespace policy { | 24 namespace policy { |
25 | 25 |
26 namespace { | 26 namespace { |
27 | 27 |
28 // Converts a base::Value to the equivalent CFPropertyListRef. | 28 // Converts a base::Value to the equivalent CFPropertyListRef. |
29 // The returned value is owned by the caller. | 29 // The returned value is owned by the caller. |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 ScopedCFTypeRef<CFPropertyListRef> property(CreatePropertyFromValue(&root)); | 331 ScopedCFTypeRef<CFPropertyListRef> property(CreatePropertyFromValue(&root)); |
332 ASSERT_TRUE(property); | 332 ASSERT_TRUE(property); |
333 scoped_ptr<base::Value> value( | 333 scoped_ptr<base::Value> value( |
334 PolicyLoaderMac::CreateValueFromProperty(property)); | 334 PolicyLoaderMac::CreateValueFromProperty(property)); |
335 ASSERT_TRUE(value.get()); | 335 ASSERT_TRUE(value.get()); |
336 | 336 |
337 EXPECT_TRUE(root.Equals(value.get())); | 337 EXPECT_TRUE(root.Equals(value.get())); |
338 } | 338 } |
339 | 339 |
340 } // namespace policy | 340 } // namespace policy |
OLD | NEW |