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

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

Issue 1948203002: Simple Android integration tests for PaymentRequest UI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/PaymentRequestNoShippingTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestNoShippingTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestNoShippingTest.java
new file mode 100644
index 0000000000000000000000000000000000000000..997ac2ae170b57cf8718ef8ac937142512f7c879
--- /dev/null
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestNoShippingTest.java
@@ -0,0 +1,49 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.chrome.browser.payments;
+
+import android.test.suitebuilder.annotation.MediumTest;
+
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.TimeoutException;
+
+/**
+ * A payment integration test for a merchant that does not require shipping address.
+ */
+public class PaymentRequestNoShippingTest extends PaymentRequestTestBase {
+ public PaymentRequestNoShippingTest() {
+ super("payment_request_no_shipping_test.html");
+ }
+
+ @Override
+ public void onMainActivityStarted()
+ throws InterruptedException, ExecutionException, TimeoutException {}
+
+ @MediumTest
+ public void testCloseDialog()
+ throws InterruptedException, ExecutionException, TimeoutException {
+ triggerPaymentUI();
+ clickClosePaymentUIButton();
+ expectResultContains(new String[] {"Request cancelled"});
+ }
+
+ @MediumTest
+ public void testEditAndCloseDialog()
+ throws InterruptedException, ExecutionException, TimeoutException {
+ triggerPaymentUI();
+ clickSecondaryPaymentUIButton();
+ clickClosePaymentUIButton();
+ expectResultContains(new String[] {"Request cancelled"});
+ }
+
+ @MediumTest
+ public void testEditAndCancelDialog()
+ throws InterruptedException, ExecutionException, TimeoutException {
+ triggerPaymentUI();
+ clickSecondaryPaymentUIButton();
+ clickSecondaryPaymentUIButton();
+ expectResultContains(new String[] {"Request cancelled"});
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698