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

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

Issue 2545523004: Rename canMakeActivePayment to canMakePayment (Closed)
Patch Set: Rebase Created 4 years 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.content.Context; 7 import android.content.Context;
8 import android.os.Handler; 8 import android.os.Handler;
9 import android.view.View; 9 import android.view.View;
10 import android.view.ViewGroup; 10 import android.view.ViewGroup;
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 protected final PaymentsCallbackHelper<CardUnmaskPrompt> mReadyForUnmaskInpu t; 81 protected final PaymentsCallbackHelper<CardUnmaskPrompt> mReadyForUnmaskInpu t;
82 protected final PaymentsCallbackHelper<CardUnmaskPrompt> mReadyToUnmask; 82 protected final PaymentsCallbackHelper<CardUnmaskPrompt> mReadyToUnmask;
83 protected final PaymentsCallbackHelper<CardUnmaskPrompt> mUnmaskValidationDo ne; 83 protected final PaymentsCallbackHelper<CardUnmaskPrompt> mUnmaskValidationDo ne;
84 protected final CallbackHelper mReadyToEdit; 84 protected final CallbackHelper mReadyToEdit;
85 protected final CallbackHelper mEditorValidationError; 85 protected final CallbackHelper mEditorValidationError;
86 protected final CallbackHelper mEditorTextUpdate; 86 protected final CallbackHelper mEditorTextUpdate;
87 protected final CallbackHelper mDismissed; 87 protected final CallbackHelper mDismissed;
88 protected final CallbackHelper mUnableToAbort; 88 protected final CallbackHelper mUnableToAbort;
89 protected final CallbackHelper mBillingAddressChangeProcessed; 89 protected final CallbackHelper mBillingAddressChangeProcessed;
90 protected final CallbackHelper mShowFailed; 90 protected final CallbackHelper mShowFailed;
91 protected final CallbackHelper mActivePaymentQueryResponded; 91 protected final CallbackHelper mCanMakePaymentQueryResponded;
92 protected final CallbackHelper mExpirationMonthChange; 92 protected final CallbackHelper mExpirationMonthChange;
93 protected PaymentRequestUI mUI; 93 protected PaymentRequestUI mUI;
94 94
95 private final AtomicReference<ContentViewCore> mViewCoreRef; 95 private final AtomicReference<ContentViewCore> mViewCoreRef;
96 private final AtomicReference<WebContents> mWebContentsRef; 96 private final AtomicReference<WebContents> mWebContentsRef;
97 private final String mTestFilePath; 97 private final String mTestFilePath;
98 private CardUnmaskPrompt mCardUnmaskPrompt; 98 private CardUnmaskPrompt mCardUnmaskPrompt;
99 99
100 protected PaymentRequestTestBase(String testFileName) { 100 protected PaymentRequestTestBase(String testFileName) {
101 super(ChromeTabbedActivity.class); 101 super(ChromeTabbedActivity.class);
102 mReadyForInput = new PaymentsCallbackHelper<>(); 102 mReadyForInput = new PaymentsCallbackHelper<>();
103 mReadyToPay = new PaymentsCallbackHelper<>(); 103 mReadyToPay = new PaymentsCallbackHelper<>();
104 mSelectionChecked = new PaymentsCallbackHelper<>(); 104 mSelectionChecked = new PaymentsCallbackHelper<>();
105 mResultReady = new PaymentsCallbackHelper<>(); 105 mResultReady = new PaymentsCallbackHelper<>();
106 mReadyForUnmaskInput = new PaymentsCallbackHelper<>(); 106 mReadyForUnmaskInput = new PaymentsCallbackHelper<>();
107 mReadyToUnmask = new PaymentsCallbackHelper<>(); 107 mReadyToUnmask = new PaymentsCallbackHelper<>();
108 mUnmaskValidationDone = new PaymentsCallbackHelper<>(); 108 mUnmaskValidationDone = new PaymentsCallbackHelper<>();
109 mReadyToEdit = new CallbackHelper(); 109 mReadyToEdit = new CallbackHelper();
110 mEditorValidationError = new CallbackHelper(); 110 mEditorValidationError = new CallbackHelper();
111 mEditorTextUpdate = new CallbackHelper(); 111 mEditorTextUpdate = new CallbackHelper();
112 mDismissed = new CallbackHelper(); 112 mDismissed = new CallbackHelper();
113 mUnableToAbort = new CallbackHelper(); 113 mUnableToAbort = new CallbackHelper();
114 mBillingAddressChangeProcessed = new CallbackHelper(); 114 mBillingAddressChangeProcessed = new CallbackHelper();
115 mExpirationMonthChange = new CallbackHelper(); 115 mExpirationMonthChange = new CallbackHelper();
116 mShowFailed = new CallbackHelper(); 116 mShowFailed = new CallbackHelper();
117 mActivePaymentQueryResponded = new CallbackHelper(); 117 mCanMakePaymentQueryResponded = new CallbackHelper();
118 mViewCoreRef = new AtomicReference<>(); 118 mViewCoreRef = new AtomicReference<>();
119 mWebContentsRef = new AtomicReference<>(); 119 mWebContentsRef = new AtomicReference<>();
120 mTestFilePath = UrlUtils.getIsolatedTestFilePath( 120 mTestFilePath = UrlUtils.getIsolatedTestFilePath(
121 String.format("chrome/test/data/android/payments/%s", testFileNa me)); 121 String.format("chrome/test/data/android/payments/%s", testFileNa me));
122 } 122 }
123 123
124 @Override 124 @Override
125 public void startMainActivity() throws InterruptedException {} 125 public void startMainActivity() throws InterruptedException {}
126 126
127 protected abstract void onMainActivityStarted() 127 protected abstract void onMainActivityStarted()
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 mExpirationMonthChange.notifyCalled(); 661 mExpirationMonthChange.notifyCalled();
662 } 662 }
663 663
664 @Override 664 @Override
665 public void onPaymentRequestServiceShowFailed() { 665 public void onPaymentRequestServiceShowFailed() {
666 ThreadUtils.assertOnUiThread(); 666 ThreadUtils.assertOnUiThread();
667 mShowFailed.notifyCalled(); 667 mShowFailed.notifyCalled();
668 } 668 }
669 669
670 @Override 670 @Override
671 public void onPaymentRequestServiceActivePaymentQueryResponded() { 671 public void onPaymentRequestServiceCanMakePaymentQueryResponded() {
672 ThreadUtils.assertOnUiThread(); 672 ThreadUtils.assertOnUiThread();
673 mActivePaymentQueryResponded.notifyCalled(); 673 mCanMakePaymentQueryResponded.notifyCalled();
674 } 674 }
675 675
676 @Override 676 @Override
677 public void onCardUnmaskPromptReadyForInput(CardUnmaskPrompt prompt) { 677 public void onCardUnmaskPromptReadyForInput(CardUnmaskPrompt prompt) {
678 ThreadUtils.assertOnUiThread(); 678 ThreadUtils.assertOnUiThread();
679 mReadyForUnmaskInput.notifyCalled(prompt); 679 mReadyForUnmaskInput.notifyCalled(prompt);
680 mCardUnmaskPrompt = prompt; 680 mCardUnmaskPrompt = prompt;
681 } 681 }
682 682
683 @Override 683 @Override
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 List<PaymentItem> cart, Map<String, PaymentMethodData> methodDat a, 835 List<PaymentItem> cart, Map<String, PaymentMethodData> methodDat a,
836 InstrumentDetailsCallback detailsCallback) { 836 InstrumentDetailsCallback detailsCallback) {
837 detailsCallback.onInstrumentDetailsReady( 837 detailsCallback.onInstrumentDetailsReady(
838 mMethodName, "{\"transaction\": 1337}"); 838 mMethodName, "{\"transaction\": 1337}");
839 } 839 }
840 840
841 @Override 841 @Override
842 public void dismissInstrument() {} 842 public void dismissInstrument() {}
843 } 843 }
844 } 844 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698