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

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

Issue 2885443003: enable modifiers for native apps (Closed)
Patch Set: remove other modifer test Created 3 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 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.support.test.filters.MediumTest;
8
9 import org.junit.Rule;
10 import org.junit.Test;
11 import org.junit.runner.RunWith;
12
13 import org.chromium.base.test.util.CommandLineFlags;
14 import org.chromium.base.test.util.Feature;
15 import org.chromium.chrome.browser.ChromeSwitches;
16 import org.chromium.chrome.browser.payments.PaymentRequestTestRule.MainActivityS tartCallback;
17 import org.chromium.chrome.test.ChromeActivityTestRule;
18 import org.chromium.chrome.test.ChromeJUnit4ClassRunner;
19
20 import java.util.concurrent.ExecutionException;
21 import java.util.concurrent.TimeoutException;
22
23 /** A payment request integration test for a merchant that uses a modifier. */
24 @RunWith(ChromeJUnit4ClassRunner.class)
25 @CommandLineFlags.Add({
26 ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE,
27 ChromeActivityTestRule.DISABLE_NETWORK_PREDICTION_FLAG,
28 })
29 public class PaymentRequestModifierTest implements MainActivityStartCallback {
30 @Rule
31 public PaymentRequestTestRule mPaymentRequestTestRule =
32 new PaymentRequestTestRule("payment_request_modifier_test.html", thi s);
33
34 @Override
35 public void onMainActivityStarted()
36 throws InterruptedException, ExecutionException, TimeoutException {}
37
38 /** Using modifiers should not crash. */
39 @Test
40 @MediumTest
41 @Feature({"Payments"})
42 public void testNoCrash() throws InterruptedException, ExecutionException, T imeoutException {
43 mPaymentRequestTestRule.openPageAndClickBuyAndWait(mPaymentRequestTestRu le.getShowFailed());
44 mPaymentRequestTestRule.expectResultContains(
45 new String[] {"The payment method is not supported"});
46 }
47 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698