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

Unified Diff: components/reading_list/ios/reading_list_entry_unittest.cc

Issue 2558183004: Add merge rules for first read time (Closed)
Patch Set: =0 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_entry.cc ('k') | components/reading_list/ios/reading_list_store.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/reading_list/ios/reading_list_entry_unittest.cc
diff --git a/components/reading_list/ios/reading_list_entry_unittest.cc b/components/reading_list/ios/reading_list_entry_unittest.cc
index 0157f4c694bad889a8b7ce7f945a6bfc22179801..bf9dec3986a62ed8970a7e7ce9d65e90988f887f 100644
--- a/components/reading_list/ios/reading_list_entry_unittest.cc
+++ b/components/reading_list/ios/reading_list_entry_unittest.cc
@@ -317,6 +317,8 @@ TEST(ReadingListEntry, FromReadingListLocal) {
}
// Tests the merging of two ReadingListEntry.
+// Additional merging tests are done in
+// ReadingListStoreTest.CompareEntriesForSync
TEST(ReadingListEntry, MergeWithEntry) {
ReadingListEntry local_entry(GURL("http://example.com/"), "title");
local_entry.SetDistilledState(ReadingListEntry::ERROR);
@@ -339,24 +341,3 @@ TEST(ReadingListEntry, MergeWithEntry) {
base::TimeDelta delta = merge_next_call - next_call;
EXPECT_NEAR(delta.InMillisecondsRoundedUp(), 0, 10);
}
-
-// Tests the merging of two ReadingListEntry, the oldest one SEEN and the newer
-// UNSEEN.
-TEST(ReadingListEntry, MergeWithEntrySeen) {
- ReadingListEntry local_entry(GURL("http://example.com/"), "title");
- local_entry.SetRead(true);
- int64_t local_update_time_us = local_entry.UpdateTime();
- local_entry.SetDistilledPath(base::FilePath("distilled/page.html"));
-
- ReadingListEntry sync_entry(GURL("http://example.com/"), "title2");
- int64_t sync_update_time_us = sync_entry.UpdateTime();
- EXPECT_NE(local_update_time_us, sync_update_time_us);
- local_entry.MergeWithEntry(sync_entry);
- EXPECT_EQ(local_entry.URL().spec(), "http://example.com/");
- EXPECT_EQ(local_entry.Title(), "title2");
- EXPECT_TRUE(local_entry.HasBeenSeen());
- EXPECT_EQ(local_entry.UpdateTime(), sync_update_time_us);
- EXPECT_EQ(local_entry.FailedDownloadCounter(), 0);
- EXPECT_EQ(local_entry.DistilledState(), ReadingListEntry::PROCESSED);
- EXPECT_EQ(local_entry.DistilledPath().value(), "distilled/page.html");
-}
« no previous file with comments | « components/reading_list/ios/reading_list_entry.cc ('k') | components/reading_list/ios/reading_list_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698