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

Side by Side Diff: chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestBasicCardTest.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
« no previous file with comments | « no previous file | chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestCcCanMakePaymentQueryTest.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.content.DialogInterface; 7 import android.content.DialogInterface;
8 import android.support.test.filters.MediumTest; 8 import android.support.test.filters.MediumTest;
9 9
10 import org.chromium.base.test.util.CommandLineFlags; 10 import org.chromium.base.test.util.CommandLineFlags;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 } 70 }
71 71
72 @MediumTest 72 @MediumTest
73 @Feature({"Payments"}) 73 @Feature({"Payments"})
74 public void testSupportedNetworksMustMatchForCanMakePayment() 74 public void testSupportedNetworksMustMatchForCanMakePayment()
75 throws InterruptedException, ExecutionException, TimeoutException { 75 throws InterruptedException, ExecutionException, TimeoutException {
76 openPageAndClickNodeAndWait("checkBasicVisa", mCanMakePaymentQueryRespon ded); 76 openPageAndClickNodeAndWait("checkBasicVisa", mCanMakePaymentQueryRespon ded);
77 expectResultContains(new String[] {"true"}); 77 expectResultContains(new String[] {"true"});
78 78
79 clickNodeAndWait("checkBasicMasterCard", mCanMakePaymentQueryResponded); 79 clickNodeAndWait("checkBasicMasterCard", mCanMakePaymentQueryResponded);
80 expectResultContains(new String[] {"Query quota exceeded"}); 80 expectResultContains(new String[] {"Not allowed to check whether can mak e payment"});
81 81
82 clickNodeAndWait("checkBasicVisa", mCanMakePaymentQueryResponded); 82 clickNodeAndWait("checkBasicVisa", mCanMakePaymentQueryResponded);
83 expectResultContains(new String[] {"true"}); 83 expectResultContains(new String[] {"true"});
84 } 84 }
85 85
86 @MediumTest 86 @MediumTest
87 @Feature({"Payments"}) 87 @Feature({"Payments"})
88 public void testSupportedTypesMustMatchForCanMakePayment() 88 public void testSupportedTypesMustMatchForCanMakePayment()
89 throws InterruptedException, ExecutionException, TimeoutException { 89 throws InterruptedException, ExecutionException, TimeoutException {
90 openPageAndClickNodeAndWait("checkBasicVisa", mCanMakePaymentQueryRespon ded); 90 openPageAndClickNodeAndWait("checkBasicVisa", mCanMakePaymentQueryRespon ded);
91 expectResultContains(new String[] {"true"}); 91 expectResultContains(new String[] {"true"});
92 92
93 clickNodeAndWait("checkBasicDebit", mCanMakePaymentQueryResponded); 93 clickNodeAndWait("checkBasicDebit", mCanMakePaymentQueryResponded);
94 expectResultContains(new String[] {"Query quota exceeded"}); 94 expectResultContains(new String[] {"Not allowed to check whether can mak e payment"});
95 95
96 clickNodeAndWait("checkBasicVisa", mCanMakePaymentQueryResponded); 96 clickNodeAndWait("checkBasicVisa", mCanMakePaymentQueryResponded);
97 expectResultContains(new String[] {"true"}); 97 expectResultContains(new String[] {"true"});
98 } 98 }
99 99
100 /** 100 /**
101 * If the merchant requests supported methods of "mastercard" and "basic-car d" with "visa" 101 * If the merchant requests supported methods of "mastercard" and "basic-car d" with "visa"
102 * network support, then the user should be able to pay via their "visa" car d. The merchant will 102 * network support, then the user should be able to pay via their "visa" car d. The merchant will
103 * receive the "basic-card" method name. 103 * receive the "basic-card" method name.
104 */ 104 */
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 new int[] {DECEMBER, NEXT_YEAR, FIRST_BILLING_ADDRESS}, 160 new int[] {DECEMBER, NEXT_YEAR, FIRST_BILLING_ADDRESS},
161 mBillingAddressChangeProcessed); 161 mBillingAddressChangeProcessed);
162 clickInCardEditorAndWait(R.id.payments_edit_done_button, mReadyToPay); 162 clickInCardEditorAndWait(R.id.payments_edit_done_button, mReadyToPay);
163 clickAndWait(R.id.button_primary, mReadyForUnmaskInput); 163 clickAndWait(R.id.button_primary, mReadyForUnmaskInput);
164 setTextInCardUnmaskDialogAndWait(R.id.card_unmask_input, "123", mReadyTo Unmask); 164 setTextInCardUnmaskDialogAndWait(R.id.card_unmask_input, "123", mReadyTo Unmask);
165 clickCardUnmaskButtonAndWait(DialogInterface.BUTTON_POSITIVE, mDismissed ); 165 clickCardUnmaskButtonAndWait(DialogInterface.BUTTON_POSITIVE, mDismissed );
166 expectResultContains( 166 expectResultContains(
167 new String[] {"4242424242424242", "12", "Jane Jones", "123", "ba sic-card"}); 167 new String[] {"4242424242424242", "12", "Jane Jones", "123", "ba sic-card"});
168 } 168 }
169 } 169 }
OLDNEW
« no previous file with comments | « no previous file | chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestCcCanMakePaymentQueryTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698