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 "chrome/browser/chromeos/policy/cloud_external_data_policy_observer.h" | 5 #include "chrome/browser/chromeos/policy/cloud_external_data_policy_observer.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 #include "components/policy/core/common/cloud/cloud_policy_core.h" | 36 #include "components/policy/core/common/cloud/cloud_policy_core.h" |
37 #include "components/policy/core/common/cloud/cloud_policy_store.h" | 37 #include "components/policy/core/common/cloud/cloud_policy_store.h" |
38 #include "components/policy/core/common/cloud/mock_cloud_external_data_manager.h
" | 38 #include "components/policy/core/common/cloud/mock_cloud_external_data_manager.h
" |
39 #include "components/policy/core/common/cloud/policy_builder.h" | 39 #include "components/policy/core/common/cloud/policy_builder.h" |
40 #include "components/policy/core/common/external_data_fetcher.h" | 40 #include "components/policy/core/common/external_data_fetcher.h" |
41 #include "components/policy/core/common/mock_configuration_policy_provider.h" | 41 #include "components/policy/core/common/mock_configuration_policy_provider.h" |
42 #include "components/policy/core/common/policy_map.h" | 42 #include "components/policy/core/common/policy_map.h" |
43 #include "components/policy/core/common/policy_service.h" | 43 #include "components/policy/core/common/policy_service.h" |
44 #include "components/policy/core/common/policy_service_impl.h" | 44 #include "components/policy/core/common/policy_service_impl.h" |
45 #include "components/policy/core/common/policy_types.h" | 45 #include "components/policy/core/common/policy_types.h" |
| 46 #include "components/policy/policy_constants.h" |
| 47 #include "components/policy/proto/cloud_policy.pb.h" |
46 #include "content/public/browser/notification_details.h" | 48 #include "content/public/browser/notification_details.h" |
47 #include "content/public/browser/notification_service.h" | 49 #include "content/public/browser/notification_service.h" |
48 #include "content/public/browser/notification_source.h" | 50 #include "content/public/browser/notification_source.h" |
49 #include "net/url_request/test_url_fetcher_factory.h" | 51 #include "net/url_request/test_url_fetcher_factory.h" |
50 #include "net/url_request/url_fetcher_delegate.h" | 52 #include "net/url_request/url_fetcher_delegate.h" |
51 #include "net/url_request/url_request_context_getter.h" | 53 #include "net/url_request/url_request_context_getter.h" |
52 #include "net/url_request/url_request_status.h" | 54 #include "net/url_request/url_request_status.h" |
53 #include "policy/policy_constants.h" | |
54 #include "policy/proto/cloud_policy.pb.h" | |
55 #include "testing/gmock/include/gmock/gmock.h" | 55 #include "testing/gmock/include/gmock/gmock.h" |
56 #include "testing/gtest/include/gtest/gtest.h" | 56 #include "testing/gtest/include/gtest/gtest.h" |
57 #include "url/gurl.h" | 57 #include "url/gurl.h" |
58 | 58 |
59 namespace em = enterprise_management; | 59 namespace em = enterprise_management; |
60 | 60 |
61 using ::testing::Mock; | 61 using ::testing::Mock; |
62 using ::testing::Return; | 62 using ::testing::Return; |
63 using ::testing::SaveArg; | 63 using ::testing::SaveArg; |
64 using ::testing::_; | 64 using ::testing::_; |
(...skipping 884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
949 | 949 |
950 EXPECT_TRUE(set_calls_.empty()); | 950 EXPECT_TRUE(set_calls_.empty()); |
951 EXPECT_TRUE(cleared_calls_.empty()); | 951 EXPECT_TRUE(cleared_calls_.empty()); |
952 ASSERT_EQ(1u, fetched_calls_.size()); | 952 ASSERT_EQ(1u, fetched_calls_.size()); |
953 EXPECT_EQ(kRegularUserID, fetched_calls_.front().first); | 953 EXPECT_EQ(kRegularUserID, fetched_calls_.front().first); |
954 EXPECT_EQ(avatar_policy_2_data_, fetched_calls_.front().second); | 954 EXPECT_EQ(avatar_policy_2_data_, fetched_calls_.front().second); |
955 ClearObservations(); | 955 ClearObservations(); |
956 } | 956 } |
957 | 957 |
958 } // namespace policy | 958 } // namespace policy |
OLD | NEW |