Chromium Code Reviews| Index: components/ntp_snippets/content_suggestions_service_unittest.cc |
| diff --git a/components/ntp_snippets/content_suggestions_service_unittest.cc b/components/ntp_snippets/content_suggestions_service_unittest.cc |
| index bf3f4a4d321a653b19fc67daf6c7d918b5c16f74..39f5716c5437e0add925c5cfc115164480c4ae06 100644 |
| --- a/components/ntp_snippets/content_suggestions_service_unittest.cc |
| +++ b/components/ntp_snippets/content_suggestions_service_unittest.cc |
| @@ -100,6 +100,7 @@ class MockProvider : public ContentSuggestionsProvider { |
| observer()->OnSuggestionInvalidated(this, category, suggestion_id); |
| } |
| + MOCK_METHOD0(ClearHistory, void()); |
| MOCK_METHOD1(ClearCachedSuggestions, void(Category category)); |
| MOCK_METHOD2(GetDismissedSuggestionsForDebugging, |
| void(Category category, |
| @@ -567,4 +568,11 @@ TEST_F(ContentSuggestionsServiceTest, ShouldPutBookmarksAtEndIfEmpty) { |
| EXPECT_THAT(service()->GetCategories(), ElementsAre(remote, bookmarks)); |
| } |
| +TEST_F(ContentSuggestionsServiceTest, ShouldRemoveHistory) { |
|
Marc Treib
2016/08/29 09:43:11
ShouldForwardClearHistory? The service doesn't rea
vitaliii
2016/08/29 10:37:25
Done.
|
| + Category category = FromKnownCategory(KnownCategories::DOWNLOADS); |
| + MockProvider* provider = RegisterProvider(category); |
| + EXPECT_CALL(*provider, ClearHistory()); |
| + service()->ClearHistory(); |
| +} |
| + |
| } // namespace ntp_snippets |