OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "components/policy/core/common/forwarding_policy_provider.h" | 5 #include "components/policy/core/common/forwarding_policy_provider.h" |
6 | 6 |
| 7 #include <string> |
| 8 |
7 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
8 #include "base/values.h" | 10 #include "base/values.h" |
9 #include "components/policy/core/common/mock_configuration_policy_provider.h" | 11 #include "components/policy/core/common/mock_configuration_policy_provider.h" |
10 #include "components/policy/core/common/policy_bundle.h" | 12 #include "components/policy/core/common/policy_bundle.h" |
11 #include "components/policy/core/common/policy_map.h" | 13 #include "components/policy/core/common/policy_map.h" |
12 #include "components/policy/core/common/policy_types.h" | 14 #include "components/policy/core/common/policy_types.h" |
13 #include "components/policy/core/common/schema.h" | 15 #include "components/policy/core/common/schema.h" |
14 #include "components/policy/core/common/schema_registry.h" | 16 #include "components/policy/core/common/schema_registry.h" |
15 #include "testing/gmock/include/gmock/gmock.h" | 17 #include "testing/gmock/include/gmock/gmock.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 | 226 |
225 EXPECT_CALL(observer_, OnUpdatePolicy(_)); | 227 EXPECT_CALL(observer_, OnUpdatePolicy(_)); |
226 copy.reset(new PolicyBundle); | 228 copy.reset(new PolicyBundle); |
227 copy->CopyFrom(platform_policy); | 229 copy->CopyFrom(platform_policy); |
228 mock_provider_.UpdatePolicy(copy.Pass()); | 230 mock_provider_.UpdatePolicy(copy.Pass()); |
229 Mock::VerifyAndClearExpectations(&observer_); | 231 Mock::VerifyAndClearExpectations(&observer_); |
230 EXPECT_TRUE(forwarding_provider_.policies().Equals(platform_policy)); | 232 EXPECT_TRUE(forwarding_provider_.policies().Equals(platform_policy)); |
231 } | 233 } |
232 | 234 |
233 } // namespace policy | 235 } // namespace policy |
OLD | NEW |