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

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

Issue 2914503002: align shipping option name to left and shipping cost to right on bottom sheet (Closed)
Patch Set: address comments Created 3 years, 6 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 2017 The Chromium Authors. All rights reserved. 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 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 static java.util.Arrays.asList; 7 import static java.util.Arrays.asList;
8 8
9 import android.os.Handler; 9 import android.os.Handler;
10 import android.view.KeyEvent; 10 import android.view.KeyEvent;
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 .toString(); 397 .toString();
398 } 398 }
399 }); 399 });
400 } 400 }
401 401
402 protected String getShippingAddressSummary() throws ExecutionException { 402 protected String getShippingAddressSummary() throws ExecutionException {
403 return ThreadUtils.runOnUiThreadBlocking(new Callable<String>() { 403 return ThreadUtils.runOnUiThreadBlocking(new Callable<String>() {
404 @Override 404 @Override
405 public String call() { 405 public String call() {
406 return mUI.getShippingAddressSectionForTest() 406 return mUI.getShippingAddressSectionForTest()
407 .getSummaryLabelForTest() 407 .getLeftSummaryLabelForTest()
408 .getText() 408 .getText()
409 .toString(); 409 .toString();
410 } 410 }
411 }); 411 });
412 } 412 }
413 413
414 protected String getShippingOptionSummary() throws ExecutionException { 414 protected String getShippingOptionSummary() throws ExecutionException {
415 return ThreadUtils.runOnUiThreadBlocking(new Callable<String>() { 415 return ThreadUtils.runOnUiThreadBlocking(new Callable<String>() {
416 @Override 416 @Override
417 public String call() { 417 public String call() {
418 return mUI.getShippingOptionSectionForTest() 418 return mUI.getShippingOptionSectionForTest()
419 .getSummaryLabelForTest() 419 .getLeftSummaryLabelForTest()
420 .getText() 420 .getText()
421 .toString(); 421 .toString();
422 } 422 }
423 });
424 }
425
426 protected String getShippingOptionCostSummary() throws ExecutionException {
gogerald1 2017/06/02 15:05:11 getShippingOptionCostSummaryOnBottomSheet?
wuandy1 2017/06/02 19:53:13 Done.
427 return ThreadUtils.runOnUiThreadBlocking(new Callable<String>() {
428 @Override
429 public String call() {
430 return mUI.getShippingOptionSectionForTest()
431 .getRightSummaryLabelForTest()
432 .getText()
433 .toString();
434 }
423 }); 435 });
424 } 436 }
425 437
426 protected View getCardEditorFocusedView() { 438 protected View getCardEditorFocusedView() {
427 return mUI.getCardEditorDialog().getCurrentFocus(); 439 return mUI.getCardEditorDialog().getCurrentFocus();
428 } 440 }
429 441
430 protected void clickOnShippingAddressSuggestionOptionAndWait( 442 protected void clickOnShippingAddressSuggestionOptionAndWait(
431 final int suggestionIndex, CallbackHelper helper) 443 final int suggestionIndex, CallbackHelper helper)
432 throws ExecutionException, TimeoutException, InterruptedException { 444 throws ExecutionException, TimeoutException, InterruptedException {
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
995 } 1007 }
996 1008
997 public interface PaymentRequestTestCommonCallback { 1009 public interface PaymentRequestTestCommonCallback {
998 ChromeTabbedActivity getActivity(); 1010 ChromeTabbedActivity getActivity();
999 void onMainActivityStarted() 1011 void onMainActivityStarted()
1000 throws InterruptedException, ExecutionException, TimeoutExceptio n; 1012 throws InterruptedException, ExecutionException, TimeoutExceptio n;
1001 void startMainActivityWithURL(String url) throws InterruptedException; 1013 void startMainActivityWithURL(String url) throws InterruptedException;
1002 void assertWaitForPageScaleFactorMatch(float expectedScale); 1014 void assertWaitForPageScaleFactorMatch(float expectedScale);
1003 } 1015 }
1004 } 1016 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698