Index: components/history/core/browser/url_utils_unittest.cc |
diff --git a/components/history/core/browser/url_utils_unittest.cc b/components/history/core/browser/url_utils_unittest.cc |
index 184bd66552fbf5a1c4c982001cf0ca8d1cb58a43..4f145c117df6749e89a5e58359382e635ccd4bd8 100644 |
--- a/components/history/core/browser/url_utils_unittest.cc |
+++ b/components/history/core/browser/url_utils_unittest.cc |
@@ -126,6 +126,12 @@ TEST(HistoryUrlUtilsTest, ToggleHTTPAndHTTPS) { |
ToggleHTTPAndHTTPS(GURL("ftp://www.google.com/"))); |
} |
+TEST(HistoryUrlUtilsTest, HostForTopHosts) { |
+ EXPECT_EQ("foo.com", HostForTopHosts(GURL("https://foo.com/bar"))); |
+ EXPECT_EQ("foo.com", HostForTopHosts(GURL("http://foo.com:999/bar"))); |
+ EXPECT_EQ("foo.com", HostForTopHosts(GURL("http://www.foo.com/bar"))); |
+} |
+ |
} // namespace |
} // namespace history |