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

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

Issue 2406923002: Move payment_request.mojom file to components/ (Closed)
Patch Set: Add Android test dependencies Created 4 years, 1 month 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 mojom::blink::PaymentAddressPtr input = mojom::blink::PaymentAddress::New(); 14 mojom::blink::PaymentAddressPtr input = mojom::blink::PaymentAddress::New();
15 input->country = "US"; 15 input->country = "US";
16 input->address_line = mojo::WTFArray<WTF::String>::New(3); 16 input->address_line.append("340 Main St");
17 input->address_line[0] = "340 Main St"; 17 input->address_line.append("BIN1");
18 input->address_line[1] = "BIN1"; 18 input->address_line.append("First floor");
19 input->address_line[2] = "First floor";
20 input->region = "CA"; 19 input->region = "CA";
21 input->city = "Los Angeles"; 20 input->city = "Los Angeles";
22 input->dependent_locality = "Venice"; 21 input->dependent_locality = "Venice";
23 input->postal_code = "90291"; 22 input->postal_code = "90291";
24 input->sorting_code = "CEDEX"; 23 input->sorting_code = "CEDEX";
25 input->language_code = "en"; 24 input->language_code = "en";
26 input->script_code = "Latn"; 25 input->script_code = "Latn";
27 input->organization = "Google"; 26 input->organization = "Google";
28 input->recipient = "Jon Doe"; 27 input->recipient = "Jon Doe";
29 input->phone = "Phone Number"; 28 input->phone = "Phone Number";
(...skipping 29 matching lines...) Expand all
59 mojom::blink::PaymentAddressPtr input = mojom::blink::PaymentAddress::New(); 58 mojom::blink::PaymentAddressPtr input = mojom::blink::PaymentAddress::New();
60 input->language_code = "en"; 59 input->language_code = "en";
61 60
62 PaymentAddress output(std::move(input)); 61 PaymentAddress output(std::move(input));
63 62
64 EXPECT_EQ("en", output.languageCode()); 63 EXPECT_EQ("en", output.languageCode());
65 } 64 }
66 65
67 } // namespace 66 } // namespace
68 } // namespace blink 67 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698