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

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

Issue 2647763005: Store the distilled_url in Reading List entry in Reading List on iOS. (Closed)
Patch Set: feedback Created 3 years, 11 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
« no previous file with comments | « components/reading_list/ios/reading_list_entry.cc ('k') | components/reading_list/ios/reading_list_model.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 84bcf5d45febb4f108d0d6376347d12875a1c2b5..7afd3aebe0396b04ef101f9927e186765c1ad108 100644
--- a/components/reading_list/ios/reading_list_entry_unittest.cc
+++ b/components/reading_list/ios/reading_list_entry_unittest.cc
@@ -75,8 +75,10 @@ TEST(ReadingListEntry, DistilledPathAndURL) {
EXPECT_TRUE(e.DistilledPath().empty());
const base::FilePath distilled_path("distilled/page.html");
- e.SetDistilledPath(distilled_path);
+ const GURL distilled_url("http://example.com/distilled");
+ e.SetDistilledInfo(distilled_path, distilled_url);
EXPECT_EQ(distilled_path, e.DistilledPath());
+ EXPECT_EQ(distilled_url, e.DistilledURL());
}
TEST(ReadingListEntry, DistilledState) {
@@ -88,7 +90,8 @@ TEST(ReadingListEntry, DistilledState) {
EXPECT_EQ(ReadingListEntry::ERROR, e.DistilledState());
const base::FilePath distilled_path("distilled/page.html");
- e.SetDistilledPath(distilled_path);
+ const GURL distilled_url("http://example.com/distilled");
+ e.SetDistilledInfo(distilled_path, distilled_url);
EXPECT_EQ(ReadingListEntry::PROCESSED, e.DistilledState());
}
@@ -180,7 +183,9 @@ TEST(ReadingListEntry, ResetTimeUntilNextTry) {
kFirstBackoff * fuzzing);
// Action.
- e.SetDistilledPath(base::FilePath("distilled/page.html"));
+ const base::FilePath distilled_path("distilled/page.html");
+ const GURL distilled_url("http://example.com/distilled");
+ e.SetDistilledInfo(distilled_path, distilled_url);
// Test.
EXPECT_EQ(0, e.TimeUntilNextTry().InSeconds());
@@ -281,7 +286,9 @@ TEST(ReadingListEntry, AsReadingListLocal) {
reading_list::ReadingListLocal::WILL_RETRY);
EXPECT_EQ(will_retry_pb_entry->failed_download_counter(), 1);
- entry.SetDistilledPath(base::FilePath("distilled/page.html"));
+ const base::FilePath distilled_path("distilled/page.html");
+ const GURL distilled_url("http://example.com/distilled");
+ entry.SetDistilledInfo(distilled_path, distilled_url);
entry.SetRead(true);
entry.MarkEntryUpdated();
EXPECT_NE(entry.UpdateTime(), creation_time_us);
« no previous file with comments | « components/reading_list/ios/reading_list_entry.cc ('k') | components/reading_list/ios/reading_list_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698