| 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.test.util.Feature; | 10 import org.chromium.base.test.util.Feature; |
| 11 import org.chromium.chrome.R; | 11 import org.chromium.chrome.R; |
| 12 import org.chromium.chrome.browser.autofill.AutofillTestHelper; | 12 import org.chromium.chrome.browser.autofill.AutofillTestHelper; |
| 13 import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile; | 13 import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile; |
| 14 import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; | 14 import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; |
| 15 | 15 |
| 16 import java.util.concurrent.ExecutionException; | 16 import java.util.concurrent.ExecutionException; |
| 17 import java.util.concurrent.TimeoutException; | 17 import java.util.concurrent.TimeoutException; |
| 18 | 18 |
| 19 /** | 19 /** |
| 20 * A payment integration test for removing a billing address that is associated
with a credit card. | 20 * A payment integration test for removing a billing address that is associated
with a credit card. |
| 21 */ | 21 */ |
| 22 public class PaymentRequestRemoveBillingAddressTest extends PaymentRequestTestBa
se { | 22 public class PaymentRequestRemoveBillingAddressTest extends PaymentRequestTestBa
se { |
| 23 private static final int DECEMBER = 11; | 23 private static final int DECEMBER = 11; |
| 24 private static final int NEXT_YEAR = 1; | 24 private static final int NEXT_YEAR = 1; |
| 25 private static final int FIRST_BILLING_ADDRESS = 1; | 25 private static final int FIRST_BILLING_ADDRESS = 0; |
| 26 | 26 |
| 27 public PaymentRequestRemoveBillingAddressTest() { | 27 public PaymentRequestRemoveBillingAddressTest() { |
| 28 super("payment_request_no_shipping_test.html"); | 28 super("payment_request_no_shipping_test.html"); |
| 29 } | 29 } |
| 30 | 30 |
| 31 @Override | 31 @Override |
| 32 public void onMainActivityStarted() | 32 public void onMainActivityStarted() |
| 33 throws InterruptedException, ExecutionException, TimeoutException { | 33 throws InterruptedException, ExecutionException, TimeoutException { |
| 34 AutofillTestHelper helper = new AutofillTestHelper(); | 34 AutofillTestHelper helper = new AutofillTestHelper(); |
| 35 helper.setProfile(new AutofillProfile("", "https://example.com", | 35 helper.setProfile(new AutofillProfile("", "https://example.com", |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 | 74 |
| 75 // Pay with this card. | 75 // Pay with this card. |
| 76 clickAndWait(R.id.button_primary, mReadyForUnmaskInput); | 76 clickAndWait(R.id.button_primary, mReadyForUnmaskInput); |
| 77 setTextInCardUnmaskDialogAndWait(R.id.card_unmask_input, "123", mReadyTo
Unmask); | 77 setTextInCardUnmaskDialogAndWait(R.id.card_unmask_input, "123", mReadyTo
Unmask); |
| 78 clickCardUnmaskButtonAndWait(DialogInterface.BUTTON_POSITIVE, mDismissed
); | 78 clickCardUnmaskButtonAndWait(DialogInterface.BUTTON_POSITIVE, mDismissed
); |
| 79 expectResultContains(new String[] {"4111111111111111", "Alice", "12", "1
23", "Jane Smith", | 79 expectResultContains(new String[] {"4111111111111111", "Alice", "12", "1
23", "Jane Smith", |
| 80 "Google", "1600 Amphitheatre Pkwy", "CA", "Mountain View", "9404
3", "US", | 80 "Google", "1600 Amphitheatre Pkwy", "CA", "Mountain View", "9404
3", "US", |
| 81 "555-555-5555", "en-US"}); | 81 "555-555-5555", "en-US"}); |
| 82 } | 82 } |
| 83 } | 83 } |
| OLD | NEW |