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

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

Issue 2542503002: [Offline pages] Fixing OfflinePageUtis::EqualsIgnoringFragment (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: 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 80772e7944261d6ecc7a0dac047779f77c83ef8d..03d1d459cff0a3e198aefc152152c56ad3b1af29 100644
--- a/chrome/browser/android/offline_pages/offline_page_utils_unittest.cc
+++ b/chrome/browser/android/offline_pages/offline_page_utils_unittest.cc
@@ -200,4 +200,17 @@ TEST_F(OfflinePageUtilsTest, CheckExistenceOfPagesWithURL) {
EXPECT_FALSE(page_exists);
}
+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