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

Unified Diff: chrome/browser/ui/views/payments/payment_request_completion_status_metrics_browsertest.cc

Issue 2943433004: [Payments] Log multiple events in the journey logger. (Closed)
Patch Set: addressed comment 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 | « no previous file | chrome/browser/ui/views/payments/payment_request_journey_logger_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/payments/payment_request_completion_status_metrics_browsertest.cc
diff --git a/chrome/browser/ui/views/payments/payment_request_completion_status_metrics_browsertest.cc b/chrome/browser/ui/views/payments/payment_request_completion_status_metrics_browsertest.cc
index a72b89e4fe359a8370d3a07c650c863708dbcd5a..08ad90c8b68862a6ca996e1f8db0b161668a5e9b 100644
--- a/chrome/browser/ui/views/payments/payment_request_completion_status_metrics_browsertest.cc
+++ b/chrome/browser/ui/views/payments/payment_request_completion_status_metrics_browsertest.cc
@@ -51,6 +51,14 @@ IN_PROC_BROWSER_TEST_F(PaymentRequestCompletionStatusMetricsTest, Completed) {
PayWithCreditCardAndWait(base::ASCIIToUTF16("123"));
// Make sure the metrics are logged correctly.
+ histogram_tester.ExpectUniqueSample("PaymentRequest.CheckoutFunnel.Initiated",
+ 1, 1);
+ histogram_tester.ExpectUniqueSample("PaymentRequest.CheckoutFunnel.Shown", 1,
+ 1);
+ histogram_tester.ExpectUniqueSample(
+ "PaymentRequest.CheckoutFunnel.PayClicked", 1, 1);
+ histogram_tester.ExpectUniqueSample(
+ "PaymentRequest.CheckoutFunnel.ReceivedInstrumentDetails", 1, 1);
histogram_tester.ExpectUniqueSample("PaymentRequest.CheckoutFunnel.Completed",
1, 1);
}
@@ -71,6 +79,10 @@ IN_PROC_BROWSER_TEST_F(PaymentRequestCompletionStatusMetricsTest,
WaitForObservedEvent();
// Make sure the metrics are logged correctly.
+ histogram_tester.ExpectUniqueSample("PaymentRequest.CheckoutFunnel.Initiated",
+ 1, 1);
+ histogram_tester.ExpectUniqueSample("PaymentRequest.CheckoutFunnel.Shown", 1,
+ 1);
histogram_tester.ExpectUniqueSample(
"PaymentRequest.CheckoutFunnel.Aborted",
JourneyLogger::ABORT_REASON_MERCHANT_NAVIGATION, 1);
@@ -94,6 +106,10 @@ IN_PROC_BROWSER_TEST_F(PaymentRequestCompletionStatusMetricsTest,
WaitForObservedEvent();
// Make sure the metrics are logged correctly.
+ histogram_tester.ExpectUniqueSample("PaymentRequest.CheckoutFunnel.Initiated",
+ 1, 1);
+ histogram_tester.ExpectUniqueSample("PaymentRequest.CheckoutFunnel.Shown", 1,
+ 1);
histogram_tester.ExpectUniqueSample(
"PaymentRequest.CheckoutFunnel.Aborted",
JourneyLogger::ABORT_REASON_MERCHANT_NAVIGATION, 1);
@@ -118,6 +134,10 @@ IN_PROC_BROWSER_TEST_F(PaymentRequestCompletionStatusMetricsTest,
WaitForObservedEvent();
// Make sure the metrics are logged correctly.
+ histogram_tester.ExpectUniqueSample("PaymentRequest.CheckoutFunnel.Initiated",
+ 1, 1);
+ histogram_tester.ExpectUniqueSample("PaymentRequest.CheckoutFunnel.Shown", 1,
+ 1);
histogram_tester.ExpectUniqueSample(
"PaymentRequest.CheckoutFunnel.Aborted",
JourneyLogger::ABORT_REASON_ABORTED_BY_MERCHANT, 1);
@@ -136,6 +156,10 @@ IN_PROC_BROWSER_TEST_F(PaymentRequestCompletionStatusMetricsTest,
NavigateTo("/payment_request_email_test.html");
// Make sure the metrics are logged correctly.
+ histogram_tester.ExpectUniqueSample("PaymentRequest.CheckoutFunnel.Initiated",
+ 1, 1);
+ histogram_tester.ExpectUniqueSample("PaymentRequest.CheckoutFunnel.Shown", 1,
+ 1);
histogram_tester.ExpectUniqueSample(
"PaymentRequest.CheckoutFunnel.Aborted",
JourneyLogger::ABORT_REASON_USER_NAVIGATION, 1);
@@ -154,6 +178,10 @@ IN_PROC_BROWSER_TEST_F(PaymentRequestCompletionStatusMetricsTest,
ClickOnCancel();
// Make sure the metrics are logged correctly.
+ histogram_tester.ExpectUniqueSample("PaymentRequest.CheckoutFunnel.Initiated",
+ 1, 1);
+ histogram_tester.ExpectUniqueSample("PaymentRequest.CheckoutFunnel.Shown", 1,
+ 1);
histogram_tester.ExpectUniqueSample(
"PaymentRequest.CheckoutFunnel.Aborted",
JourneyLogger::ABORT_REASON_ABORTED_BY_USER, 1);
@@ -174,6 +202,10 @@ IN_PROC_BROWSER_TEST_F(PaymentRequestCompletionStatusMetricsTest,
WaitForObservedEvent();
// Make sure the metrics are logged correctly.
+ histogram_tester.ExpectUniqueSample("PaymentRequest.CheckoutFunnel.Initiated",
+ 1, 1);
+ histogram_tester.ExpectUniqueSample("PaymentRequest.CheckoutFunnel.Shown", 1,
+ 1);
histogram_tester.ExpectUniqueSample(
"PaymentRequest.CheckoutFunnel.Aborted",
JourneyLogger::ABORT_REASON_ABORTED_BY_USER, 1);
@@ -194,6 +226,10 @@ IN_PROC_BROWSER_TEST_F(PaymentRequestCompletionStatusMetricsTest,
WaitForObservedEvent();
// Make sure the metrics are logged correctly.
+ histogram_tester.ExpectUniqueSample("PaymentRequest.CheckoutFunnel.Initiated",
+ 1, 1);
+ histogram_tester.ExpectUniqueSample("PaymentRequest.CheckoutFunnel.Shown", 1,
+ 1);
histogram_tester.ExpectUniqueSample(
"PaymentRequest.CheckoutFunnel.Aborted",
JourneyLogger::ABORT_REASON_USER_NAVIGATION, 1);
« no previous file with comments | « no previous file | chrome/browser/ui/views/payments/payment_request_journey_logger_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698