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

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

Issue 2085133003: Add billing address to credit cards. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix SyncCustomizationFramgentTest compilation Created 4 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 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.chrome.R; 10 import org.chromium.chrome.R;
11 import org.chromium.chrome.browser.autofill.AutofillTestHelper; 11 import org.chromium.chrome.browser.autofill.AutofillTestHelper;
12 import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; 12 import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard;
13 13
14 import java.util.concurrent.ExecutionException; 14 import java.util.concurrent.ExecutionException;
15 import java.util.concurrent.TimeoutException; 15 import java.util.concurrent.TimeoutException;
16 16
17 /** 17 /**
18 * A payment integration test for a merchant that does not require shipping addr ess. 18 * A payment integration test for a merchant that does not require shipping addr ess.
19 */ 19 */
20 public class PaymentRequestNoShippingTest extends PaymentRequestTestBase { 20 public class PaymentRequestNoShippingTest extends PaymentRequestTestBase {
21 public PaymentRequestNoShippingTest() { 21 public PaymentRequestNoShippingTest() {
22 super("payment_request_no_shipping_test.html"); 22 super("payment_request_no_shipping_test.html");
23 } 23 }
24 24
25 @Override 25 @Override
26 public void onMainActivityStarted() 26 public void onMainActivityStarted()
27 throws InterruptedException, ExecutionException, TimeoutException { 27 throws InterruptedException, ExecutionException, TimeoutException {
28 new AutofillTestHelper().setCreditCard(new CreditCard("", "https://examp le.com", true, true, 28 new AutofillTestHelper().setCreditCard(new CreditCard("", "https://examp le.com", true, true,
29 "Jon Doe", "4111111111111111", "1111", "12", "2050", "visa", R.d rawable.pr_visa)); 29 "Jon Doe", "4111111111111111", "1111", "12", "2050", "visa", R.d rawable.pr_visa,
30 "" /* billingAddressId */));
30 } 31 }
31 32
32 @MediumTest 33 @MediumTest
33 public void testCloseDialog() throws InterruptedException, ExecutionExceptio n, 34 public void testCloseDialog() throws InterruptedException, ExecutionExceptio n,
34 TimeoutException { 35 TimeoutException {
35 triggerUIAndWait(mReadyToClose); 36 triggerUIAndWait(mReadyToClose);
36 clickAndWait(R.id.close_button, mDismissed); 37 clickAndWait(R.id.close_button, mDismissed);
37 expectResultContains(new String[] {"Request cancelled"}); 38 expectResultContains(new String[] {"Request cancelled"});
38 } 39 }
39 40
(...skipping 28 matching lines...) Expand all
68 @MediumTest 69 @MediumTest
69 public void testPay() throws InterruptedException, ExecutionException, Timeo utException { 70 public void testPay() throws InterruptedException, ExecutionException, Timeo utException {
70 triggerUIAndWait(mReadyToPay); 71 triggerUIAndWait(mReadyToPay);
71 clickAndWait(R.id.button_primary, mReadyForUnmaskInput); 72 clickAndWait(R.id.button_primary, mReadyForUnmaskInput);
72 setTextInCardUnmaskDialogAndWait(R.id.card_unmask_input, "123", mReadyTo Unmask); 73 setTextInCardUnmaskDialogAndWait(R.id.card_unmask_input, "123", mReadyTo Unmask);
73 clickCardUnmaskButtonAndWait(DialogInterface.BUTTON_POSITIVE, mDismissed ); 74 clickCardUnmaskButtonAndWait(DialogInterface.BUTTON_POSITIVE, mDismissed );
74 expectResultContains(new String[] {"Jon Doe", "4111111111111111", "12", "2050", "visa", 75 expectResultContains(new String[] {"Jon Doe", "4111111111111111", "12", "2050", "visa",
75 "123"}); 76 "123"});
76 } 77 }
77 } 78 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698