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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 EXPECT_THAT(ReadDismissedIDsFromPrefs(), SizeIs(2)); | 234 EXPECT_THAT(ReadDismissedIDsFromPrefs(), SizeIs(2)); |
235 | 235 |
236 FireOfflinePageModelChanged(CreateDummyRecentTabs({2})); | 236 FireOfflinePageModelChanged(CreateDummyRecentTabs({2})); |
237 EXPECT_THAT(ReadDismissedIDsFromPrefs(), SizeIs(1)); | 237 EXPECT_THAT(ReadDismissedIDsFromPrefs(), SizeIs(1)); |
238 | 238 |
239 FireOfflinePageModelChanged(std::vector<OfflinePageItem>()); | 239 FireOfflinePageModelChanged(std::vector<OfflinePageItem>()); |
240 EXPECT_THAT(ReadDismissedIDsFromPrefs(), IsEmpty()); | 240 EXPECT_THAT(ReadDismissedIDsFromPrefs(), IsEmpty()); |
241 } | 241 } |
242 | 242 |
243 } // namespace ntp_snippets | 243 } // namespace ntp_snippets |
OLD | NEW |