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 "components/suggestions/suggestions_service.h" | 5 #include "components/suggestions/suggestions_service.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <utility> | 10 #include <utility> |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 suggestion->set_url(kTestUrl); | 111 suggestion->set_url(kTestUrl); |
112 suggestion->set_expiry_ts(kTestSetExpiry); | 112 suggestion->set_expiry_ts(kTestSetExpiry); |
113 | 113 |
114 suggestion = profile.add_suggestions(); | 114 suggestion = profile.add_suggestions(); |
115 suggestion->set_title(kTestTitle); | 115 suggestion->set_title(kTestTitle); |
116 suggestion->set_url(kTestUrl); | 116 suggestion->set_url(kTestUrl); |
117 | 117 |
118 return profile; | 118 return profile; |
119 } | 119 } |
120 | 120 |
121 class MockSyncService : public sync_driver::FakeSyncService { | 121 class MockSyncService : public syncer::FakeSyncService { |
122 public: | 122 public: |
123 MockSyncService() {} | 123 MockSyncService() {} |
124 virtual ~MockSyncService() {} | 124 virtual ~MockSyncService() {} |
125 MOCK_CONST_METHOD0(CanSyncStart, bool()); | 125 MOCK_CONST_METHOD0(CanSyncStart, bool()); |
126 MOCK_CONST_METHOD0(IsSyncActive, bool()); | 126 MOCK_CONST_METHOD0(IsSyncActive, bool()); |
127 MOCK_CONST_METHOD0(ConfigurationDone, bool()); | 127 MOCK_CONST_METHOD0(ConfigurationDone, bool()); |
128 MOCK_CONST_METHOD0(GetActiveDataTypes, syncer::ModelTypeSet()); | 128 MOCK_CONST_METHOD0(GetActiveDataTypes, syncer::ModelTypeSet()); |
129 }; | 129 }; |
130 | 130 |
131 class TestSuggestionsStore : public suggestions::SuggestionsStore { | 131 class TestSuggestionsStore : public suggestions::SuggestionsStore { |
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
744 suggestions_service->GetPageThumbnail(test_url, dummy_callback); | 744 suggestions_service->GetPageThumbnail(test_url, dummy_callback); |
745 | 745 |
746 EXPECT_CALL(*mock_thumbnail_manager_, AddImageURL(test_url, thumbnail_url)); | 746 EXPECT_CALL(*mock_thumbnail_manager_, AddImageURL(test_url, thumbnail_url)); |
747 EXPECT_CALL(*mock_thumbnail_manager_, GetImageForURL(test_url, _)); | 747 EXPECT_CALL(*mock_thumbnail_manager_, GetImageForURL(test_url, _)); |
748 suggestions_service->GetPageThumbnailWithURL(test_url, thumbnail_url, | 748 suggestions_service->GetPageThumbnailWithURL(test_url, thumbnail_url, |
749 dummy_callback); | 749 dummy_callback); |
750 | 750 |
751 } | 751 } |
752 | 752 |
753 } // namespace suggestions | 753 } // namespace suggestions |
OLD | NEW |