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

Unified Diff: components/autofill/core/browser/autofill_metrics_unittest.cc

Issue 2773433002: Log observations of explicit UPI-VPA autocomplete hints. (Closed)
Patch Set: Initial CL Created 3 years, 9 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: components/autofill/core/browser/autofill_metrics_unittest.cc
diff --git a/components/autofill/core/browser/autofill_metrics_unittest.cc b/components/autofill/core/browser/autofill_metrics_unittest.cc
index efea6e76cab0aafd11a2a5053fff1cb525bda757..01b1b23e3aae8ac840727cace9647988b5305068 100644
--- a/components/autofill/core/browser/autofill_metrics_unittest.cc
+++ b/components/autofill/core/browser/autofill_metrics_unittest.cc
@@ -4366,6 +4366,18 @@ TEST_F(AutofillMetricsTest,
}
}
+// Tests that logging an explicit UPI-VPA hint works as expected.
+TEST_F(AutofillMetricsTest, LogExplicitUpiVpaHint) {
+ constexpr int kNumHints = 5;
+ base::HistogramTester histograms;
+ for (int i = 0; i < kNumHints; ++i)
+ AutofillMetrics::LogExplicitUpiVpaHint();
+ histograms.ExpectBucketCount("Autofill.ExplicitUpiVpaHint",
+ static_cast<int>(false), 0);
+ histograms.ExpectBucketCount("Autofill.ExplicitUpiVpaHint",
+ static_cast<int>(true), kNumHints);
+}
+
// Tests that logging a UKM works as expected.
TEST_F(AutofillMetricsTest, RecordCardUploadDecisionMetric) {
EnableUkmLogging();

Powered by Google App Engine
This is Rietveld 408576698