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

Unified Diff: chrome/android/junit/src/org/chromium/chrome/browser/payments/AutofillAddressTest.java

Issue 2020913002: PaymentRequest: Rename ShippingAddress to PaymentAddress. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/android/junit/src/org/chromium/chrome/browser/payments/AutofillAddressTest.java
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/payments/AutofillAddressTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/payments/AutofillAddressTest.java
index 91b5847c99cb3aca3699d97d1cbb102ae7887abc..d3e07166999bab8fd13be846a94e5da6b6043fd1 100644
--- a/chrome/android/junit/src/org/chromium/chrome/browser/payments/AutofillAddressTest.java
+++ b/chrome/android/junit/src/org/chromium/chrome/browser/payments/AutofillAddressTest.java
@@ -5,7 +5,7 @@
package org.chromium.chrome.browser.payments;
import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile;
-import org.chromium.mojom.payments.ShippingAddress;
+import org.chromium.mojom.payments.PaymentAddress;
import org.chromium.testing.local.LocalRobolectricTestRunner;
import org.junit.Assert;
import org.junit.Test;
@@ -34,12 +34,12 @@ public class AutofillAddressTest {
}
@Test
- public void testToShippingAddress() {
+ public void testToPaymentAddress() {
AutofillAddress input = new AutofillAddress(new AutofillProfile("guid", "origin",
true /* isLocal */, "full name", "company name", "street\naddress", "region",
"locality", "dependent locality", "postal code", "sorting code", "US",
"phone number", "email@address.com", "en-Latn-US"));
- ShippingAddress output = input.toShippingAddress();
+ PaymentAddress output = input.toPaymentAddress();
Assert.assertEquals("US", output.regionCode);
Assert.assertArrayEquals(new String[]{"street", "address"}, output.addressLine);
Assert.assertEquals("region", output.administrativeArea);
@@ -54,46 +54,46 @@ public class AutofillAddressTest {
}
@Test
- public void testToShippingAddressWithoutMatchingLanguageScriptCode() {
+ public void testToPaymentAddressWithoutMatchingLanguageScriptCode() {
AutofillAddress input = new AutofillAddress(new AutofillProfile("guid", "origin",
true /* isLocal */, "full name", "company name", "street\naddress", "region",
"locality", "dependent locality", "postal code", "sorting code", "US",
"phone number", "email@address.com", "language-code"));
- ShippingAddress output = input.toShippingAddress();
+ PaymentAddress output = input.toPaymentAddress();
Assert.assertEquals("", output.languageCode);
Assert.assertEquals("", output.scriptCode);
}
@Test
- public void testToShippingAddressWithoutAnyLanguageScriptCode() {
+ public void testToPaymentAddressWithoutAnyLanguageScriptCode() {
AutofillAddress input = new AutofillAddress(new AutofillProfile("guid", "origin",
true /* isLocal */, "full name", "company name", "street\naddress", "region",
"locality", "dependent locality", "postal code", "sorting code", "US",
"phone number", "email@address.com", ""));
- ShippingAddress output = input.toShippingAddress();
+ PaymentAddress output = input.toPaymentAddress();
Assert.assertEquals("", output.languageCode);
Assert.assertEquals("", output.scriptCode);
}
@Test
- public void testToShippingAddressWithNullLanguageScriptCode() {
+ public void testToPaymentAddressWithNullLanguageScriptCode() {
AutofillAddress input = new AutofillAddress(new AutofillProfile("guid", "origin",
true /* isLocal */, "full name", "company name", "street\naddress", "region",
"locality", "dependent locality", "postal code", "sorting code", "US",
"phone number", "email@address.com", null));
- ShippingAddress output = input.toShippingAddress();
+ PaymentAddress output = input.toPaymentAddress();
Assert.assertEquals("", output.languageCode);
Assert.assertEquals("", output.scriptCode);
}
@Test
- public void testToShippingAddressTwice() {
+ public void testToPaymentAddressTwice() {
AutofillAddress input = new AutofillAddress(new AutofillProfile("guid", "origin",
true /* isLocal */, "full name", "company name", "street\naddress", "region",
"locality", "dependent locality", "postal code", "sorting code", "US",
"phone number", "email@address.com", "en-Latn"));
- ShippingAddress output1 = input.toShippingAddress();
- ShippingAddress output2 = input.toShippingAddress();
+ PaymentAddress output1 = input.toPaymentAddress();
+ PaymentAddress output2 = input.toPaymentAddress();
Assert.assertEquals("en", output1.languageCode);
Assert.assertEquals("en", output2.languageCode);
Assert.assertEquals("Latn", output1.scriptCode);

Powered by Google App Engine
This is Rietveld 408576698