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

Unified Diff: chrome/browser/ssl/ssl_browser_tests.cc

Issue 2966903002: Specialize Superfish interstitial metrics (Closed)
Patch Set: string -> const char[] Created 3 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 | « chrome/browser/ssl/ssl_blocking_page.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ssl/ssl_browser_tests.cc
diff --git a/chrome/browser/ssl/ssl_browser_tests.cc b/chrome/browser/ssl/ssl_browser_tests.cc
index dbdefe17cda376f58dcdc4810d72c0383430e4ab..1faa1868d4f5173d57993531b2660de287bd6e7e 100644
--- a/chrome/browser/ssl/ssl_browser_tests.cc
+++ b/chrome/browser/ssl/ssl_browser_tests.cc
@@ -4980,6 +4980,10 @@ IN_PROC_BROWSER_TEST_F(SuperfishSSLUITest, NoSuperfishRecorded) {
// Tests that the Superfish interstitial is shown when the Finch feature is
// enabled and the Superfish certificate is present.
IN_PROC_BROWSER_TEST_F(SuperfishSSLUITest, SuperfishInterstitial) {
+ base::HistogramTester histograms;
+ const char kDecisionHistogram[] = "interstitial.superfish.decision";
+ const char kInteractionHistogram[] = "interstitial.superfish.interaction";
+
base::test::ScopedFeatureList scoped_feature_list;
scoped_feature_list.InitFromCommandLine("SuperfishInterstitial",
std::string());
@@ -5001,6 +5005,15 @@ IN_PROC_BROWSER_TEST_F(SuperfishSSLUITest, SuperfishInterstitial) {
l10n_util::GetStringUTF8(IDS_SSL_SUPERFISH_HEADING);
EXPECT_TRUE(chrome_browser_interstitials::IsInterstitialDisplayingText(
interstitial_page, expected_title));
+
+ // Check that the correct histograms were recorded.
+ histograms.ExpectTotalCount(kDecisionHistogram, 1);
+ histograms.ExpectBucketCount(kDecisionHistogram,
+ security_interstitials::MetricsHelper::SHOW, 1);
+ histograms.ExpectTotalCount(kInteractionHistogram, 1);
+ histograms.ExpectBucketCount(
+ kInteractionHistogram,
+ security_interstitials::MetricsHelper::TOTAL_VISITS, 1);
}
// Tests that the Superfish interstitial is not shown when the Finch feature is
« no previous file with comments | « chrome/browser/ssl/ssl_blocking_page.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698