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

Unified Diff: chrome/browser/android/offline_pages/offline_page_utils_unittest.cc

Issue 2535023002: [Offline pages] Fixing OfflinePageUtis::EqualsIgnoringFragment (Closed)
Patch Set: Fixing a previews test 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: chrome/browser/android/offline_pages/offline_page_utils_unittest.cc
diff --git a/chrome/browser/android/offline_pages/offline_page_utils_unittest.cc b/chrome/browser/android/offline_pages/offline_page_utils_unittest.cc
index d666a319737caf56c8a8d09ac3ca9defad69920c..d6a599d866d580962c0500eb0b6e77b4eab0dc64 100644
--- a/chrome/browser/android/offline_pages/offline_page_utils_unittest.cc
+++ b/chrome/browser/android/offline_pages/offline_page_utils_unittest.cc
@@ -262,4 +262,13 @@ TEST_F(OfflinePageUtilsTest, CheckExistenceOfRequestsWithURL) {
EXPECT_TRUE(latest_saved_time.is_null());
}
+TEST_F(OfflinePageUtilsTest, EqualsIgnoringFragment) {
+ EXPECT_TRUE(OfflinePageUtils::EqualsIgnoringFragment(
+ GURL("http://example.com/"), GURL("http://example.com/")));
+ EXPECT_TRUE(OfflinePageUtils::EqualsIgnoringFragment(
jianli 2016/11/28 22:18:56 Please add more coverage like the followings: EX
fgorski 2016/11/28 23:14:50 Done.
+ GURL("http://example.com/"), GURL("http://example.com/#test")));
+ EXPECT_FALSE(OfflinePageUtils::EqualsIgnoringFragment(
+ GURL("http://example.com/"), GURL("http://test.com/#test")));
+}
+
} // namespace offline_pages

Powered by Google App Engine
This is Rietveld 408576698