| Index: chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestShippingAddressTest.java | 
| diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestShippingAddressTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestShippingAddressTest.java | 
| index 7776ede9384c706b6d7eff22eb9659906613bde4..b82b016a7683a55aa5abc4f86edd76d082b13845 100644 | 
| --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestShippingAddressTest.java | 
| +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestShippingAddressTest.java | 
| @@ -113,4 +113,38 @@ public class PaymentRequestShippingAddressTest extends PaymentRequestTestBase { | 
| assertTrue(getShippingAddressOptionRowAtIndex(0).getLabelText().toString().equals( | 
| "Seb Doe\nGoogle, 340 Main St, Los Angeles, CA 90291\n555-555-5555")); | 
| } | 
| + | 
| +    /** Test that going into the editor and cancelling will leave the row checked. */ | 
| +    @MediumTest | 
| +    @Feature({"Payments"}) | 
| +    public void testEditShippingAddressAndCancelEditorShouldKeepAddressSelected() | 
| +            throws InterruptedException, ExecutionException, TimeoutException { | 
| +        triggerUIAndWait(mReadyToPay); | 
| +        clickInShippingSummaryAndWait(R.id.payments_section, mReadyForInput); | 
| +        expectShippingAddressRowIsSelected(0); | 
| +        clickInShippingAddressAndWait(R.id.payments_open_editor_pencil_button, mReadyToEdit); | 
| + | 
| +        // Cancel the editor. | 
| +        clickInEditorAndWait(R.id.payments_edit_cancel_button, mReadyForInput); | 
| + | 
| +        // Expect the row to still be selected in the Shipping Address section. | 
| +        expectShippingAddressRowIsSelected(0); | 
| +    } | 
| + | 
| +    /** Test that going into the "add" flow  and cancelling will leave the existing row checked. */ | 
| +    @MediumTest | 
| +    @Feature({"Payments"}) | 
| +    public void testAddShippingAddressAndCancelEditorShouldKeepAddressSelected() | 
| +            throws InterruptedException, ExecutionException, TimeoutException { | 
| +        triggerUIAndWait(mReadyToPay); | 
| +        clickInShippingSummaryAndWait(R.id.payments_section, mReadyForInput); | 
| +        expectShippingAddressRowIsSelected(0); | 
| +        clickInShippingAddressAndWait(R.id.payments_add_option_button, mReadyToEdit); | 
| + | 
| +        // Cancel the editor. | 
| +        clickInEditorAndWait(R.id.payments_edit_cancel_button, mReadyForInput); | 
| + | 
| +        // Expect the existing row to still be selected in the Shipping Address section. | 
| +        expectShippingAddressRowIsSelected(0); | 
| +    } | 
| } | 
|  |