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

Unified Diff: components/history/core/browser/url_utils_unittest.cc

Issue 1179953005: Add History.TopHostsVisitsByRank UMA metric. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@is_allowed
Patch Set: Make History.TopHostsVisitsByRank 1-based again. Created 5 years, 6 months 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: 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")));
sky 2015/07/01 16:53:33 You should add a variant that has mixed case, eg h
twifkak 2015/07/01 19:58:40 Done.
+}
+
} // namespace
} // namespace history

Powered by Google App Engine
This is Rietveld 408576698