Index: ios/chrome/browser/reading_list/reading_list_model_unittest.cc |
diff --git a/ios/chrome/browser/reading_list/reading_list_model_unittest.cc b/ios/chrome/browser/reading_list/reading_list_model_unittest.cc |
index 9423250538f4a221e1b36de506fbd18afe3fbb4d..edc4c99d919ee5379c2bef34f9d54afdec2a44ab 100644 |
--- a/ios/chrome/browser/reading_list/reading_list_model_unittest.cc |
+++ b/ios/chrome/browser/reading_list/reading_list_model_unittest.cc |
@@ -334,4 +334,21 @@ TEST_F(ReadingListModelTest, CallbackEntryURLNotPresent) { |
EXPECT_FALSE(CallbackCalled()); |
} |
+TEST_F(ReadingListModelTest, EntryStateByURL) { |
+ // Setup. |
+ const GURL not_present("http://not.present"); |
+ const GURL unread("http://foo.bar"); |
+ model_->AddEntry(unread, "sample"); |
+ const GURL read("http://example.com"); |
+ model_->AddEntry(read, "sample"); |
+ model_->MarkReadByURL(read); |
+ |
+ // Action/Test. |
+ EXPECT_EQ(ReadingListModel::EntryState::READ, model_->EntryStateByURL(read)); |
+ EXPECT_EQ(ReadingListModel::EntryState::UNREAD, |
+ model_->EntryStateByURL(unread)); |
+ EXPECT_EQ(ReadingListModel::EntryState::NOT_PRESENT, |
+ model_->EntryStateByURL(not_present)); |
+} |
+ |
} // namespace |