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

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

Issue 2491383002: Use Distilled path instead of DistilledURL. (Closed)
Patch Set: 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..14614222b6cb1076b6fbaeb4325e78fa578aedaa 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, DistilledPath) {
gambard 2016/11/10 16:07:08 Maybe add a test for DistilledURL?
Olivier 2016/11/10 16:49:10 I test DistilledURL in the DistilledPath test. Do
gambard 2016/11/10 16:54:35 No, it is OK I did not see it. Maybe update the te
Olivier 2016/11/14 16:43:22 Done.
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());

Powered by Google App Engine
This is Rietveld 408576698