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

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

Issue 2680143002: Use dropdown list for admin areas in pr form. (Closed)
Patch Set: Touch ups Created 3 years, 10 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.support.test.filters.MediumTest; 7 import android.support.test.filters.MediumTest;
8 8
9 import org.chromium.base.test.util.Feature; 9 import org.chromium.base.test.util.Feature;
10 import org.chromium.chrome.R; 10 import org.chromium.chrome.R;
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 @MediumTest 99 @MediumTest
100 @Feature({"Payments"}) 100 @Feature({"Payments"})
101 public void testShippingAddressFormat_NewAddress() 101 public void testShippingAddressFormat_NewAddress()
102 throws InterruptedException, ExecutionException, TimeoutException { 102 throws InterruptedException, ExecutionException, TimeoutException {
103 triggerUIAndWait(mReadyToPay); 103 triggerUIAndWait(mReadyToPay);
104 104
105 // Add a shipping address. 105 // Add a shipping address.
106 clickInShippingSummaryAndWait(R.id.payments_section, mReadyForInput); 106 clickInShippingSummaryAndWait(R.id.payments_section, mReadyForInput);
107 clickInShippingAddressAndWait(R.id.payments_add_option_button, mReadyToE dit); 107 clickInShippingAddressAndWait(R.id.payments_add_option_button, mReadyToE dit);
108 setTextInEditorAndWait(new String[] {"Seb Doe", "Google", "340 Main St", "Los Angeles", 108 setTextInEditorAndWait(new String[] {"Seb Doe", "Google", "340 Main St", "Los Angeles",
109 "CA", "90291", "555-555-5555"}, mEditorTextUpdate); 109 "90291", "555-555-5555"},
110 mEditorTextUpdate);
111 setSpinnerSelectionsInEditorAndWait(new int[] {US, CA}, mEditorTextUpdat e);
110 clickInEditorAndWait(R.id.payments_edit_done_button, mReadyToPay); 112 clickInEditorAndWait(R.id.payments_edit_done_button, mReadyToPay);
111 113
112 // Make sure that the shipping label does not include the country. 114 // Make sure that the shipping label does not include the country.
113 assertTrue(getShippingAddressOptionRowAtIndex(0).getLabelText().toString ().equals( 115 assertTrue(getShippingAddressOptionRowAtIndex(0).getLabelText().toString ().equals(
114 "Seb Doe\nGoogle, 340 Main St, Los Angeles, CA 90291\n555-555-55 55")); 116 "Seb Doe\nGoogle, 340 Main St, Los Angeles, CA 90291\n555-555-55 55"));
115 } 117 }
116 118
117 /** 119 /**
118 * Test that going into the editor and clicking 'CANCEL' button to cancel ed itor will leave the 120 * Test that going into the editor and clicking 'CANCEL' button to cancel ed itor will leave the
119 * row checked. 121 * row checked.
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 expectShippingAddressRowIsSelected(0); 189 expectShippingAddressRowIsSelected(0);
188 clickInShippingAddressAndWait(R.id.payments_add_option_button, mReadyToE dit); 190 clickInShippingAddressAndWait(R.id.payments_add_option_button, mReadyToE dit);
189 191
190 // Cancel the editor by clicking Android back button. 192 // Cancel the editor by clicking Android back button.
191 clickAndroidBackButtonInEditorAndWait(mReadyToPay); 193 clickAndroidBackButtonInEditorAndWait(mReadyToPay);
192 194
193 // Expect the existing row to still be selected in the Shipping Address section. 195 // Expect the existing row to still be selected in the Shipping Address section.
194 expectShippingAddressRowIsSelected(0); 196 expectShippingAddressRowIsSelected(0);
195 } 197 }
196 } 198 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698