Index: chrome/browser/metrics/rappor/sampling_unittest.cc |
diff --git a/chrome/browser/metrics/rappor/sampling_unittest.cc b/chrome/browser/metrics/rappor/sampling_unittest.cc |
index fdaa1ab777afaa972ee6439588173fa6a23116bf..03c967b80bc3f373e3ef2a9d01c994c2d0ca1e93 100644 |
--- a/chrome/browser/metrics/rappor/sampling_unittest.cc |
+++ b/chrome/browser/metrics/rappor/sampling_unittest.cc |
@@ -19,6 +19,14 @@ TEST(RapporSamplingTest, GetDomainAndRegistrySampleFromGURLTest) { |
GURL("chrome-extension://abc1234/foo.html"))); |
EXPECT_EQ("chrome-search://local-ntp", GetDomainAndRegistrySampleFromGURL( |
GURL("chrome-search://local-ntp/local-ntp.html"))); |
+ EXPECT_EQ("localhost", GetDomainAndRegistrySampleFromGURL( |
+ GURL("http://localhost:8000/foo.html"))); |
+ EXPECT_EQ("localhost", GetDomainAndRegistrySampleFromGURL( |
+ GURL("http://127.0.0.1/foo.html"))); |
+ EXPECT_EQ("ip_address", GetDomainAndRegistrySampleFromGURL( |
+ GURL("http://192.168.0.1/foo.html"))); |
+ EXPECT_EQ("ip_address", GetDomainAndRegistrySampleFromGURL( |
+ GURL("http://[2001:db8::1]/"))); |
Nathan Parker
2015/02/18 21:56:46
While you're here, add two more:
http://www/ -->
Steven Holte
2015/02/19 23:42:19
Done, but http://www.corp/ --> "www.corp"
|
} |
// Make sure recording a sample during tests, when the Rappor service is NULL, |