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

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

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: third_party/WebKit/Source/modules/payments/PaymentAddressTest.cpp
diff --git a/third_party/WebKit/Source/modules/payments/ShippingAddressTest.cpp b/third_party/WebKit/Source/modules/payments/PaymentAddressTest.cpp
similarity index 73%
rename from third_party/WebKit/Source/modules/payments/ShippingAddressTest.cpp
rename to third_party/WebKit/Source/modules/payments/PaymentAddressTest.cpp
index 6bd7ede59dbe778bd6066a9c5372b9ccab51087e..bd7152fc97a4c7014f4ce209797aa579be432dae 100644
--- a/third_party/WebKit/Source/modules/payments/ShippingAddressTest.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentAddressTest.cpp
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "modules/payments/ShippingAddress.h"
+#include "modules/payments/PaymentAddress.h"
#include "testing/gtest/include/gtest/gtest.h"
#include <utility>
@@ -10,9 +10,9 @@
namespace blink {
namespace {
-TEST(ShippingAddressTest, ValuesAreCopiedOver)
+TEST(PaymentAddressTest, ValuesAreCopiedOver)
{
- mojom::blink::ShippingAddressPtr input = mojom::blink::ShippingAddress::New();
+ mojom::blink::PaymentAddressPtr input = mojom::blink::PaymentAddress::New();
input->region_code = "US";
input->address_line = mojo::WTFArray<WTF::String>::New(3);
input->address_line[0] = "340 Main St";
@@ -28,7 +28,7 @@ TEST(ShippingAddressTest, ValuesAreCopiedOver)
input->organization = "Google";
input->recipient = "Jon Doe";
- ShippingAddress output(std::move(input));
+ PaymentAddress output(std::move(input));
EXPECT_EQ("US", output.regionCode());
EXPECT_EQ(3U, output.addressLine().size());
@@ -45,22 +45,22 @@ TEST(ShippingAddressTest, ValuesAreCopiedOver)
EXPECT_EQ("Jon Doe", output.recipient());
}
-TEST(ShippingAddressTest, IgnoreScriptCodeWithEmptyLanguageCode)
+TEST(PaymentAddressTest, IgnoreScriptCodeWithEmptyLanguageCode)
{
- mojom::blink::ShippingAddressPtr input = mojom::blink::ShippingAddress::New();
+ mojom::blink::PaymentAddressPtr input = mojom::blink::PaymentAddress::New();
input->script_code = "Latn";
- ShippingAddress output(std::move(input));
+ PaymentAddress output(std::move(input));
EXPECT_TRUE(output.languageCode().isEmpty());
}
-TEST(ShippingAddressTest, NoHyphenWithEmptyScriptCode)
+TEST(PaymentAddressTest, NoHyphenWithEmptyScriptCode)
{
- mojom::blink::ShippingAddressPtr input = mojom::blink::ShippingAddress::New();
+ mojom::blink::PaymentAddressPtr input = mojom::blink::PaymentAddress::New();
input->language_code = "en";
- ShippingAddress output(std::move(input));
+ PaymentAddress output(std::move(input));
EXPECT_EQ("en", output.languageCode());
}

Powered by Google App Engine
This is Rietveld 408576698