Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2106)

Unified Diff: chrome/browser/ntp_snippets/download_suggestions_provider_unittest.cc

Issue 2513393002: [NTP] Cleanup: offline pages related tests. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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.

Powered by Google App Engine
This is Rietveld 408576698