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

Side by Side Diff: third_party/WebKit/Source/modules/payments/PaymentAddressTest.cpp

Issue 2614663008: Migrate WTF::Vector::append() to ::push_back() [part 13 of N] (Closed)
Patch Set: Created 3 years, 11 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 #include "modules/payments/PaymentAddress.h" 5 #include "modules/payments/PaymentAddress.h"
6 6
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 #include <utility> 8 #include <utility>
9 9
10 namespace blink { 10 namespace blink {
11 namespace { 11 namespace {
12 12
13 TEST(PaymentAddressTest, ValuesAreCopiedOver) { 13 TEST(PaymentAddressTest, ValuesAreCopiedOver) {
14 payments::mojom::blink::PaymentAddressPtr input = 14 payments::mojom::blink::PaymentAddressPtr input =
15 payments::mojom::blink::PaymentAddress::New(); 15 payments::mojom::blink::PaymentAddress::New();
16 input->country = "US"; 16 input->country = "US";
17 input->address_line.append("340 Main St"); 17 input->address_line.push_back("340 Main St");
18 input->address_line.append("BIN1"); 18 input->address_line.push_back("BIN1");
19 input->address_line.append("First floor"); 19 input->address_line.push_back("First floor");
20 input->region = "CA"; 20 input->region = "CA";
21 input->city = "Los Angeles"; 21 input->city = "Los Angeles";
22 input->dependent_locality = "Venice"; 22 input->dependent_locality = "Venice";
23 input->postal_code = "90291"; 23 input->postal_code = "90291";
24 input->sorting_code = "CEDEX"; 24 input->sorting_code = "CEDEX";
25 input->language_code = "en"; 25 input->language_code = "en";
26 input->script_code = "Latn"; 26 input->script_code = "Latn";
27 input->organization = "Google"; 27 input->organization = "Google";
28 input->recipient = "Jon Doe"; 28 input->recipient = "Jon Doe";
29 input->phone = "Phone Number"; 29 input->phone = "Phone Number";
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 payments::mojom::blink::PaymentAddress::New(); 61 payments::mojom::blink::PaymentAddress::New();
62 input->language_code = "en"; 62 input->language_code = "en";
63 63
64 PaymentAddress output(std::move(input)); 64 PaymentAddress output(std::move(input));
65 65
66 EXPECT_EQ("en", output.languageCode()); 66 EXPECT_EQ("en", output.languageCode());
67 } 67 }
68 68
69 } // namespace 69 } // namespace
70 } // namespace blink 70 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698