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 android.content.DialogInterface; | 7 import android.content.DialogInterface; |
8 import android.test.suitebuilder.annotation.MediumTest; | 8 import android.test.suitebuilder.annotation.MediumTest; |
9 | 9 |
10 import org.chromium.base.ThreadUtils; | 10 import org.chromium.base.ThreadUtils; |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 // Start the Payment Request. | 363 // Start the Payment Request. |
364 triggerUIAndWait(mReadyToPay); | 364 triggerUIAndWait(mReadyToPay); |
365 | 365 |
366 // Make sure that only the appropriate enum value was logged. | 366 // Make sure that only the appropriate enum value was logged. |
367 for (int i = 0; i < PaymentRequestMetrics.REQUESTED_INFORMATION_MAX; ++i
) { | 367 for (int i = 0; i < PaymentRequestMetrics.REQUESTED_INFORMATION_MAX; ++i
) { |
368 assertEquals((i == PaymentRequestMetrics.REQUESTED_INFORMATION_NONE
? 1 : 0), | 368 assertEquals((i == PaymentRequestMetrics.REQUESTED_INFORMATION_NONE
? 1 : 0), |
369 RecordHistogram.getHistogramValueCountForTesting( | 369 RecordHistogram.getHistogramValueCountForTesting( |
370 "PaymentRequest.RequestedInformation", i)); | 370 "PaymentRequest.RequestedInformation", i)); |
371 } | 371 } |
372 } | 372 } |
| 373 |
| 374 /** Verifies the format of the billing address suggestions when adding a new
credit card. */ |
| 375 @MediumTest |
| 376 public void testNewCardBillingAddressFormat() |
| 377 throws InterruptedException, ExecutionException, TimeoutException { |
| 378 fillNewCardForm("5454-5454-5454-5454", "Bob", DECEMBER, NEXT_YEAR, FIRST
_BILLING_ADDRESS); |
| 379 assertTrue(getSpinnerSelectionTextInCardEditor(2).equals( |
| 380 "Jon Doe, Google, 340 Main St, Los Angeles, CA 90291, United Sta
tes")); |
| 381 } |
373 } | 382 } |
OLD | NEW |