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

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

Issue 1902263004: Mojo: Change the blink variant from "wtf" to "blink". (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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/ShippingAddress.h" 5 #include "modules/payments/ShippingAddress.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(ShippingAddressTest, ValuesAreCopiedOver) 13 TEST(ShippingAddressTest, ValuesAreCopiedOver)
14 { 14 {
15 mojom::wtf::ShippingAddressPtr input = mojom::wtf::ShippingAddress::New(); 15 mojom::blink::ShippingAddressPtr input = mojom::blink::ShippingAddress::New( );
16 input->region_code = "US"; 16 input->region_code = "US";
17 input->address_line = mojo::WTFArray<WTF::String>::New(3); 17 input->address_line = mojo::WTFArray<WTF::String>::New(3);
18 input->address_line[0] = "340 Main St"; 18 input->address_line[0] = "340 Main St";
19 input->address_line[1] = "BIN1"; 19 input->address_line[1] = "BIN1";
20 input->address_line[2] = "First floor"; 20 input->address_line[2] = "First floor";
21 input->administrative_area = "CA"; 21 input->administrative_area = "CA";
22 input->locality = "Los Angeles"; 22 input->locality = "Los Angeles";
23 input->dependent_locality = "Venice"; 23 input->dependent_locality = "Venice";
24 input->postal_code = "90291"; 24 input->postal_code = "90291";
25 input->sorting_code = "CEDEX"; 25 input->sorting_code = "CEDEX";
(...skipping 14 matching lines...) Expand all
40 EXPECT_EQ("Venice", output.dependentLocality()); 40 EXPECT_EQ("Venice", output.dependentLocality());
41 EXPECT_EQ("90291", output.postalCode()); 41 EXPECT_EQ("90291", output.postalCode());
42 EXPECT_EQ("CEDEX", output.sortingCode()); 42 EXPECT_EQ("CEDEX", output.sortingCode());
43 EXPECT_EQ("en-Latn", output.languageCode()); 43 EXPECT_EQ("en-Latn", output.languageCode());
44 EXPECT_EQ("Google", output.organization()); 44 EXPECT_EQ("Google", output.organization());
45 EXPECT_EQ("Jon Doe", output.recipient()); 45 EXPECT_EQ("Jon Doe", output.recipient());
46 } 46 }
47 47
48 TEST(ShippingAddressTest, IgnoreScriptCodeWithEmptyLanguageCode) 48 TEST(ShippingAddressTest, IgnoreScriptCodeWithEmptyLanguageCode)
49 { 49 {
50 mojom::wtf::ShippingAddressPtr input = mojom::wtf::ShippingAddress::New(); 50 mojom::blink::ShippingAddressPtr input = mojom::blink::ShippingAddress::New( );
51 input->script_code = "Latn"; 51 input->script_code = "Latn";
52 52
53 ShippingAddress output(std::move(input)); 53 ShippingAddress output(std::move(input));
54 54
55 EXPECT_TRUE(output.languageCode().isEmpty()); 55 EXPECT_TRUE(output.languageCode().isEmpty());
56 } 56 }
57 57
58 TEST(ShippingAddressTest, NoHyphenWithEmptyScriptCode) 58 TEST(ShippingAddressTest, NoHyphenWithEmptyScriptCode)
59 { 59 {
60 mojom::wtf::ShippingAddressPtr input = mojom::wtf::ShippingAddress::New(); 60 mojom::blink::ShippingAddressPtr input = mojom::blink::ShippingAddress::New( );
61 input->language_code = "en"; 61 input->language_code = "en";
62 62
63 ShippingAddress output(std::move(input)); 63 ShippingAddress output(std::move(input));
64 64
65 EXPECT_EQ("en", output.languageCode()); 65 EXPECT_EQ("en", output.languageCode());
66 } 66 }
67 67
68 } // namespace 68 } // namespace
69 } // namespace blink 69 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698