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

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

Issue 2287513002: [Payments] Show name and address when selecting a CC billing address. (Closed)
Patch Set: Fixed error Created 4 years, 3 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.os.Handler; 7 import android.os.Handler;
8 import android.view.View; 8 import android.view.View;
9 import android.view.ViewGroup; 9 import android.view.ViewGroup;
10 import android.widget.CheckBox; 10 import android.widget.CheckBox;
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 throws ExecutionException { 373 throws ExecutionException {
374 return ThreadUtils.runOnUiThreadBlocking(new Callable<OptionRow>() { 374 return ThreadUtils.runOnUiThreadBlocking(new Callable<OptionRow>() {
375 @Override 375 @Override
376 public OptionRow call() { 376 public OptionRow call() {
377 return ((OptionSection) mUI.getShippingAddressSectionForTest()) 377 return ((OptionSection) mUI.getShippingAddressSectionForTest())
378 .getOptionRowAtIndex(index); 378 .getOptionRowAtIndex(index);
379 } 379 }
380 }); 380 });
381 } 381 }
382 382
383 /** Returns the selected spinner value in the editor UI for credit cards. */
384 protected String getSpinnerSelectionTextInCardEditor(final int dropdownIndex )
385 throws ExecutionException {
386 return ThreadUtils.runOnUiThreadBlocking(new Callable<String>() {
387 @Override
388 public String call() {
389 return mUI.getCardEditorView().getDropdownFieldsForTest().get(dr opdownIndex)
390 .getSelectedItem().toString();
391 }
392 });
393 }
394
383 /** Selects the spinner value in the editor UI for credit cards. */ 395 /** Selects the spinner value in the editor UI for credit cards. */
384 protected void setSpinnerSelectionsInCardEditorAndWait(final int[] selection s, 396 protected void setSpinnerSelectionsInCardEditorAndWait(final int[] selection s,
385 CallbackHelper helper) throws InterruptedException, TimeoutException { 397 CallbackHelper helper) throws InterruptedException, TimeoutException {
386 int callCount = helper.getCallCount(); 398 int callCount = helper.getCallCount();
387 ThreadUtils.runOnUiThreadBlocking(new Runnable() { 399 ThreadUtils.runOnUiThreadBlocking(new Runnable() {
388 @Override 400 @Override
389 public void run() { 401 public void run() {
390 List<Spinner> fields = mUI.getCardEditorView().getDropdownFields ForTest(); 402 List<Spinner> fields = mUI.getCardEditorView().getDropdownFields ForTest();
391 for (int i = 0; i < selections.length && i < fields.size(); i++) { 403 for (int i = 0; i < selections.length && i < fields.size(); i++) {
392 fields.get(i).setSelection(selections[i]); 404 fields.get(i).setSelection(selections[i]);
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 public void getDetails(String merchantName, String origin, PaymentItem t otal, 728 public void getDetails(String merchantName, String origin, PaymentItem t otal,
717 List<PaymentItem> cart, JSONObject details, DetailsCallback deta ilsCallback) { 729 List<PaymentItem> cart, JSONObject details, DetailsCallback deta ilsCallback) {
718 detailsCallback.onInstrumentDetailsReady( 730 detailsCallback.onInstrumentDetailsReady(
719 mMethodName, "{\"transaction\": 1337}"); 731 mMethodName, "{\"transaction\": 1337}");
720 } 732 }
721 733
722 @Override 734 @Override
723 public void dismiss() {} 735 public void dismiss() {}
724 } 736 }
725 } 737 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698