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

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestJourneyLoggerUnitTest.java

Issue 2790253002: [Payments] Don't record CanMakePayment when in incognito mode. (Closed)
Patch Set: 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: chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestJourneyLoggerUnitTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestJourneyLoggerUnitTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestJourneyLoggerUnitTest.java
index fbff08ff91a5a80ada467ab7021c187024b68f54..32e61b6c6715bf4166068ce62eb27155410218d1 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestJourneyLoggerUnitTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestJourneyLoggerUnitTest.java
@@ -451,6 +451,27 @@ public class PaymentRequestJourneyLoggerUnitTest {
}
/**
+ * Tests the canMakePayment metrics are not logged if the Payment Request was done in an
+ * incognito tab.
+ */
+ @Test
+ @SmallTest
+ @Feature({"Payments"})
+ public void testRecordJourneyStatsHistograms_CanMakePayment_IncognitoTab() {
+ JourneyLogger logger = new JourneyLogger();
+ assertNoLogForCanMakePayment();
+
+ // The user is in an incognito tab so CanMakePayment is always true;
+ logger.setShowCalled();
+ logger.setIsIncognito();
+ logger.setCanMakePaymentValue(true);
+ logger.recordJourneyStatsHistograms(JourneyLogger.COMPLETION_STATUS_COMPLETED);
+
+ // There should be no CanMakePayment metrics logged.
+ assertNoLogForCanMakePayment();
+ }
+
+ /**
* Tests that the completion status metrics based on whether the user had suggestions for all
* the requested sections are logged as correctly.
*/

Powered by Google App Engine
This is Rietveld 408576698