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

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

Issue 2647763005: Store the distilled_url in Reading List entry in Reading List on iOS. (Closed)
Patch Set: 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
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 563c1c378736ba0c2f1af6fb861202b915c0f10c..c80d96c5c805f5d2160c2edc46fdf9089698f862 100644
--- a/components/reading_list/ios/reading_list_model_unittest.mm
+++ b/components/reading_list/ios/reading_list_model_unittest.mm
@@ -375,8 +375,10 @@ TEST_F(ReadingListModelTest, SyncMergeEntry) {
SetStorage(std::move(storage));
model_->AddEntry(GURL("http://example.com"), "sample",
reading_list::ADDED_VIA_CURRENT_APP);
- model_->SetEntryDistilledPath(GURL("http://example.com"),
- base::FilePath("distilled/page.html"));
+ const base::FilePath distilled_path("distilled/page.html");
+ const GURL distilled_url("http://example.com/distilled");
+ model_->SetEntryDistilledInfo(GURL("http://example.com"), distilled_path,
+ distilled_url);
const ReadingListEntry* local_entry =
model_->GetEntryByURL(GURL("http://example.com"));
int64_t local_update_time = local_entry->UpdateTime();
@@ -605,7 +607,10 @@ TEST_F(ReadingListModelTest, UpdateDistilledPath) {
model_->AddEntry(gurl, "sample", reading_list::ADDED_VIA_CURRENT_APP);
ClearCounts();
- model_->SetEntryDistilledPath(gurl, base::FilePath("distilled/page.html"));
+ const base::FilePath distilled_path("distilled/page.html");
+ const GURL distilled_url("http://example.com/distilled");
+ model_->SetEntryDistilledInfo(GURL("http://example.com"), distilled_path,
+ distilled_url);
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());
gambard 2017/01/20 14:01:25 Add test for the distilled url.
Olivier 2017/01/20 14:43:51 Done.
@@ -642,7 +647,10 @@ TEST_F(ReadingListModelTest, UpdateReadDistilledPath) {
const ReadingListEntry* entry = model_->GetEntryByURL(gurl);
ClearCounts();
- model_->SetEntryDistilledPath(gurl, base::FilePath("distilled/page.html"));
+ const base::FilePath distilled_path("distilled/page.html");
+ const GURL distilled_url("http://example.com/distilled");
+ model_->SetEntryDistilledInfo(GURL("http://example.com"), distilled_path,
+ distilled_url);
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());
gambard 2017/01/20 14:01:24 Add test for distilled url.
Olivier 2017/01/20 14:43:51 Done.

Powered by Google App Engine
This is Rietveld 408576698