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

Side by Side Diff: chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestPhoneTest.java

Issue 2904083003: [Payments] Use C++ metric enums in Java. (Closed)
Patch Set: Enum rename for Windows 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 unified diff | Download patch
OLDNEW
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
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_PHONE ? 1 : 0), 159 Assert.assertEquals((i == RequestedInformation.PHONE ? 1 : 0),
160 RecordHistogram.getHistogramValueCountForTesting( 160 RecordHistogram.getHistogramValueCountForTesting(
161 "PaymentRequest.RequestedInformation", i)); 161 "PaymentRequest.RequestedInformation", i));
162 } 162 }
163 } 163 }
164 } 164 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698