| Index: chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestNameAndFreeShippingTest.java
|
| diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestPhoneAndFreeShippingTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestNameAndFreeShippingTest.java
|
| similarity index 79%
|
| copy from chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestPhoneAndFreeShippingTest.java
|
| copy to chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestNameAndFreeShippingTest.java
|
| index ea17a69cf584824aaf8701ccc1b4638c8072eecf..9149fbd5afb56ce94a853524a7acb5ac999e1519 100644
|
| --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestPhoneAndFreeShippingTest.java
|
| +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestNameAndFreeShippingTest.java
|
| @@ -18,20 +18,20 @@ import java.util.concurrent.ExecutionException;
|
| import java.util.concurrent.TimeoutException;
|
|
|
| /**
|
| - * A payment integration test for a merchant that requests a phone number and provides free shipping
|
| + * A payment integration test for a merchant that requests a payer name and provides free shipping
|
| * regardless of address.
|
| */
|
| -public class PaymentRequestPhoneAndFreeShippingTest extends PaymentRequestTestBase {
|
| - public PaymentRequestPhoneAndFreeShippingTest() {
|
| - // This merchant requests a phone number and provides free shipping worldwide.
|
| - super("payment_request_phone_and_free_shipping_test.html");
|
| +public class PaymentRequestNameAndFreeShippingTest extends PaymentRequestTestBase {
|
| + public PaymentRequestNameAndFreeShippingTest() {
|
| + // This merchant requests a payer name and provides free shipping worldwide.
|
| + super("payment_request_name_and_free_shipping_test.html");
|
| }
|
|
|
| @Override
|
| public void onMainActivityStarted()
|
| throws InterruptedException, ExecutionException, TimeoutException {
|
| AutofillTestHelper helper = new AutofillTestHelper();
|
| - // The user has a shipping address with a valid phone number on disk.
|
| + // The user has a shipping address with a valid payer name on disk.
|
| String billingAddressId = helper.setProfile(new AutofillProfile("", "https://example.com",
|
| true, "Jon Doe", "Google", "340 Main St", "CA", "Los Angeles", "", "90291", "",
|
| "US", "555-555-5555", "", "en-US"));
|
| @@ -40,7 +40,7 @@ public class PaymentRequestPhoneAndFreeShippingTest extends PaymentRequestTestBa
|
| billingAddressId, "" /* serverId */));
|
| }
|
|
|
| - /** Submit the phone number and shipping address to the merchant when the user clicks "Pay." */
|
| + /** Submit the payer name and shipping address to the merchant when the user clicks "Pay." */
|
| @MediumTest
|
| @Feature({"Payments"})
|
| public void testPay() throws InterruptedException, ExecutionException, TimeoutException {
|
| @@ -48,13 +48,13 @@ public class PaymentRequestPhoneAndFreeShippingTest extends PaymentRequestTestBa
|
| clickAndWait(R.id.button_primary, mReadyForUnmaskInput);
|
| setTextInCardUnmaskDialogAndWait(R.id.card_unmask_input, "123", mReadyToUnmask);
|
| clickCardUnmaskButtonAndWait(DialogInterface.BUTTON_POSITIVE, mDismissed);
|
| - expectResultContains(new String[] {"555-555-5555", "Jon Doe", "4111111111111111", "12",
|
| + expectResultContains(new String[] {"Jon Doe", "Jon Doe", "4111111111111111", "12",
|
| "2050", "visa", "123", "Google", "340 Main St", "CA", "Los Angeles", "90291", "US",
|
| "en", "freeShippingOption"});
|
| }
|
|
|
| /**
|
| - * Test that starting a payment request that requires a phone number and a shipping address
|
| + * Test that starting a payment request that requires a payer name and a shipping address
|
| * results in the appropriate metric being logged in the PaymentRequest.RequestedInformation
|
| * histogram.
|
| */
|
|
|