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

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: Use HistogramTester to eliminate test brittleness. 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
« no previous file with comments | « components/history/core/browser/url_utils.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « components/history/core/browser/url_utils.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698