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

Unified Diff: components/reading_list/ios/reading_list_model_unittest.mm

Issue 2541683003: Clean ReadingListModel. (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « components/reading_list/ios/reading_list_model_observer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/reading_list/ios/reading_list_model_unittest.mm
diff --git a/components/reading_list/ios/reading_list_model_unittest.mm b/components/reading_list/ios/reading_list_model_unittest.mm
index 970bcc46f3e379e30647b06cb71f6857beeaf679..dff2d100dd2abd9a5153b2aa510193ab33214787 100644
--- a/components/reading_list/ios/reading_list_model_unittest.mm
+++ b/components/reading_list/ios/reading_list_model_unittest.mm
@@ -558,38 +558,38 @@ TEST_F(ReadingListModelTest, UpdateDistilledPath) {
TEST_F(ReadingListModelTest, UpdateReadEntryTitle) {
const GURL gurl("http://example.com");
model_->AddEntry(gurl, "sample");
- model_->MarkReadByURL(gurl);
- const ReadingListEntry& entry = model_->GetReadEntryAtIndex(0);
+ model_->SetReadStatus(gurl, true);
+ const ReadingListEntry* entry = model_->GetEntryByURL(gurl);
ClearCounts();
model_->SetEntryTitle(gurl, "ping");
AssertObserverCount(0, 0, 0, 0, 0, 0, 0, 1, 1);
- EXPECT_EQ("ping", entry.Title());
+ EXPECT_EQ("ping", entry->Title());
}
TEST_F(ReadingListModelTest, UpdateReadEntryState) {
const GURL gurl("http://example.com");
model_->AddEntry(gurl, "sample");
- model_->MarkReadByURL(gurl);
- const ReadingListEntry& entry = model_->GetReadEntryAtIndex(0);
+ model_->SetReadStatus(gurl, true);
+ const ReadingListEntry* entry = model_->GetEntryByURL(gurl);
ClearCounts();
model_->SetEntryDistilledState(gurl, ReadingListEntry::PROCESSING);
AssertObserverCount(0, 0, 0, 0, 0, 0, 0, 1, 1);
- EXPECT_EQ(ReadingListEntry::PROCESSING, entry.DistilledState());
+ EXPECT_EQ(ReadingListEntry::PROCESSING, entry->DistilledState());
}
TEST_F(ReadingListModelTest, UpdateReadDistilledPath) {
const GURL gurl("http://example.com");
model_->AddEntry(gurl, "sample");
- model_->MarkReadByURL(gurl);
- const ReadingListEntry& entry = model_->GetReadEntryAtIndex(0);
+ model_->SetReadStatus(gurl, true);
+ const ReadingListEntry* entry = model_->GetEntryByURL(gurl);
ClearCounts();
model_->SetEntryDistilledPath(gurl, base::FilePath("distilled/page.html"));
AssertObserverCount(0, 0, 0, 0, 0, 0, 0, 1, 1);
- EXPECT_EQ(ReadingListEntry::PROCESSED, entry.DistilledState());
- EXPECT_EQ(base::FilePath("distilled/page.html"), entry.DistilledPath());
+ EXPECT_EQ(ReadingListEntry::PROCESSED, entry->DistilledState());
+ EXPECT_EQ(base::FilePath("distilled/page.html"), entry->DistilledPath());
}
// Tests that ReadingListModel calls CallbackModelBeingDeleted when destroyed.
« no previous file with comments | « components/reading_list/ios/reading_list_model_observer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698