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

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

Issue 2454453002: [Payments] Update expired card expiration after unmask. (Closed)
Patch Set: Addressed comments Created 4 years, 2 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/PaymentRequestTestBase.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestTestBase.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestTestBase.java
index 6670a6749dc8f6f0192b3a2c11830e542f42f41f..a532f9bbf534ff500a641525d58726981c4ab54b 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestTestBase.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestTestBase.java
@@ -490,6 +490,24 @@ abstract class PaymentRequestTestBase extends ChromeActivityTestCaseBase<ChromeT
helper.waitForCallback(callCount);
}
+ /** Directly sets the text in the expired card unmask UI. */
+ protected void setTextInExpiredCardUnmaskDialogAndWait(
+ final int[] resourceIds, final String[] values, CallbackHelper helper)
+ throws InterruptedException, TimeoutException {
+ assert resourceIds.length == values.length;
+ int callCount = helper.getCallCount();
+ ThreadUtils.runOnUiThreadBlocking(new Runnable() {
+ @Override
+ public void run() {
+ for (int i = 0; i < resourceIds.length; ++i) {
+ ((EditText) mCardUnmaskPrompt.getDialogForTest().findViewById(resourceIds[i]))
+ .setText(values[i]);
+ }
+ }
+ });
+ helper.waitForCallback(callCount);
+ }
+
/** Verifies the contents of the test webpage. */
protected void expectResultContains(final String[] contents) throws InterruptedException {
CriteriaHelper.pollInstrumentationThread(new Criteria() {

Powered by Google App Engine
This is Rietveld 408576698