| OLD | NEW |
| 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 701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 712 .isChecked(); | 712 .isChecked(); |
| 713 if (!isSelected) { | 713 if (!isSelected) { |
| 714 updateFailureReason("Payment Method row at " + index + " was
not selected."); | 714 updateFailureReason("Payment Method row at " + index + " was
not selected."); |
| 715 } | 715 } |
| 716 return isSelected; | 716 return isSelected; |
| 717 } | 717 } |
| 718 }); | 718 }); |
| 719 } | 719 } |
| 720 | 720 |
| 721 protected void assertOnlySpecificAbortMetricLogged(int abortReason) { | 721 protected void assertOnlySpecificAbortMetricLogged(int abortReason) { |
| 722 for (int i = 0; i < PaymentRequestMetrics.ABORT_REASON_MAX; ++i) { | 722 for (int i = 0; i < JourneyLogger.ABORT_REASON_MAX; ++i) { |
| 723 Assert.assertEquals( | 723 Assert.assertEquals( |
| 724 String.format(Locale.getDefault(), "Found %d instead of %d",
i, abortReason), | 724 String.format(Locale.getDefault(), "Found %d instead of %d",
i, abortReason), |
| 725 (i == abortReason ? 1 : 0), | 725 (i == abortReason ? 1 : 0), |
| 726 RecordHistogram.getHistogramValueCountForTesting( | 726 RecordHistogram.getHistogramValueCountForTesting( |
| 727 "PaymentRequest.CheckoutFunnel.Aborted", i)); | 727 "PaymentRequest.CheckoutFunnel.Aborted", i)); |
| 728 } | 728 } |
| 729 } | 729 } |
| 730 | 730 |
| 731 @Override | 731 @Override |
| 732 public void onPaymentRequestReadyForInput(PaymentRequestUI ui) { | 732 public void onPaymentRequestReadyForInput(PaymentRequestUI ui) { |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 983 } | 983 } |
| 984 | 984 |
| 985 public interface PaymentRequestTestCommonCallback { | 985 public interface PaymentRequestTestCommonCallback { |
| 986 ChromeTabbedActivity getActivity(); | 986 ChromeTabbedActivity getActivity(); |
| 987 void onMainActivityStarted() | 987 void onMainActivityStarted() |
| 988 throws InterruptedException, ExecutionException, TimeoutExceptio
n; | 988 throws InterruptedException, ExecutionException, TimeoutExceptio
n; |
| 989 void startMainActivityWithURL(String url) throws InterruptedException; | 989 void startMainActivityWithURL(String url) throws InterruptedException; |
| 990 void assertWaitForPageScaleFactorMatch(float expectedScale); | 990 void assertWaitForPageScaleFactorMatch(float expectedScale); |
| 991 } | 991 } |
| 992 } | 992 } |
| OLD | NEW |