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

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

Issue 2467393002: Add canMakeActivePayment() method to web payments. (Closed)
Patch Set: Fix FindBugs Created 4 years, 1 month 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
(Empty)
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
3 // found in the LICENSE file.
4
5 package org.chromium.chrome.browser.payments;
6
7 import android.test.suitebuilder.annotation.MediumTest;
8
9 import org.chromium.base.test.util.CommandLineFlags;
10 import org.chromium.base.test.util.Feature;
11
12 import java.util.concurrent.ExecutionException;
13 import java.util.concurrent.TimeoutException;
14
15 /**
16 * A payment integration test for checking whether user can make active payment using a payment app.
17 */
18 @CommandLineFlags.Add("enable-blink-features=CanMakeActivePayment")
19 public class PaymentRequestPaymentAppActivePaymentQueryTest extends PaymentReque stTestBase {
20 public PaymentRequestPaymentAppActivePaymentQueryTest() {
21 super("payment_request_active_payment_query_bobpay_test.html");
22 }
23
24 @Override
25 public void onMainActivityStarted() throws InterruptedException, ExecutionEx ception,
26 TimeoutException {}
27
28 @MediumTest
29 @Feature({"Payments"})
30 public void testNoBobPayInstalled() throws InterruptedException, ExecutionEx ception,
31 TimeoutException {
32 triggerUIAndWait(mActivePaymentQueryResponded);
33 expectResultContains(new String[]{"false"});
34 }
35
36 @MediumTest
37 @Feature({"Payments"})
38 public void testNoInstrumentsInFastBobPay() throws InterruptedException, Exe cutionException,
39 TimeoutException {
40 installPaymentApp(NO_INSTRUMENTS, IMMEDIATE_RESPONSE);
41 triggerUIAndWait(mActivePaymentQueryResponded);
42 expectResultContains(new String[]{"false"});
43 }
44
45 @MediumTest
46 @Feature({"Payments"})
47 public void testNoInstrumentsInSlowBobPay() throws InterruptedException, Exe cutionException,
48 TimeoutException {
49 installPaymentApp(NO_INSTRUMENTS, DELAYED_RESPONSE);
50 triggerUIAndWait(mActivePaymentQueryResponded);
51 expectResultContains(new String[]{"false"});
52 }
53
54 @MediumTest
55 @Feature({"Payments"})
56 public void testPayViaFastBobPay() throws InterruptedException, ExecutionExc eption,
57 TimeoutException {
58 installPaymentApp(HAVE_INSTRUMENTS, IMMEDIATE_RESPONSE);
59 triggerUIAndWait(mActivePaymentQueryResponded);
60 expectResultContains(new String[]{"true"});
61 }
62
63 @MediumTest
64 @Feature({"Payments"})
65 public void testPayViaSlowBobPay() throws InterruptedException, ExecutionExc eption,
66 TimeoutException {
67 installPaymentApp(HAVE_INSTRUMENTS, DELAYED_RESPONSE);
68 triggerUIAndWait(mActivePaymentQueryResponded);
69 expectResultContains(new String[]{"true"});
70 }
71 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698