OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/ntp_snippets/offline_pages/recent_tab_suggestions_provider.
h" | 5 #include "components/ntp_snippets/offline_pages/recent_tab_suggestions_provider.
h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
12 #include "base/strings/string_number_conversions.h" | 12 #include "base/strings/string_number_conversions.h" |
13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
14 #include "components/ntp_snippets/category.h" | 14 #include "components/ntp_snippets/category.h" |
15 #include "components/ntp_snippets/category_factory.h" | 15 #include "components/ntp_snippets/category_factory.h" |
16 #include "components/ntp_snippets/content_suggestions_provider.h" | 16 #include "components/ntp_snippets/content_suggestions_provider.h" |
17 #include "components/ntp_snippets/mock_content_suggestions_provider_observer.h" | 17 #include "components/ntp_snippets/mock_content_suggestions_provider_observer.h" |
18 #include "components/ntp_snippets/offline_pages/offline_pages_test_utils.h" | 18 #include "components/ntp_snippets/offline_pages/offline_pages_test_utils.h" |
19 #include "components/offline_pages/client_namespace_constants.h" | 19 #include "components/offline_pages/core/client_namespace_constants.h" |
20 #include "components/offline_pages/offline_page_item.h" | 20 #include "components/offline_pages/core/offline_page_item.h" |
21 #include "components/offline_pages/stub_offline_page_model.h" | 21 #include "components/offline_pages/core/stub_offline_page_model.h" |
22 #include "components/prefs/testing_pref_service.h" | 22 #include "components/prefs/testing_pref_service.h" |
23 #include "testing/gmock/include/gmock/gmock.h" | 23 #include "testing/gmock/include/gmock/gmock.h" |
24 #include "testing/gtest/include/gtest/gtest.h" | 24 #include "testing/gtest/include/gtest/gtest.h" |
25 | 25 |
26 using ntp_snippets::test::CaptureDismissedSuggestions; | 26 using ntp_snippets::test::CaptureDismissedSuggestions; |
27 using ntp_snippets::test::FakeOfflinePageModel; | 27 using ntp_snippets::test::FakeOfflinePageModel; |
28 using offline_pages::ClientId; | 28 using offline_pages::ClientId; |
29 using offline_pages::MultipleOfflinePageItemCallback; | 29 using offline_pages::MultipleOfflinePageItemCallback; |
30 using offline_pages::OfflinePageItem; | 30 using offline_pages::OfflinePageItem; |
31 using offline_pages::StubOfflinePageModel; | 31 using offline_pages::StubOfflinePageModel; |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 EXPECT_CALL(*observer(), | 258 EXPECT_CALL(*observer(), |
259 OnNewSuggestions( | 259 OnNewSuggestions( |
260 _, recent_tabs_category(), | 260 _, recent_tabs_category(), |
261 UnorderedElementsAre( | 261 UnorderedElementsAre( |
262 Property(&ContentSuggestion::publish_date, now), | 262 Property(&ContentSuggestion::publish_date, now), |
263 Property(&ContentSuggestion::publish_date, tomorrow)))); | 263 Property(&ContentSuggestion::publish_date, tomorrow)))); |
264 FireOfflinePageModelChanged(offline_pages); | 264 FireOfflinePageModelChanged(offline_pages); |
265 } | 265 } |
266 | 266 |
267 } // namespace ntp_snippets | 267 } // namespace ntp_snippets |
OLD | NEW |