Chromium Code Reviews| Index: chrome/browser/ntp_snippets/download_suggestions_provider_unittest.cc |
| diff --git a/chrome/browser/ntp_snippets/download_suggestions_provider_unittest.cc b/chrome/browser/ntp_snippets/download_suggestions_provider_unittest.cc |
| index b598e1461ff4a0b39fd270b3e770f2c3b6e453e6..2407000424af5b5d7654ea636e0873a3fc00b0b0 100644 |
| --- a/chrome/browser/ntp_snippets/download_suggestions_provider_unittest.cc |
| +++ b/chrome/browser/ntp_snippets/download_suggestions_provider_unittest.cc |
| @@ -766,17 +766,18 @@ TEST_F(DownloadSuggestionsProviderTest, ShouldPruneOfflinePagesDismissedIDs) { |
| GetDummySuggestionId(3, /*is_offline_page=*/true)); |
| EXPECT_THAT(GetDismissedSuggestions(), SizeIs(3)); |
| - // Prune on getting all offline pages. Note that the first suggestion is not |
| - // removed from |offline_pages_model| storage, because otherwise |
| + // Prune on getting all offline pages. Note that the first suggestion is |
| + // added back to the |offline_pages_model| storage, because otherwise |
| // |GetDismissedSuggestions| cannot return it. |
| EXPECT_CALL(*observer(), |
| OnNewSuggestions(_, downloads_category(), IsEmpty())); |
| - // TODO(vitaliii): Add the first suggestion back, so that |
| - // GetDismissedSuggestions can return it. |
| *(offline_pages_model()->mutable_items()) = |
| CreateDummyOfflinePages({2, 3}); |
| FireOfflinePageModelChanged(); |
| + |
| + *(offline_pages_model()->mutable_items()) = |
|
Marc Treib
2016/11/21 12:27:53
Should the "is added back" comment be here?
vitaliii
2016/11/21 14:56:46
Done.
|
| + CreateDummyOfflinePages({1, 2, 3}); |
| EXPECT_THAT(GetDismissedSuggestions(), SizeIs(2)); |
| // Prune when offline page is deleted. |