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

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

Issue 2192423002: Show at most one PaymentRequest UI at a time. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/PaymentRequestShowTwiceTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestFailCompleteTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestShowTwiceTest.java
similarity index 61%
copy from chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestFailCompleteTest.java
copy to chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestShowTwiceTest.java
index 694ddbbb83273cc52d92e7d1d7af4f9f32840507..f3d65937952fb742aabdfcb6134f9b7ef7647126 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestFailCompleteTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestShowTwiceTest.java
@@ -4,7 +4,6 @@
package org.chromium.chrome.browser.payments;
-import android.content.DialogInterface;
import android.test.suitebuilder.annotation.MediumTest;
import org.chromium.chrome.R;
@@ -16,11 +15,11 @@ import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException;
/**
- * A payment integration test for a merchant that always fails to complete the transaction.
+ * A payment integration test for a merchant that calls show() twice.
*/
-public class PaymentRequestFailCompleteTest extends PaymentRequestTestBase {
- public PaymentRequestFailCompleteTest() {
- super("payment_request_fail_complete_test.html");
+public class PaymentRequestShowTwiceTest extends PaymentRequestTestBase {
+ public PaymentRequestShowTwiceTest() {
+ super("payment_request_show_twice_test.html");
}
@Override
@@ -29,19 +28,17 @@ public class PaymentRequestFailCompleteTest extends PaymentRequestTestBase {
AutofillTestHelper helper = new AutofillTestHelper();
String billingAddressId = helper.setProfile(new AutofillProfile("", "https://example.com",
true, "Jon Doe", "Google", "340 Main St", "CA", "Los Angeles", "", "90291", "",
- "US", "310-310-6000", "jon.doe@gmail.com", "en-US"));
+ "US", "555-555-5555", "", "en-US"));
helper.setCreditCard(new CreditCard("", "https://example.com", true, true, "Jon Doe",
"4111111111111111", "1111", "12", "2050", "visa", R.drawable.pr_visa,
billingAddressId, "" /* serverId */));
}
@MediumTest
- public void testPay() throws InterruptedException, ExecutionException, TimeoutException {
+ public void testSecondShowRequestCancelled()
+ throws InterruptedException, ExecutionException, TimeoutException {
triggerUIAndWait(mReadyToPay);
- clickAndWait(R.id.button_primary, mReadyForUnmaskInput);
- setTextInCardUnmaskDialogAndWait(R.id.card_unmask_input, "123", mReadyToUnmask);
- clickCardUnmaskButtonAndWait(DialogInterface.BUTTON_POSITIVE, mResultReady);
- clickAndWait(R.id.ok_button, mDismissed);
- expectResultContains(new String[] {"Transaction failed"});
+ expectResultContains(new String[] {"Second request: Request cancelled"});
+ clickAndWait(R.id.close_button, mDismissed);
}
}
« no previous file with comments | « chrome/android/java_sources.gni ('k') | chrome/test/data/android/payments/payment_request_show_twice_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698