| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package org.chromium.chrome.browser.payments; | 5 package org.chromium.chrome.browser.payments; |
| 6 | 6 |
| 7 import static org.chromium.chrome.browser.payments.PaymentRequestTestRule.HAVE_I
NSTRUMENTS; | 7 import static org.chromium.chrome.browser.payments.PaymentRequestTestRule.HAVE_I
NSTRUMENTS; |
| 8 import static org.chromium.chrome.browser.payments.PaymentRequestTestRule.IMMEDI
ATE_RESPONSE; | 8 import static org.chromium.chrome.browser.payments.PaymentRequestTestRule.IMMEDI
ATE_RESPONSE; |
| 9 | 9 |
| 10 import android.support.test.filters.MediumTest; | 10 import android.support.test.filters.MediumTest; |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 */ | 148 */ |
| 149 @Test | 149 @Test |
| 150 @MediumTest | 150 @MediumTest |
| 151 @Feature({"Payments"}) | 151 @Feature({"Payments"}) |
| 152 public void testRequestedInformationMetric() | 152 public void testRequestedInformationMetric() |
| 153 throws InterruptedException, ExecutionException, TimeoutException { | 153 throws InterruptedException, ExecutionException, TimeoutException { |
| 154 // Start the Payment Request. | 154 // Start the Payment Request. |
| 155 mPaymentRequestTestRule.triggerUIAndWait(mPaymentRequestTestRule.getRead
yToPay()); | 155 mPaymentRequestTestRule.triggerUIAndWait(mPaymentRequestTestRule.getRead
yToPay()); |
| 156 | 156 |
| 157 // Make sure that only the appropriate enum value was logged. | 157 // Make sure that only the appropriate enum value was logged. |
| 158 for (int i = 0; i < PaymentRequestMetrics.REQUESTED_INFORMATION_MAX; ++i
) { | 158 for (int i = 0; i < RequestedInformation.MAX; ++i) { |
| 159 Assert.assertEquals((i == PaymentRequestMetrics.REQUESTED_INFORMATIO
N_EMAIL ? 1 : 0), | 159 Assert.assertEquals((i == RequestedInformation.EMAIL ? 1 : 0), |
| 160 RecordHistogram.getHistogramValueCountForTesting( | 160 RecordHistogram.getHistogramValueCountForTesting( |
| 161 "PaymentRequest.RequestedInformation", i)); | 161 "PaymentRequest.RequestedInformation", i)); |
| 162 } | 162 } |
| 163 } | 163 } |
| 164 } | 164 } |
| OLD | NEW |