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

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

Issue 2808983003: [Payments] Format shipping and billing phone number in normalizer. (Closed)
Patch Set: Addressed mathp's comments 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 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.os.Build; 8 import android.os.Build;
9 import android.support.test.filters.MediumTest; 9 import android.support.test.filters.MediumTest;
10 10
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 184
185 setTextInEditorAndWait(new String[] {"Bob", "Google", "1600 Amphitheatre Pkwy", 185 setTextInEditorAndWait(new String[] {"Bob", "Google", "1600 Amphitheatre Pkwy",
186 "Mountain View", "CA", "94043", "650-253-0000"}, mEditorTextUpda te); 186 "Mountain View", "CA", "94043", "650-253-0000"}, mEditorTextUpda te);
187 clickInEditorAndWait(R.id.payments_edit_done_button, mReadyToEdit); 187 clickInEditorAndWait(R.id.payments_edit_done_button, mReadyToEdit);
188 188
189 clickInCardEditorAndWait(R.id.payments_edit_done_button, mReadyToPay); 189 clickInCardEditorAndWait(R.id.payments_edit_done_button, mReadyToPay);
190 clickAndWait(R.id.button_primary, mReadyForUnmaskInput); 190 clickAndWait(R.id.button_primary, mReadyForUnmaskInput);
191 setTextInCardUnmaskDialogAndWait(R.id.card_unmask_input, "123", mReadyTo Unmask); 191 setTextInCardUnmaskDialogAndWait(R.id.card_unmask_input, "123", mReadyTo Unmask);
192 clickCardUnmaskButtonAndWait(DialogInterface.BUTTON_POSITIVE, mDismissed ); 192 clickCardUnmaskButtonAndWait(DialogInterface.BUTTON_POSITIVE, mDismissed );
193 expectResultContains(new String[] {"5454545454545454", "12", "Bob", "Goo gle", 193 expectResultContains(new String[] {"5454545454545454", "12", "Bob", "Goo gle",
194 "1600 Amphitheatre Pkwy", "Mountain View", "CA", "94043", "+1 65 0-253-0000"}); 194 "1600 Amphitheatre Pkwy", "Mountain View", "CA", "94043", "+1650 2530000"});
195 } 195 }
196 196
197 /** Quickly pressing on "add card" and then [X] should not crash. */ 197 /** Quickly pressing on "add card" and then [X] should not crash. */
198 @MediumTest 198 @MediumTest
199 @Feature({"Payments"}) 199 @Feature({"Payments"})
200 public void testQuickAddCardAndCloseShouldNotCrash() 200 public void testQuickAddCardAndCloseShouldNotCrash()
201 throws InterruptedException, ExecutionException, TimeoutException { 201 throws InterruptedException, ExecutionException, TimeoutException {
202 triggerUIAndWait(mReadyToPay); 202 triggerUIAndWait(mReadyToPay);
203 clickInPaymentMethodAndWait(R.id.payments_section, mReadyForInput); 203 clickInPaymentMethodAndWait(R.id.payments_section, mReadyForInput);
204 204
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 triggerUIAndWait(mReadyToPay); 375 triggerUIAndWait(mReadyToPay);
376 376
377 // Make sure that only the appropriate enum value was logged. 377 // Make sure that only the appropriate enum value was logged.
378 for (int i = 0; i < PaymentRequestMetrics.REQUESTED_INFORMATION_MAX; ++i ) { 378 for (int i = 0; i < PaymentRequestMetrics.REQUESTED_INFORMATION_MAX; ++i ) {
379 assertEquals((i == PaymentRequestMetrics.REQUESTED_INFORMATION_NONE ? 1 : 0), 379 assertEquals((i == PaymentRequestMetrics.REQUESTED_INFORMATION_NONE ? 1 : 0),
380 RecordHistogram.getHistogramValueCountForTesting( 380 RecordHistogram.getHistogramValueCountForTesting(
381 "PaymentRequest.RequestedInformation", i)); 381 "PaymentRequest.RequestedInformation", i));
382 } 382 }
383 } 383 }
384 } 384 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698