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

Unified Diff: content/renderer/render_thread_impl_unittest.cc

Issue 1399853004: Collect separate V8 histograms for Top10 non-Google sites (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added UnitTests + Reformatted code Created 5 years, 2 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: content/renderer/render_thread_impl_unittest.cc
diff --git a/content/renderer/render_thread_impl_unittest.cc b/content/renderer/render_thread_impl_unittest.cc
index 659eba4410ef8f447565d639ce88aca3d93ccbd3..25a0a1a75d34369037a94ec591910b212b938ca9 100644
--- a/content/renderer/render_thread_impl_unittest.cc
+++ b/content/renderer/render_thread_impl_unittest.cc
@@ -80,4 +80,20 @@ TEST_F(RenderThreadImplUnittest, CustomHistogramsForTwoRenderViews) {
kCustomizableHistogram_));
}
+TEST_F(RenderThreadImplUnittest, IdentifyAlexaTop10NonGoogleSite) {
+ EXPECT_EQ(true,
+ histogram_customizer_.IsAlexaTop10NonGoogleSite("www.amazon.de"));
+ EXPECT_EQ(true, histogram_customizer_.IsAlexaTop10NonGoogleSite("amazon.de"));
+ EXPECT_EQ(true,
+ histogram_customizer_.IsAlexaTop10NonGoogleSite("amazon.co.uk"));
+ EXPECT_EQ(true, histogram_customizer_.IsAlexaTop10NonGoogleSite(
+ "jp.wikipedia.org"));
+ EXPECT_EQ(true, histogram_customizer_.IsAlexaTop10NonGoogleSite(
+ "www.facebook.com"));
+ EXPECT_EQ(false, histogram_customizer_.IsAlexaTop10NonGoogleSite(""));
+ EXPECT_EQ(false,
+ histogram_customizer_.IsAlexaTop10NonGoogleSite("www.google.com"));
+ EXPECT_EQ(false, histogram_customizer_.IsAlexaTop10NonGoogleSite("madeup"));
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698