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

Unified Diff: ios/chrome/browser/reading_list/reading_list_entry_unittest.cc

Issue 2491383002: Use Distilled path instead of DistilledURL. (Closed)
Patch Set: fix compilation Created 4 years, 1 month 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: ios/chrome/browser/reading_list/reading_list_entry_unittest.cc
diff --git a/ios/chrome/browser/reading_list/reading_list_entry_unittest.cc b/ios/chrome/browser/reading_list/reading_list_entry_unittest.cc
index 73b48bcdda2b1cf03558aa81f614d54ea12da6b3..efdb0bc31ad5d6e20bbe3d6ff32c29be5679304b 100644
--- a/ios/chrome/browser/reading_list/reading_list_entry_unittest.cc
+++ b/ios/chrome/browser/reading_list/reading_list_entry_unittest.cc
@@ -42,14 +42,15 @@ TEST(ReadingListEntry, MovesAreEquals) {
EXPECT_EQ(e3.Title(), e2.Title());
}
-TEST(ReadingListEntry, DistilledURL) {
+TEST(ReadingListEntry, DistilledPathAndURL) {
ReadingListEntry e(GURL("http://example.com"), "bar");
EXPECT_FALSE(e.DistilledURL().is_valid());
- const GURL distilled_url("http://distilled.example.com");
- e.SetDistilledURL(distilled_url);
- EXPECT_EQ(distilled_url, e.DistilledURL());
+ const base::FilePath distilled_path("distilled/page.html");
+ e.SetDistilledPath(distilled_path);
+ EXPECT_EQ(distilled_path, e.DistilledPath());
+ EXPECT_EQ(GURL("chrome://offline/distilled/page.html"), e.DistilledURL());
}
TEST(ReadingListEntry, DistilledState) {
@@ -60,8 +61,8 @@ TEST(ReadingListEntry, DistilledState) {
e.SetDistilledState(ReadingListEntry::ERROR);
EXPECT_EQ(ReadingListEntry::ERROR, e.DistilledState());
- const GURL distilled_url("http://distilled.example.com");
- e.SetDistilledURL(distilled_url);
+ const base::FilePath distilled_path("distilled/page.html");
+ e.SetDistilledPath(distilled_path);
EXPECT_EQ(ReadingListEntry::PROCESSED, e.DistilledState());
}
@@ -153,7 +154,7 @@ TEST(ReadingListEntry, ResetTimeUntilNextTry) {
kFirstBackoff * fuzzing);
// Action.
- e.SetDistilledURL(GURL("http://example.com"));
+ e.SetDistilledPath(base::FilePath("distilled/page.html"));
// Test.
EXPECT_EQ(0, e.TimeUntilNextTry().InSeconds());
« no previous file with comments | « ios/chrome/browser/reading_list/reading_list_entry.cc ('k') | ios/chrome/browser/reading_list/reading_list_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698