| Index: chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestContactDetailsTest.java
|
| diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestContactDetailsTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestContactDetailsTest.java
|
| index 40df7425f002e176773f157cd277388050ec5f93..7dab341f514c493ee2fa8dd27784a1572adfc498 100644
|
| --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestContactDetailsTest.java
|
| +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestContactDetailsTest.java
|
| @@ -34,6 +34,26 @@ public class PaymentRequestContactDetailsTest extends PaymentRequestTestBase {
|
| "340 Main St", "CA", "Los Angeles", "", "90291", "", "US", "555-555-5555",
|
| "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",
|
| + "jon.doe@google.com", "en-US"));
|
| +
|
| + // Add the same profile but without a phone number.
|
| + helper.setProfile(new AutofillProfile("", "https://example.com", true, "Jon Doe", "Google",
|
| + "340 Main St", "CA", "Los Angeles", "", "90291", "", "US", "" /* phone_number */,
|
| + "jon.doe@google.com", "en-US"));
|
| +
|
| + // 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",
|
| + "" /* 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",
|
| + "jon.doe@google.com", "en-US"));
|
| +
|
| installPaymentApp(HAVE_INSTRUMENTS, IMMEDIATE_RESPONSE);
|
| }
|
|
|
| @@ -208,6 +228,19 @@ public class PaymentRequestContactDetailsTest extends PaymentRequestTestBase {
|
| }
|
|
|
| /**
|
| + * Makes sure that suggestions that are equal to or subsets of other suggestions are not shown
|
| + * to the user.
|
| + */
|
| + @MediumTest
|
| + @Feature({"Payments"})
|
| + public void testSuggestionsDeduped()
|
| + throws InterruptedException, ExecutionException, TimeoutException {
|
| + triggerUIAndWait(mReadyToPay);
|
| + clickInContactInfoAndWait(R.id.payments_section, mReadyForInput);
|
| + assertEquals(1, getNumberOfContactDetailSuggestions());
|
| + }
|
| +
|
| + /**
|
| * Test that starting a payment request that requires the user's email address, phone number and
|
| * name results in the appropriate metric being logged in the
|
| * PaymentRequest.RequestedInformation histogram.
|
|
|