| 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 import org.chromium.chrome.R; | 10 import org.chromium.chrome.R; |
| 12 import org.chromium.chrome.browser.autofill.AutofillTestHelper; | 11 import org.chromium.chrome.browser.autofill.AutofillTestHelper; |
| 13 import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile; | 12 import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile; |
| 14 import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; | 13 import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; |
| 15 | 14 |
| 16 import java.util.concurrent.ExecutionException; | 15 import java.util.concurrent.ExecutionException; |
| 17 import java.util.concurrent.TimeoutException; | 16 import java.util.concurrent.TimeoutException; |
| 18 | 17 |
| 19 /** | 18 /** |
| 20 * A payment integration test for checking whether user can make a payment via e
ither payment | 19 * A payment integration test for checking whether user can make a payment via e
ither payment |
| 21 * app or a credit card. This user has a complete credit card on file. | 20 * app or a credit card. This user has a complete credit card on file. |
| 22 */ | 21 */ |
| 23 @CommandLineFlags.Add("enable-blink-features=CanMakePayment") | |
| 24 public class PaymentRequestCanMakePaymentQueryTest extends PaymentRequestTestBas
e { | 22 public class PaymentRequestCanMakePaymentQueryTest extends PaymentRequestTestBas
e { |
| 25 public PaymentRequestCanMakePaymentQueryTest() { | 23 public PaymentRequestCanMakePaymentQueryTest() { |
| 26 super("payment_request_can_make_payment_query_test.html"); | 24 super("payment_request_can_make_payment_query_test.html"); |
| 27 } | 25 } |
| 28 | 26 |
| 29 @Override | 27 @Override |
| 30 public void onMainActivityStarted() throws InterruptedException, ExecutionEx
ception, | 28 public void onMainActivityStarted() throws InterruptedException, ExecutionEx
ception, |
| 31 TimeoutException { | 29 TimeoutException { |
| 32 // The user has a complete credit card on file. This is sufficient for | 30 // The user has a complete credit card on file. This is sufficient for |
| 33 // canMakePayment() to return true. | 31 // canMakePayment() to return true. |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 | 75 |
| 78 @MediumTest | 76 @MediumTest |
| 79 @Feature({"Payments"}) | 77 @Feature({"Payments"}) |
| 80 public void testPayViaSlowBobPay() throws InterruptedException, ExecutionExc
eption, | 78 public void testPayViaSlowBobPay() throws InterruptedException, ExecutionExc
eption, |
| 81 TimeoutException { | 79 TimeoutException { |
| 82 installPaymentApp(HAVE_INSTRUMENTS, DELAYED_RESPONSE); | 80 installPaymentApp(HAVE_INSTRUMENTS, DELAYED_RESPONSE); |
| 83 openPageAndClickBuyAndWait(mCanMakePaymentQueryResponded); | 81 openPageAndClickBuyAndWait(mCanMakePaymentQueryResponded); |
| 84 expectResultContains(new String[]{"true"}); | 82 expectResultContains(new String[]{"true"}); |
| 85 } | 83 } |
| 86 } | 84 } |
| OLD | NEW |