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 "chrome/browser/policy/policy_loader_win.h" | 5 #include "chrome/browser/policy/policy_loader_win.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 | 8 |
9 #include "base/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
10 #include "base/process.h" | 10 #include "base/process.h" |
11 #include "base/string16.h" | 11 #include "base/string16.h" |
12 #include "base/string_util.h" | 12 #include "base/string_util.h" |
13 #include "base/stringprintf.h" | 13 #include "base/stringprintf.h" |
14 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
15 #include "base/utf_string_conversions.h" | 15 #include "base/utf_string_conversions.h" |
16 #include "base/win/registry.h" | 16 #include "base/win/registry.h" |
17 #include "chrome/browser/policy/async_policy_provider.h" | 17 #include "chrome/browser/policy/async_policy_provider.h" |
18 #include "chrome/browser/policy/configuration_policy_provider_test.h" | 18 #include "chrome/browser/policy/configuration_policy_provider_test.h" |
19 #include "chrome/browser/policy/policy_bundle.h" | 19 #include "chrome/browser/policy/policy_bundle.h" |
20 #include "chrome/browser/policy/policy_map.h" | 20 #include "chrome/browser/policy/policy_map.h" |
21 #include "chrome/common/json_schema_constants.h" | 21 #include "chrome/common/json_schema/json_schema_constants.h" |
22 #include "policy/policy_constants.h" | 22 #include "policy/policy_constants.h" |
23 #include "testing/gtest/include/gtest/gtest.h" | 23 #include "testing/gtest/include/gtest/gtest.h" |
24 | 24 |
25 namespace schema = json_schema_constants; | 25 namespace schema = json_schema_constants; |
26 | 26 |
27 using base::win::RegKey; | 27 using base::win::RegKey; |
28 using namespace policy::registry_constants; | 28 using namespace policy::registry_constants; |
29 | 29 |
30 namespace policy { | 30 namespace policy { |
31 | 31 |
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
626 expected_policy.SetInteger("special-int2", -456); | 626 expected_policy.SetInteger("special-int2", -456); |
627 expected_policy.SetDouble("double1", 789.0); | 627 expected_policy.SetDouble("double1", 789.0); |
628 expected_policy.SetDouble("double2", 123.456e7); | 628 expected_policy.SetDouble("double2", 123.456e7); |
629 PolicyBundle expected; | 629 PolicyBundle expected; |
630 expected.Get(PolicyNamespace(POLICY_DOMAIN_EXTENSIONS, "test")) | 630 expected.Get(PolicyNamespace(POLICY_DOMAIN_EXTENSIONS, "test")) |
631 .LoadFrom(&expected_policy, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER); | 631 .LoadFrom(&expected_policy, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER); |
632 EXPECT_TRUE(Matches(expected)); | 632 EXPECT_TRUE(Matches(expected)); |
633 } | 633 } |
634 | 634 |
635 } // namespace policy | 635 } // namespace policy |
OLD | NEW |