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

Unified Diff: components/reading_list/core/reading_list_model_unittest.cc

Issue 2806213004: Track if a ReadingListEntry has been dismissed (Closed)
Patch Set: Address comment Created 3 years, 8 months 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: components/reading_list/core/reading_list_model_unittest.cc
diff --git a/components/reading_list/core/reading_list_model_unittest.cc b/components/reading_list/core/reading_list_model_unittest.cc
index ee00dc7704867272c65c90b6214457ddf3e72eee..a2b2b57fe4634fde0e989f6a97ed6bafd7cb0e2b 100644
--- a/components/reading_list/core/reading_list_model_unittest.cc
+++ b/components/reading_list/core/reading_list_model_unittest.cc
@@ -708,6 +708,21 @@ TEST_F(ReadingListModelTest, UpdateReadDistilledInfo) {
entry->DistillationTime());
}
+// Tests setting ContentSuggestionsExtra info on entry.
+TEST_F(ReadingListModelTest, UpdateContentSuggestionsExtra) {
+ const GURL gurl("http://example.com");
+ model_->AddEntry(gurl, "sample", reading_list::ADDED_VIA_CURRENT_APP);
+ const ReadingListEntry* entry = model_->GetEntryByURL(gurl);
+ ClearCounts();
+
+ reading_list::ContentSuggestionsExtra extra;
+ extra.dismissed = true;
+
+ model_->SetContentSuggestionsExtra(gurl, extra);
+ AssertObserverCount(0, 0, 0, 0, 0, 0, 0, 1, 1);
+ EXPECT_EQ(extra.dismissed, entry->ContentSuggestionsExtra()->dismissed);
+}
+
// Tests that ReadingListModel calls CallbackModelBeingDeleted when destroyed.
TEST_F(ReadingListModelTest, CallbackModelBeingDeleted) {
AssertObserverCount(1, 0, 0, 0, 0, 0, 0, 0, 0);

Powered by Google App Engine
This is Rietveld 408576698