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

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

Issue 2791973003: [Payments] Normalize contact info phone# in PaymentResponse on Android. (Closed)
Patch Set: Change method names Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestPhoneTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestPhoneTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestPhoneTest.java
index 94a8650aae38b23abb4fd9e0c1c711142bb42546..2d776ac9390ccff104c5215f27e53ec194df1134 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestPhoneTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestPhoneTest.java
@@ -30,12 +30,12 @@ public class PaymentRequestPhoneTest extends PaymentRequestTestBase {
AutofillTestHelper helper = new AutofillTestHelper();
// The user has a valid phone number on disk.
helper.setProfile(new AutofillProfile("", "https://example.com", true, "Jon Doe", "Google",
- "340 Main St", "CA", "Los Angeles", "", "90291", "", "US", "555-555-5555",
+ "340 Main St", "CA", "Los Angeles", "", "90291", "", "US", "5555555555",
"jon.doe@google.com", "en-US"));
// Add the same profile but with a different address.
helper.setProfile(new AutofillProfile("", "https://example.com", true, "", "Google",
- "999 Main St", "CA", "Los Angeles", "", "90291", "", "US", "555-555-5555",
+ "999 Main St", "CA", "Los Angeles", "", "90291", "", "US", "5555555555",
"jon.doe@google.com", "en-US"));
// Add the same profile but without a phone number.
@@ -45,12 +45,12 @@ public class PaymentRequestPhoneTest extends PaymentRequestTestBase {
// Add the same profile but without an email.
helper.setProfile(new AutofillProfile("", "https://example.com", true, "Jon Doe", "Google",
- "340 Main St", "CA", "Los Angeles", "", "90291", "", "US", "555-555-5555",
+ "340 Main St", "CA", "Los Angeles", "", "90291", "", "US", "5555555555",
"" /* emailAddress */, "en-US"));
// Add the same profile but without a name.
helper.setProfile(new AutofillProfile("" /* name */, "https://example.com", true, "",
- "Google", "340 Main St", "CA", "Los Angeles", "", "90291", "", "US", "555-555-5555",
+ "Google", "340 Main St", "CA", "Los Angeles", "", "90291", "", "US", "5555555555",
"jon.doe@google.com", "en-US"));
installPaymentApp(HAVE_INSTRUMENTS, IMMEDIATE_RESPONSE);
@@ -62,7 +62,7 @@ public class PaymentRequestPhoneTest extends PaymentRequestTestBase {
public void testPay() throws InterruptedException, ExecutionException, TimeoutException {
triggerUIAndWait(mReadyToPay);
clickAndWait(R.id.button_primary, mDismissed);
- expectResultContains(new String[] {"555-555-5555"});
+ expectResultContains(new String[] {"+15555555555"});
}
/** Attempt to add an invalid phone number and cancel the transaction. */
@@ -88,11 +88,11 @@ public class PaymentRequestPhoneTest extends PaymentRequestTestBase {
triggerUIAndWait(mReadyToPay);
clickInContactInfoAndWait(R.id.payments_section, mReadyForInput);
clickInContactInfoAndWait(R.id.payments_add_option_button, mReadyToEdit);
- setTextInEditorAndWait(new String[] {"999-999-9999"}, mEditorTextUpdate);
+ setTextInEditorAndWait(new String[] {"9999999999"}, mEditorTextUpdate);
clickInEditorAndWait(R.id.payments_edit_done_button, mReadyToPay);
clickAndWait(R.id.button_primary, mDismissed);
- expectResultContains(new String[] {"999-999-9999"});
+ expectResultContains(new String[] {"+19999999999"});
}
/**

Powered by Google App Engine
This is Rietveld 408576698