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

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

Issue 2807023002: PaymentRequest: Use "NotAllowedError" instead of "QuotaExceededError". (Closed)
Patch Set: PaymentRequest: Use "NotAllowedError" instead of "QuotaExceededError". Created 3 years, 8 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
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.support.test.filters.MediumTest; 7 import android.support.test.filters.MediumTest;
8 8
9 import org.chromium.base.test.util.Feature; 9 import org.chromium.base.test.util.Feature;
10 10
(...skipping 13 matching lines...) Expand all
24 TimeoutException {} 24 TimeoutException {}
25 25
26 @MediumTest 26 @MediumTest
27 @Feature({"Payments"}) 27 @Feature({"Payments"})
28 public void testNoBobPayInstalled() throws InterruptedException, ExecutionEx ception, 28 public void testNoBobPayInstalled() throws InterruptedException, ExecutionEx ception,
29 TimeoutException { 29 TimeoutException {
30 openPageAndClickBuyAndWait(mCanMakePaymentQueryResponded); 30 openPageAndClickBuyAndWait(mCanMakePaymentQueryResponded);
31 expectResultContains(new String[] {"false, false"}); 31 expectResultContains(new String[] {"false, false"});
32 32
33 clickNodeAndWait("otherBuy", mCanMakePaymentQueryResponded); 33 clickNodeAndWait("otherBuy", mCanMakePaymentQueryResponded);
34 expectResultContains(new String[] {"false, QuotaExceededError"}); 34 expectResultContains(new String[] {"false, NotAllowedError"});
35 } 35 }
36 36
37 @MediumTest 37 @MediumTest
38 @Feature({"Payments"}) 38 @Feature({"Payments"})
39 public void testBobPayInstalledLater() 39 public void testBobPayInstalledLater()
40 throws InterruptedException, ExecutionException, TimeoutException { 40 throws InterruptedException, ExecutionException, TimeoutException {
41 openPageAndClickBuyAndWait(mCanMakePaymentQueryResponded); 41 openPageAndClickBuyAndWait(mCanMakePaymentQueryResponded);
42 expectResultContains(new String[] {"false, false"}); 42 expectResultContains(new String[] {"false, false"});
43 43
44 installPaymentApp(HAVE_INSTRUMENTS, IMMEDIATE_RESPONSE); 44 installPaymentApp(HAVE_INSTRUMENTS, IMMEDIATE_RESPONSE);
45 45
46 clickNodeAndWait("otherBuy", mCanMakePaymentQueryResponded); 46 clickNodeAndWait("otherBuy", mCanMakePaymentQueryResponded);
47 expectResultContains(new String[] {"true, QuotaExceededError"}); 47 expectResultContains(new String[] {"true, NotAllowedError"});
48 } 48 }
49 49
50 @MediumTest 50 @MediumTest
51 @Feature({"Payments"}) 51 @Feature({"Payments"})
52 public void testNoInstrumentsInFastBobPay() throws InterruptedException, Exe cutionException, 52 public void testNoInstrumentsInFastBobPay() throws InterruptedException, Exe cutionException,
53 TimeoutException { 53 TimeoutException {
54 installPaymentApp(NO_INSTRUMENTS, IMMEDIATE_RESPONSE); 54 installPaymentApp(NO_INSTRUMENTS, IMMEDIATE_RESPONSE);
55 openPageAndClickBuyAndWait(mCanMakePaymentQueryResponded); 55 openPageAndClickBuyAndWait(mCanMakePaymentQueryResponded);
56 expectResultContains(new String[] {"false, false"}); 56 expectResultContains(new String[] {"false, false"});
57 57
58 clickNodeAndWait("otherBuy", mCanMakePaymentQueryResponded); 58 clickNodeAndWait("otherBuy", mCanMakePaymentQueryResponded);
59 expectResultContains(new String[] {"false, QuotaExceededError"}); 59 expectResultContains(new String[] {"false, NotAllowedError"});
60 } 60 }
61 61
62 @MediumTest 62 @MediumTest
63 @Feature({"Payments"}) 63 @Feature({"Payments"})
64 public void testNoInstrumentsInSlowBobPay() throws InterruptedException, Exe cutionException, 64 public void testNoInstrumentsInSlowBobPay() throws InterruptedException, Exe cutionException,
65 TimeoutException { 65 TimeoutException {
66 installPaymentApp(NO_INSTRUMENTS, DELAYED_RESPONSE); 66 installPaymentApp(NO_INSTRUMENTS, DELAYED_RESPONSE);
67 openPageAndClickBuyAndWait(mCanMakePaymentQueryResponded); 67 openPageAndClickBuyAndWait(mCanMakePaymentQueryResponded);
68 expectResultContains(new String[] {"false, false"}); 68 expectResultContains(new String[] {"false, false"});
69 69
70 clickNodeAndWait("otherBuy", mCanMakePaymentQueryResponded); 70 clickNodeAndWait("otherBuy", mCanMakePaymentQueryResponded);
71 expectResultContains(new String[] {"false, QuotaExceededError"}); 71 expectResultContains(new String[] {"false, NotAllowedError"});
72 } 72 }
73 73
74 @MediumTest 74 @MediumTest
75 @Feature({"Payments"}) 75 @Feature({"Payments"})
76 public void testPayViaFastBobPay() throws InterruptedException, ExecutionExc eption, 76 public void testPayViaFastBobPay() throws InterruptedException, ExecutionExc eption,
77 TimeoutException { 77 TimeoutException {
78 installPaymentApp(HAVE_INSTRUMENTS, IMMEDIATE_RESPONSE); 78 installPaymentApp(HAVE_INSTRUMENTS, IMMEDIATE_RESPONSE);
79 openPageAndClickBuyAndWait(mCanMakePaymentQueryResponded); 79 openPageAndClickBuyAndWait(mCanMakePaymentQueryResponded);
80 expectResultContains(new String[] {"true, true"}); 80 expectResultContains(new String[] {"true, true"});
81 81
82 clickNodeAndWait("otherBuy", mCanMakePaymentQueryResponded); 82 clickNodeAndWait("otherBuy", mCanMakePaymentQueryResponded);
83 expectResultContains(new String[] {"true, QuotaExceededError"}); 83 expectResultContains(new String[] {"true, NotAllowedError"});
84 } 84 }
85 85
86 @MediumTest 86 @MediumTest
87 @Feature({"Payments"}) 87 @Feature({"Payments"})
88 public void testPayViaSlowBobPay() throws InterruptedException, ExecutionExc eption, 88 public void testPayViaSlowBobPay() throws InterruptedException, ExecutionExc eption,
89 TimeoutException { 89 TimeoutException {
90 installPaymentApp(HAVE_INSTRUMENTS, DELAYED_RESPONSE); 90 installPaymentApp(HAVE_INSTRUMENTS, DELAYED_RESPONSE);
91 openPageAndClickBuyAndWait(mCanMakePaymentQueryResponded); 91 openPageAndClickBuyAndWait(mCanMakePaymentQueryResponded);
92 expectResultContains(new String[] {"true, true"}); 92 expectResultContains(new String[] {"true, true"});
93 93
94 clickNodeAndWait("otherBuy", mCanMakePaymentQueryResponded); 94 clickNodeAndWait("otherBuy", mCanMakePaymentQueryResponded);
95 expectResultContains(new String[] {"true, QuotaExceededError"}); 95 expectResultContains(new String[] {"true, NotAllowedError"});
96 } 96 }
97 } 97 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698