OLD | NEW |
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 static org.chromium.chrome.browser.payments.PaymentRequestTestRule.DELAYE
D_RESPONSE; | 7 import static org.chromium.chrome.browser.payments.PaymentRequestTestRule.DELAYE
D_RESPONSE; |
8 import static org.chromium.chrome.browser.payments.PaymentRequestTestRule.NO_INS
TRUMENTS; | 8 import static org.chromium.chrome.browser.payments.PaymentRequestTestRule.NO_INS
TRUMENTS; |
9 | 9 |
10 import android.content.DialogInterface; | 10 import android.content.DialogInterface; |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 mPaymentRequestTestRule.clickInShippingAddressAndWait( | 187 mPaymentRequestTestRule.clickInShippingAddressAndWait( |
188 R.id.payments_section, mPaymentRequestTestRule.getReadyForInput(
)); | 188 R.id.payments_section, mPaymentRequestTestRule.getReadyForInput(
)); |
189 | 189 |
190 // Add a new shipping address. | 190 // Add a new shipping address. |
191 mPaymentRequestTestRule.clickInShippingAddressAndWait( | 191 mPaymentRequestTestRule.clickInShippingAddressAndWait( |
192 R.id.payments_add_option_button, mPaymentRequestTestRule.getRead
yToEdit()); | 192 R.id.payments_add_option_button, mPaymentRequestTestRule.getRead
yToEdit()); |
193 mPaymentRequestTestRule.setSpinnerSelectionInEditorAndWait( | 193 mPaymentRequestTestRule.setSpinnerSelectionInEditorAndWait( |
194 0 /* Afghanistan */, mPaymentRequestTestRule.getReadyToEdit()); | 194 0 /* Afghanistan */, mPaymentRequestTestRule.getReadyToEdit()); |
195 mPaymentRequestTestRule.setTextInEditorAndWait( | 195 mPaymentRequestTestRule.setTextInEditorAndWait( |
196 new String[] { | 196 new String[] { |
197 "Alice", "Supreme Court", "Airport Road", "Kabul", "1043
", "650-253-0000"}, | 197 "Alice", "Supreme Court", "Airport Road", "Kabul", "1043
", "020-253-0000"}, |
198 mPaymentRequestTestRule.getEditorTextUpdate()); | 198 mPaymentRequestTestRule.getEditorTextUpdate()); |
199 mPaymentRequestTestRule.clickInEditorAndWait( | 199 mPaymentRequestTestRule.clickInEditorAndWait( |
200 R.id.payments_edit_done_button, mPaymentRequestTestRule.getReady
ToPay()); | 200 R.id.payments_edit_done_button, mPaymentRequestTestRule.getReady
ToPay()); |
201 | 201 |
202 // Complete the transaction. | 202 // Complete the transaction. |
203 mPaymentRequestTestRule.clickAndWait( | 203 mPaymentRequestTestRule.clickAndWait( |
204 R.id.button_primary, mPaymentRequestTestRule.getReadyForUnmaskIn
put()); | 204 R.id.button_primary, mPaymentRequestTestRule.getReadyForUnmaskIn
put()); |
205 mPaymentRequestTestRule.setTextInCardUnmaskDialogAndWait( | 205 mPaymentRequestTestRule.setTextInCardUnmaskDialogAndWait( |
206 R.id.card_unmask_input, "123", mPaymentRequestTestRule.getReadyT
oUnmask()); | 206 R.id.card_unmask_input, "123", mPaymentRequestTestRule.getReadyT
oUnmask()); |
207 mPaymentRequestTestRule.clickCardUnmaskButtonAndWait( | 207 mPaymentRequestTestRule.clickCardUnmaskButtonAndWait( |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 RecordHistogram.getHistogramValueCountForTesting( | 446 RecordHistogram.getHistogramValueCountForTesting( |
447 "PaymentRequest.NumberOfSuggestionsShown.ShippingAddress
.UserAborted", 2)); | 447 "PaymentRequest.NumberOfSuggestionsShown.ShippingAddress
.UserAborted", 2)); |
448 Assert.assertEquals(0, | 448 Assert.assertEquals(0, |
449 RecordHistogram.getHistogramValueCountForTesting( | 449 RecordHistogram.getHistogramValueCountForTesting( |
450 "PaymentRequest.NumberOfSuggestionsShown.ShippingAddress
.OtherAborted", 2)); | 450 "PaymentRequest.NumberOfSuggestionsShown.ShippingAddress
.OtherAborted", 2)); |
451 Assert.assertEquals(0, | 451 Assert.assertEquals(0, |
452 RecordHistogram.getHistogramValueCountForTesting( | 452 RecordHistogram.getHistogramValueCountForTesting( |
453 "PaymentRequest.NumberOfSuggestionsShown.ShippingAddress
.Completed", 2)); | 453 "PaymentRequest.NumberOfSuggestionsShown.ShippingAddress
.Completed", 2)); |
454 } | 454 } |
455 } | 455 } |
OLD | NEW |