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

Unified Diff: third_party/WebKit/Source/modules/payments/PaymentAddressTest.cpp

Issue 2039863002: PaymentRequest: Sync up PaymentAddress with the payment request spec. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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: third_party/WebKit/Source/modules/payments/PaymentAddressTest.cpp
diff --git a/third_party/WebKit/Source/modules/payments/PaymentAddressTest.cpp b/third_party/WebKit/Source/modules/payments/PaymentAddressTest.cpp
index bd7152fc97a4c7014f4ce209797aa579be432dae..eff05f3fcbce7eea6f842355b9677627f3782cf7 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentAddressTest.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentAddressTest.cpp
@@ -13,13 +13,13 @@ namespace {
TEST(PaymentAddressTest, ValuesAreCopiedOver)
{
mojom::blink::PaymentAddressPtr input = mojom::blink::PaymentAddress::New();
- input->region_code = "US";
+ input->country = "US";
input->address_line = mojo::WTFArray<WTF::String>::New(3);
input->address_line[0] = "340 Main St";
input->address_line[1] = "BIN1";
input->address_line[2] = "First floor";
- input->administrative_area = "CA";
- input->locality = "Los Angeles";
+ input->region = "CA";
+ input->city = "Los Angeles";
input->dependent_locality = "Venice";
input->postal_code = "90291";
input->sorting_code = "CEDEX";
@@ -27,22 +27,26 @@ TEST(PaymentAddressTest, ValuesAreCopiedOver)
input->script_code = "Latn";
input->organization = "Google";
input->recipient = "Jon Doe";
+ input->careOf = "";
+ input->phone = "Phone Number";
PaymentAddress output(std::move(input));
- EXPECT_EQ("US", output.regionCode());
+ EXPECT_EQ("US", output.country());
EXPECT_EQ(3U, output.addressLine().size());
EXPECT_EQ("340 Main St", output.addressLine()[0]);
EXPECT_EQ("BIN1", output.addressLine()[1]);
EXPECT_EQ("First floor", output.addressLine()[2]);
- EXPECT_EQ("CA", output.administrativeArea());
- EXPECT_EQ("Los Angeles", output.locality());
+ EXPECT_EQ("CA", output.region());
+ EXPECT_EQ("Los Angeles", output.city());
EXPECT_EQ("Venice", output.dependentLocality());
EXPECT_EQ("90291", output.postalCode());
EXPECT_EQ("CEDEX", output.sortingCode());
EXPECT_EQ("en-Latn", output.languageCode());
EXPECT_EQ("Google", output.organization());
EXPECT_EQ("Jon Doe", output.recipient());
+ EXPECT_EQ("", output.careOf());
+ EXPECT_EQ("Phone Number", output.phone());
}
TEST(PaymentAddressTest, IgnoreScriptCodeWithEmptyLanguageCode)

Powered by Google App Engine
This is Rietveld 408576698