OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/profile_policy_connector.h" | 5 #include "chrome/browser/policy/profile_policy_connector.h" |
6 | 6 |
7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
11 #include "chrome/test/base/testing_browser_process.h" | 11 #include "chrome/test/base/testing_browser_process.h" |
12 #include "components/autofill/core/common/autofill_pref_names.h" | 12 #include "components/autofill/core/common/autofill_pref_names.h" |
13 #include "components/policy/core/browser/browser_policy_connector.h" | 13 #include "components/policy/core/browser/browser_policy_connector.h" |
14 #include "components/policy/core/common/cloud/cloud_policy_constants.h" | 14 #include "components/policy/core/common/cloud/cloud_policy_constants.h" |
15 #include "components/policy/core/common/cloud/cloud_policy_manager.h" | 15 #include "components/policy/core/common/cloud/cloud_policy_manager.h" |
16 #include "components/policy/core/common/cloud/mock_cloud_policy_store.h" | 16 #include "components/policy/core/common/cloud/mock_cloud_policy_store.h" |
17 #include "components/policy/core/common/mock_configuration_policy_provider.h" | 17 #include "components/policy/core/common/mock_configuration_policy_provider.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 #include "components/policy/core/common/policy_service.h" | 20 #include "components/policy/core/common/policy_service.h" |
21 #include "components/policy/core/common/policy_types.h" | 21 #include "components/policy/core/common/policy_types.h" |
22 #include "components/policy/core/common/schema_registry.h" | 22 #include "components/policy/core/common/schema_registry.h" |
23 #include "policy/policy_constants.h" | 23 #include "components/policy/policy_constants.h" |
24 #include "policy/proto/device_management_backend.pb.h" | 24 #include "components/policy/proto/device_management_backend.pb.h" |
25 #include "testing/gmock/include/gmock/gmock.h" | 25 #include "testing/gmock/include/gmock/gmock.h" |
26 #include "testing/gtest/include/gtest/gtest.h" | 26 #include "testing/gtest/include/gtest/gtest.h" |
27 | 27 |
28 using testing::Return; | 28 using testing::Return; |
29 using testing::_; | 29 using testing::_; |
30 | 30 |
31 namespace policy { | 31 namespace policy { |
32 | 32 |
33 class ProfilePolicyConnectorTest : public testing::Test { | 33 class ProfilePolicyConnectorTest : public testing::Test { |
34 protected: | 34 protected: |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 value = connector.policy_service()->GetPolicies(chrome_ns).GetValue( | 120 value = connector.policy_service()->GetPolicies(chrome_ns).GetValue( |
121 key::kAutoFillEnabled); | 121 key::kAutoFillEnabled); |
122 ASSERT_TRUE(value); | 122 ASSERT_TRUE(value); |
123 EXPECT_TRUE(base::FundamentalValue(true).Equals(value)); | 123 EXPECT_TRUE(base::FundamentalValue(true).Equals(value)); |
124 | 124 |
125 // Cleanup. | 125 // Cleanup. |
126 connector.Shutdown(); | 126 connector.Shutdown(); |
127 } | 127 } |
128 | 128 |
129 } // namespace policy | 129 } // namespace policy |
OLD | NEW |