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

Side by Side 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: Changed UnitTests so they don't need to convert bool Created 5 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/render_thread_impl.h" 5 #include "content/renderer/render_thread_impl.h"
6 #include "testing/gtest/include/gtest/gtest.h" 6 #include "testing/gtest/include/gtest/gtest.h"
7 7
8 #include <string> 8 #include <string>
9 9
10 namespace content { 10 namespace content {
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 histogram_customizer_.ConvertToCustomHistogramName( 73 histogram_customizer_.ConvertToCustomHistogramName(
74 kCustomizableHistogram_)); 74 kCustomizableHistogram_));
75 // After this point, there will never be a custom diagram again, even if the 75 // After this point, there will never be a custom diagram again, even if the
76 // view navigated back to the common host. 76 // view navigated back to the common host.
77 histogram_customizer_.RenderViewNavigatedToHost("mail.google.com", 2); 77 histogram_customizer_.RenderViewNavigatedToHost("mail.google.com", 2);
78 EXPECT_EQ(kCustomizableHistogram_, 78 EXPECT_EQ(kCustomizableHistogram_,
79 histogram_customizer_.ConvertToCustomHistogramName( 79 histogram_customizer_.ConvertToCustomHistogramName(
80 kCustomizableHistogram_)); 80 kCustomizableHistogram_));
81 } 81 }
82 82
83 TEST_F(RenderThreadImplUnittest, IdentifyAlexaTop10NonGoogleSite) {
84 EXPECT_TRUE(histogram_customizer_.IsAlexaTop10NonGoogleSite("www.amazon.de"));
85 EXPECT_TRUE(histogram_customizer_.IsAlexaTop10NonGoogleSite("amazon.de"));
86 EXPECT_TRUE(histogram_customizer_.IsAlexaTop10NonGoogleSite("amazon.co.uk"));
87 EXPECT_TRUE(
88 histogram_customizer_.IsAlexaTop10NonGoogleSite("jp.wikipedia.org"));
89 EXPECT_TRUE(
90 histogram_customizer_.IsAlexaTop10NonGoogleSite("www.facebook.com"));
91 EXPECT_FALSE(histogram_customizer_.IsAlexaTop10NonGoogleSite(""));
92 EXPECT_FALSE(
93 histogram_customizer_.IsAlexaTop10NonGoogleSite("www.google.com"));
94 EXPECT_FALSE(histogram_customizer_.IsAlexaTop10NonGoogleSite("madeup"));
95 }
96
83 } // namespace content 97 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698