Chromium Code Reviews| 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..181824a301f41eff33ceb8bd5c34444dda49140b 100644 |
| --- a/chrome/browser/ssl/ssl_browser_tests.cc |
| +++ b/chrome/browser/ssl/ssl_browser_tests.cc |
| @@ -4980,6 +4980,11 @@ 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 std::string decision_histogram = "interstitial.superfish.decision"; |
|
meacer
2017/06/30 22:53:29
nit: const char kDecisionHistogram[] instead? Same
estark
2017/06/30 23:20:30
Done.
|
| + const std::string interaction_histogram = |
| + "interstitial.superfish.interaction"; |
| + |
| base::test::ScopedFeatureList scoped_feature_list; |
| scoped_feature_list.InitFromCommandLine("SuperfishInterstitial", |
| std::string()); |
| @@ -5001,6 +5006,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(decision_histogram, 1); |
| + histograms.ExpectBucketCount(decision_histogram, |
| + security_interstitials::MetricsHelper::SHOW, 1); |
| + histograms.ExpectTotalCount(interaction_histogram, 1); |
| + histograms.ExpectBucketCount( |
| + interaction_histogram, |
| + security_interstitials::MetricsHelper::TOTAL_VISITS, 1); |
| } |
| // Tests that the Superfish interstitial is not shown when the Finch feature is |