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

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

Issue 2535023002: [Offline pages] Fixing OfflinePageUtis::EqualsIgnoringFragment (Closed)
Patch Set: Addressing feedback 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..6ed1c4c042ff2431f887280f35b049b35685b886 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,17 @@ 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(
+ GURL("http://example.com/"), GURL("http://example.com/#test")));
+ EXPECT_TRUE(OfflinePageUtils::EqualsIgnoringFragment(
+ GURL("http://example.com/#test"), GURL("http://example.com/")));
+ EXPECT_TRUE(OfflinePageUtils::EqualsIgnoringFragment(
+ GURL("http://example.com/#test"), GURL("http://example.com/#test2")));
+ 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