| 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);
|
|
|