OLD | NEW |
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.test.suitebuilder.annotation.MediumTest; | 7 import android.test.suitebuilder.annotation.MediumTest; |
8 | 8 |
9 import org.chromium.base.test.util.CommandLineFlags; | |
10 import org.chromium.base.test.util.Feature; | 9 import org.chromium.base.test.util.Feature; |
11 | 10 |
12 import java.util.concurrent.ExecutionException; | 11 import java.util.concurrent.ExecutionException; |
13 import java.util.concurrent.TimeoutException; | 12 import java.util.concurrent.TimeoutException; |
14 | 13 |
15 /** | 14 /** |
16 * A payment integration test for checking whether user can make a payment using
a payment app. | 15 * A payment integration test for checking whether user can make a payment using
a payment app. |
17 */ | 16 */ |
18 @CommandLineFlags.Add("enable-blink-features=CanMakePayment") | |
19 public class PaymentRequestPaymentAppCanMakePaymentQueryTest extends PaymentRequ
estTestBase { | 17 public class PaymentRequestPaymentAppCanMakePaymentQueryTest extends PaymentRequ
estTestBase { |
20 public PaymentRequestPaymentAppCanMakePaymentQueryTest() { | 18 public PaymentRequestPaymentAppCanMakePaymentQueryTest() { |
21 super("payment_request_can_make_payment_query_bobpay_test.html"); | 19 super("payment_request_can_make_payment_query_bobpay_test.html"); |
22 } | 20 } |
23 | 21 |
24 @Override | 22 @Override |
25 public void onMainActivityStarted() throws InterruptedException, ExecutionEx
ception, | 23 public void onMainActivityStarted() throws InterruptedException, ExecutionEx
ception, |
26 TimeoutException {} | 24 TimeoutException {} |
27 | 25 |
28 @MediumTest | 26 @MediumTest |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 public void testPayViaSlowBobPay() throws InterruptedException, ExecutionExc
eption, | 75 public void testPayViaSlowBobPay() throws InterruptedException, ExecutionExc
eption, |
78 TimeoutException { | 76 TimeoutException { |
79 installPaymentApp(HAVE_INSTRUMENTS, DELAYED_RESPONSE); | 77 installPaymentApp(HAVE_INSTRUMENTS, DELAYED_RESPONSE); |
80 triggerUIAndWait(mCanMakePaymentQueryResponded); | 78 triggerUIAndWait(mCanMakePaymentQueryResponded); |
81 expectResultContains(new String[]{"true, true"}); | 79 expectResultContains(new String[]{"true, true"}); |
82 | 80 |
83 clickNodeAndWait("otherBuy", mCanMakePaymentQueryResponded); | 81 clickNodeAndWait("otherBuy", mCanMakePaymentQueryResponded); |
84 expectResultContains(new String[]{"true, QuotaExceededError"}); | 82 expectResultContains(new String[]{"true, QuotaExceededError"}); |
85 } | 83 } |
86 } | 84 } |
OLD | NEW |