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

Side by Side Diff: components/autofill/content/browser/wallet/wallet_address_unittest.cc

Issue 24538008: rAc: phone number cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test fixes Created 7 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "base/json/json_reader.h" 5 #include "base/json/json_reader.h"
6 #include "base/logging.h" 6 #include "base/logging.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "components/autofill/content/browser/wallet/wallet_address.h" 10 #include "components/autofill/content/browser/wallet/wallet_address.h"
(...skipping 10 matching lines...) Expand all
21 " {" 21 " {"
22 " \"recipient_name\":\"recipient_name\"," 22 " \"recipient_name\":\"recipient_name\","
23 " \"address_line\":" 23 " \"address_line\":"
24 " [" 24 " ["
25 " \"address_line_1\"," 25 " \"address_line_1\","
26 " \"address_line_2\"" 26 " \"address_line_2\""
27 " ]," 27 " ],"
28 " \"locality_name\":\"locality_name\"," 28 " \"locality_name\":\"locality_name\","
29 " \"administrative_area_name\":\"administrative_area_name\"," 29 " \"administrative_area_name\":\"administrative_area_name\","
30 " \"postal_code_number\":\"postal_code_number\"," 30 " \"postal_code_number\":\"postal_code_number\","
31 " \"country_name_code\":\"country_name_code\"" 31 " \"country_name_code\":\"US\""
32 " }" 32 " }"
33 "}"; 33 "}";
34 34
35 const char kAddressMissingCountryNameCode[] = 35 const char kAddressMissingCountryNameCode[] =
36 "{" 36 "{"
37 " \"id\":\"id\"," 37 " \"id\":\"id\","
38 " \"phone_number\":\"phone_number\"," 38 " \"phone_number\":\"phone_number\","
39 " \"postal_address\":" 39 " \"postal_address\":"
40 " {" 40 " {"
41 " \"recipient_name\":\"recipient_name\"," 41 " \"recipient_name\":\"recipient_name\","
(...skipping 15 matching lines...) Expand all
57 " \"postal_address\":" 57 " \"postal_address\":"
58 " {" 58 " {"
59 " \"address_line\":" 59 " \"address_line\":"
60 " [" 60 " ["
61 " \"address_line_1\"," 61 " \"address_line_1\","
62 " \"address_line_2\"" 62 " \"address_line_2\""
63 " ]," 63 " ],"
64 " \"locality_name\":\"locality_name\"," 64 " \"locality_name\":\"locality_name\","
65 " \"administrative_area_name\":\"administrative_area_name\"," 65 " \"administrative_area_name\":\"administrative_area_name\","
66 " \"postal_code_number\":\"postal_code_number\"," 66 " \"postal_code_number\":\"postal_code_number\","
67 " \"country_name_code\":\"country_name_code\"" 67 " \"country_name_code\":\"US\""
68 " }" 68 " }"
69 "}"; 69 "}";
70 70
71 const char kAddressMissingPostalCodeNumber[] = 71 const char kAddressMissingPostalCodeNumber[] =
72 "{" 72 "{"
73 " \"id\":\"id\"," 73 " \"id\":\"id\","
74 " \"phone_number\":\"phone_number\"," 74 " \"phone_number\":\"phone_number\","
75 " \"postal_address\":" 75 " \"postal_address\":"
76 " {" 76 " {"
77 " \"recipient_name\":\"recipient_name\"," 77 " \"recipient_name\":\"recipient_name\","
78 " \"address_line\":" 78 " \"address_line\":"
79 " [" 79 " ["
80 " \"address_line_1\"," 80 " \"address_line_1\","
81 " \"address_line_2\"" 81 " \"address_line_2\""
82 " ]," 82 " ],"
83 " \"locality_name\":\"locality_name\"," 83 " \"locality_name\":\"locality_name\","
84 " \"administrative_area_name\":\"administrative_area_name\"," 84 " \"administrative_area_name\":\"administrative_area_name\","
85 " \"country_name_code\":\"country_name_code\"" 85 " \"country_name_code\":\"US\""
86 " }" 86 " }"
87 "}"; 87 "}";
88 88
89 const char kValidAddress[] = 89 const char kValidAddress[] =
90 "{" 90 "{"
91 " \"id\":\"id\"," 91 " \"id\":\"id\","
92 " \"phone_number\":\"phone_number\"," 92 " \"phone_number\":\"phone_number\","
93 " \"is_minimal_address\":true," 93 " \"is_minimal_address\":true,"
94 " \"postal_address\":" 94 " \"postal_address\":"
95 " {" 95 " {"
96 " \"recipient_name\":\"recipient_name\"," 96 " \"recipient_name\":\"recipient_name\","
97 " \"address_line\":" 97 " \"address_line\":"
98 " [" 98 " ["
99 " \"address_line_1\"," 99 " \"address_line_1\","
100 " \"address_line_2\"" 100 " \"address_line_2\""
101 " ]," 101 " ],"
102 " \"locality_name\":\"locality_name\"," 102 " \"locality_name\":\"locality_name\","
103 " \"administrative_area_name\":\"administrative_area_name\"," 103 " \"administrative_area_name\":\"administrative_area_name\","
104 " \"country_name_code\":\"country_name_code\"," 104 " \"country_name_code\":\"US\","
105 " \"postal_code_number\":\"postal_code_number\"" 105 " \"postal_code_number\":\"postal_code_number\""
106 " }" 106 " }"
107 "}"; 107 "}";
108 108
109 const char kClientAddressMissingCountryCode[] = 109 const char kClientAddressMissingCountryCode[] =
110 "{" 110 "{"
111 " \"name\":\"name\"," 111 " \"name\":\"name\","
112 " \"address1\":\"address1\"," 112 " \"address1\":\"address1\","
113 " \"address2\":\"address2\"," 113 " \"address2\":\"address2\","
114 " \"city\":\"city\"," 114 " \"city\":\"city\","
115 " \"state\":\"state\"," 115 " \"state\":\"state\","
116 " \"postal_code\":\"postal_code\"," 116 " \"postal_code\":\"postal_code\","
117 " \"phone_number\":\"phone_number\"" 117 " \"phone_number\":\"phone_number\""
118 "}"; 118 "}";
119 119
120 const char kClientAddressMissingPostalCode[] = 120 const char kClientAddressMissingPostalCode[] =
121 "{" 121 "{"
122 " \"name\":\"name\"," 122 " \"name\":\"name\","
123 " \"address1\":\"address1\"," 123 " \"address1\":\"address1\","
124 " \"address2\":\"address2\"," 124 " \"address2\":\"address2\","
125 " \"city\":\"city\"," 125 " \"city\":\"city\","
126 " \"state\":\"state\"," 126 " \"state\":\"state\","
127 " \"phone_number\":\"phone_number\"," 127 " \"phone_number\":\"phone_number\","
128 " \"country_code\":\"country_code\"" 128 " \"country_code\":\"US\""
129 "}"; 129 "}";
130 130
131 const char kClientAddressMissingName[] = 131 const char kClientAddressMissingName[] =
132 "{" 132 "{"
133 " \"address1\":\"address1\"," 133 " \"address1\":\"address1\","
134 " \"address2\":\"address2\"," 134 " \"address2\":\"address2\","
135 " \"city\":\"city\"," 135 " \"city\":\"city\","
136 " \"state\":\"state\"," 136 " \"state\":\"state\","
137 " \"postal_code\":\"postal_code\"," 137 " \"postal_code\":\"postal_code\","
138 " \"phone_number\":\"phone_number\"," 138 " \"phone_number\":\"phone_number\","
139 " \"country_code\":\"country_code\"" 139 " \"country_code\":\"US\""
140 "}"; 140 "}";
141 141
142 const char kClientValidAddress[] = 142 const char kClientValidAddress[] =
143 "{" 143 "{"
144 " \"name\":\"name\"," 144 " \"name\":\"name\","
145 " \"address1\":\"address1\"," 145 " \"address1\":\"address1\","
146 " \"address2\":\"address2\"," 146 " \"address2\":\"address2\","
147 " \"city\":\"city\"," 147 " \"city\":\"city\","
148 " \"state\":\"state\"," 148 " \"state\":\"state\","
149 " \"postal_code\":\"postal_code\"," 149 " \"postal_code\":\"postal_code\","
150 " \"phone_number\":\"phone_number\"," 150 " \"phone_number\":\"phone_number\","
151 " \"country_code\":\"country_code\"," 151 " \"country_code\":\"US\","
152 " \"type\":\"FULL\"" 152 " \"type\":\"FULL\""
153 "}"; 153 "}";
154 154
155 } // anonymous namespace 155 } // anonymous namespace
156 156
157 namespace autofill { 157 namespace autofill {
158 namespace wallet { 158 namespace wallet {
159 159
160 class WalletAddressTest : public testing::Test { 160 class WalletAddressTest : public testing::Test {
161 public: 161 public:
162 WalletAddressTest() {} 162 WalletAddressTest() {}
163 protected: 163 protected:
164 void SetUpDictionary(const std::string& json) { 164 void SetUpDictionary(const std::string& json) {
165 scoped_ptr<Value> value(base::JSONReader::Read(json)); 165 scoped_ptr<Value> value(base::JSONReader::Read(json));
166 DCHECK(value.get()); 166 DCHECK(value.get());
167 DCHECK(value->IsType(Value::TYPE_DICTIONARY)); 167 DCHECK(value->IsType(Value::TYPE_DICTIONARY));
168 dict_.reset(static_cast<DictionaryValue*>(value.release())); 168 dict_.reset(static_cast<DictionaryValue*>(value.release()));
169 } 169 }
170 scoped_ptr<const DictionaryValue> dict_; 170 scoped_ptr<const DictionaryValue> dict_;
171 }; 171 };
172 172
173 TEST_F(WalletAddressTest, AddressEqualsIgnoreID) { 173 TEST_F(WalletAddressTest, AddressEqualsIgnoreID) {
174 Address address1("country_name_code", 174 Address address1("US",
175 ASCIIToUTF16("recipient_name"), 175 ASCIIToUTF16("recipient_name"),
176 ASCIIToUTF16("address_line_1"), 176 ASCIIToUTF16("address_line_1"),
177 ASCIIToUTF16("address_line_2"), 177 ASCIIToUTF16("address_line_2"),
178 ASCIIToUTF16("locality_name"), 178 ASCIIToUTF16("locality_name"),
179 ASCIIToUTF16("administrative_area_name"), 179 ASCIIToUTF16("administrative_area_name"),
180 ASCIIToUTF16("postal_code_number"), 180 ASCIIToUTF16("postal_code_number"),
181 ASCIIToUTF16("phone_number"), 181 ASCIIToUTF16("phone_number"),
182 "id1"); 182 "id1");
183 // Same as address1, only id is different. 183 // Same as address1, only id is different.
184 Address address2("country_name_code", 184 Address address2("US",
185 ASCIIToUTF16("recipient_name"), 185 ASCIIToUTF16("recipient_name"),
186 ASCIIToUTF16("address_line_1"), 186 ASCIIToUTF16("address_line_1"),
187 ASCIIToUTF16("address_line_2"), 187 ASCIIToUTF16("address_line_2"),
188 ASCIIToUTF16("locality_name"), 188 ASCIIToUTF16("locality_name"),
189 ASCIIToUTF16("administrative_area_name"), 189 ASCIIToUTF16("administrative_area_name"),
190 ASCIIToUTF16("postal_code_number"), 190 ASCIIToUTF16("postal_code_number"),
191 ASCIIToUTF16("phone_number"), 191 ASCIIToUTF16("phone_number"),
192 "id2"); 192 "id2");
193 // Has same id as address1, but name is different. 193 // Has same id as address1, but name is different.
194 Address address3("country_name_code", 194 Address address3("US",
195 ASCIIToUTF16("a_different_name"), 195 ASCIIToUTF16("a_different_name"),
196 ASCIIToUTF16("address_line_1"), 196 ASCIIToUTF16("address_line_1"),
197 ASCIIToUTF16("address_line_2"), 197 ASCIIToUTF16("address_line_2"),
198 ASCIIToUTF16("locality_name"), 198 ASCIIToUTF16("locality_name"),
199 ASCIIToUTF16("administrative_area_name"), 199 ASCIIToUTF16("administrative_area_name"),
200 ASCIIToUTF16("postal_code_number"), 200 ASCIIToUTF16("postal_code_number"),
201 ASCIIToUTF16("phone_number"), 201 ASCIIToUTF16("phone_number"),
202 "id1"); 202 "id1");
203 // Same as address1, but no id. 203 // Same as address1, but no id.
204 Address address4("country_name_code", 204 Address address4("US",
205 ASCIIToUTF16("recipient_name"), 205 ASCIIToUTF16("recipient_name"),
206 ASCIIToUTF16("address_line_1"), 206 ASCIIToUTF16("address_line_1"),
207 ASCIIToUTF16("address_line_2"), 207 ASCIIToUTF16("address_line_2"),
208 ASCIIToUTF16("locality_name"), 208 ASCIIToUTF16("locality_name"),
209 ASCIIToUTF16("administrative_area_name"), 209 ASCIIToUTF16("administrative_area_name"),
210 ASCIIToUTF16("postal_code_number"), 210 ASCIIToUTF16("postal_code_number"),
211 ASCIIToUTF16("phone_number"), 211 ASCIIToUTF16("phone_number"),
212 std::string()); 212 std::string());
213 213
214 // Compare the address has id field to itself. 214 // Compare the address has id field to itself.
(...skipping 15 matching lines...) Expand all
230 EXPECT_FALSE(address3.EqualsIgnoreID(address1)); 230 EXPECT_FALSE(address3.EqualsIgnoreID(address1));
231 231
232 // Compare two same addresses, one has id, the other doesn't. 232 // Compare two same addresses, one has id, the other doesn't.
233 EXPECT_NE(address1, address4); 233 EXPECT_NE(address1, address4);
234 EXPECT_TRUE(address1.EqualsIgnoreID(address4)); 234 EXPECT_TRUE(address1.EqualsIgnoreID(address4));
235 EXPECT_TRUE(address4.EqualsIgnoreID(address1)); 235 EXPECT_TRUE(address4.EqualsIgnoreID(address1));
236 } 236 }
237 237
238 TEST_F(WalletAddressTest, CreateAddressMissingObjectId) { 238 TEST_F(WalletAddressTest, CreateAddressMissingObjectId) {
239 SetUpDictionary(kAddressMissingObjectId); 239 SetUpDictionary(kAddressMissingObjectId);
240 Address address("country_name_code", 240 Address address("US",
241 ASCIIToUTF16("recipient_name"), 241 ASCIIToUTF16("recipient_name"),
242 ASCIIToUTF16("address_line_1"), 242 ASCIIToUTF16("address_line_1"),
243 ASCIIToUTF16("address_line_2"), 243 ASCIIToUTF16("address_line_2"),
244 ASCIIToUTF16("locality_name"), 244 ASCIIToUTF16("locality_name"),
245 ASCIIToUTF16("administrative_area_name"), 245 ASCIIToUTF16("administrative_area_name"),
246 ASCIIToUTF16("postal_code_number"), 246 ASCIIToUTF16("postal_code_number"),
247 ASCIIToUTF16("phone_number"), 247 ASCIIToUTF16("phone_number"),
248 std::string()); 248 std::string());
249 EXPECT_EQ(address, *Address::CreateAddress(*dict_)); 249 EXPECT_EQ(address, *Address::CreateAddress(*dict_));
250 } 250 }
(...skipping 16 matching lines...) Expand all
267 } 267 }
268 268
269 TEST_F(WalletAddressTest, CreateAddressMissingPostalCodeNumber) { 269 TEST_F(WalletAddressTest, CreateAddressMissingPostalCodeNumber) {
270 SetUpDictionary(kAddressMissingPostalCodeNumber); 270 SetUpDictionary(kAddressMissingPostalCodeNumber);
271 EXPECT_EQ(NULL, Address::CreateAddress(*dict_).get()); 271 EXPECT_EQ(NULL, Address::CreateAddress(*dict_).get());
272 EXPECT_EQ(NULL, Address::CreateAddressWithID(*dict_).get()); 272 EXPECT_EQ(NULL, Address::CreateAddressWithID(*dict_).get());
273 } 273 }
274 274
275 TEST_F(WalletAddressTest, CreateAddressWithID) { 275 TEST_F(WalletAddressTest, CreateAddressWithID) {
276 SetUpDictionary(kValidAddress); 276 SetUpDictionary(kValidAddress);
277 Address address("country_name_code", 277 Address address("US",
278 ASCIIToUTF16("recipient_name"), 278 ASCIIToUTF16("recipient_name"),
279 ASCIIToUTF16("address_line_1"), 279 ASCIIToUTF16("address_line_1"),
280 ASCIIToUTF16("address_line_2"), 280 ASCIIToUTF16("address_line_2"),
281 ASCIIToUTF16("locality_name"), 281 ASCIIToUTF16("locality_name"),
282 ASCIIToUTF16("administrative_area_name"), 282 ASCIIToUTF16("administrative_area_name"),
283 ASCIIToUTF16("postal_code_number"), 283 ASCIIToUTF16("postal_code_number"),
284 ASCIIToUTF16("phone_number"), 284 ASCIIToUTF16("phone_number"),
285 "id"); 285 "id");
286 address.set_is_complete_address(false); 286 address.set_is_complete_address(false);
287 EXPECT_EQ(address, *Address::CreateAddress(*dict_)); 287 EXPECT_EQ(address, *Address::CreateAddress(*dict_));
(...skipping 10 matching lines...) Expand all
298 EXPECT_EQ(NULL, Address::CreateDisplayAddress(*dict_).get()); 298 EXPECT_EQ(NULL, Address::CreateDisplayAddress(*dict_).get());
299 } 299 }
300 300
301 TEST_F(WalletAddressTest, CreateDisplayAddressMissingPostalCode) { 301 TEST_F(WalletAddressTest, CreateDisplayAddressMissingPostalCode) {
302 SetUpDictionary(kClientAddressMissingPostalCode); 302 SetUpDictionary(kClientAddressMissingPostalCode);
303 EXPECT_EQ(NULL, Address::CreateDisplayAddress(*dict_).get()); 303 EXPECT_EQ(NULL, Address::CreateDisplayAddress(*dict_).get());
304 } 304 }
305 305
306 TEST_F(WalletAddressTest, CreateDisplayAddress) { 306 TEST_F(WalletAddressTest, CreateDisplayAddress) {
307 SetUpDictionary(kClientValidAddress); 307 SetUpDictionary(kClientValidAddress);
308 Address address("country_code", 308 Address address("US",
309 ASCIIToUTF16("name"), 309 ASCIIToUTF16("name"),
310 ASCIIToUTF16("address1"), 310 ASCIIToUTF16("address1"),
311 ASCIIToUTF16("address2"), 311 ASCIIToUTF16("address2"),
312 ASCIIToUTF16("city"), 312 ASCIIToUTF16("city"),
313 ASCIIToUTF16("state"), 313 ASCIIToUTF16("state"),
314 ASCIIToUTF16("postal_code"), 314 ASCIIToUTF16("postal_code"),
315 ASCIIToUTF16("phone_number"), 315 ASCIIToUTF16("phone_number"),
316 std::string()); 316 std::string());
317 EXPECT_EQ(address, *Address::CreateDisplayAddress(*dict_)); 317 EXPECT_EQ(address, *Address::CreateDisplayAddress(*dict_));
318 } 318 }
319 319
320 TEST_F(WalletAddressTest, ToDictionaryWithoutID) { 320 TEST_F(WalletAddressTest, ToDictionaryWithoutID) {
321 base::DictionaryValue expected; 321 base::DictionaryValue expected;
322 expected.SetString("country_name_code", 322 expected.SetString("country_name_code",
323 "country_name_code"); 323 "US");
324 expected.SetString("recipient_name", 324 expected.SetString("recipient_name",
325 "recipient_name"); 325 "recipient_name");
326 expected.SetString("locality_name", 326 expected.SetString("locality_name",
327 "locality_name"); 327 "locality_name");
328 expected.SetString("administrative_area_name", 328 expected.SetString("administrative_area_name",
329 "administrative_area_name"); 329 "administrative_area_name");
330 expected.SetString("postal_code_number", 330 expected.SetString("postal_code_number",
331 "postal_code_number"); 331 "postal_code_number");
332 base::ListValue* address_lines = new base::ListValue(); 332 base::ListValue* address_lines = new base::ListValue();
333 address_lines->AppendString("address_line_1"); 333 address_lines->AppendString("address_line_1");
334 address_lines->AppendString("address_line_2"); 334 address_lines->AppendString("address_line_2");
335 expected.Set("address_line", address_lines); 335 expected.Set("address_line", address_lines);
336 336
337 Address address("country_name_code", 337 Address address("US",
338 ASCIIToUTF16("recipient_name"), 338 ASCIIToUTF16("recipient_name"),
339 ASCIIToUTF16("address_line_1"), 339 ASCIIToUTF16("address_line_1"),
340 ASCIIToUTF16("address_line_2"), 340 ASCIIToUTF16("address_line_2"),
341 ASCIIToUTF16("locality_name"), 341 ASCIIToUTF16("locality_name"),
342 ASCIIToUTF16("administrative_area_name"), 342 ASCIIToUTF16("administrative_area_name"),
343 ASCIIToUTF16("postal_code_number"), 343 ASCIIToUTF16("postal_code_number"),
344 ASCIIToUTF16("phone_number"), 344 ASCIIToUTF16("phone_number"),
345 std::string()); 345 std::string());
346 346
347 EXPECT_TRUE(expected.Equals(address.ToDictionaryWithoutID().get())); 347 EXPECT_TRUE(expected.Equals(address.ToDictionaryWithoutID().get()));
348 } 348 }
349 349
350 TEST_F(WalletAddressTest, ToDictionaryWithID) { 350 TEST_F(WalletAddressTest, ToDictionaryWithID) {
351 base::DictionaryValue expected; 351 base::DictionaryValue expected;
352 expected.SetString("id", "id"); 352 expected.SetString("id", "id");
353 expected.SetString("phone_number", "phone_number"); 353 expected.SetString("phone_number", "phone_number");
354 expected.SetString("postal_address.country_name_code", 354 expected.SetString("postal_address.country_name_code",
355 "country_name_code"); 355 "US");
356 expected.SetString("postal_address.recipient_name", 356 expected.SetString("postal_address.recipient_name",
357 "recipient_name"); 357 "recipient_name");
358 expected.SetString("postal_address.locality_name", 358 expected.SetString("postal_address.locality_name",
359 "locality_name"); 359 "locality_name");
360 expected.SetString("postal_address.administrative_area_name", 360 expected.SetString("postal_address.administrative_area_name",
361 "administrative_area_name"); 361 "administrative_area_name");
362 expected.SetString("postal_address.postal_code_number", 362 expected.SetString("postal_address.postal_code_number",
363 "postal_code_number"); 363 "postal_code_number");
364 base::ListValue* address_lines = new base::ListValue(); 364 base::ListValue* address_lines = new base::ListValue();
365 address_lines->AppendString("address_line_1"); 365 address_lines->AppendString("address_line_1");
366 address_lines->AppendString("address_line_2"); 366 address_lines->AppendString("address_line_2");
367 expected.Set("postal_address.address_line", address_lines); 367 expected.Set("postal_address.address_line", address_lines);
368 368
369 Address address("country_name_code", 369 Address address("US",
370 ASCIIToUTF16("recipient_name"), 370 ASCIIToUTF16("recipient_name"),
371 ASCIIToUTF16("address_line_1"), 371 ASCIIToUTF16("address_line_1"),
372 ASCIIToUTF16("address_line_2"), 372 ASCIIToUTF16("address_line_2"),
373 ASCIIToUTF16("locality_name"), 373 ASCIIToUTF16("locality_name"),
374 ASCIIToUTF16("administrative_area_name"), 374 ASCIIToUTF16("administrative_area_name"),
375 ASCIIToUTF16("postal_code_number"), 375 ASCIIToUTF16("postal_code_number"),
376 ASCIIToUTF16("phone_number"), 376 ASCIIToUTF16("phone_number"),
377 "id"); 377 "id");
378 378
379 EXPECT_TRUE(expected.Equals(address.ToDictionaryWithID().get())); 379 EXPECT_TRUE(expected.Equals(address.ToDictionaryWithID().get()));
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 ASCIIToUTF16("locality_name"), 469 ASCIIToUTF16("locality_name"),
470 ASCIIToUTF16("administrative_area_name"), 470 ASCIIToUTF16("administrative_area_name"),
471 ASCIIToUTF16("postal_code_number"), 471 ASCIIToUTF16("postal_code_number"),
472 ASCIIToUTF16("phone_number"), 472 ASCIIToUTF16("phone_number"),
473 "id1"); 473 "id1");
474 EXPECT_EQ(base::string16(), address3.GetInfo(type, "en-US")); 474 EXPECT_EQ(base::string16(), address3.GetInfo(type, "en-US"));
475 } 475 }
476 476
477 } // namespace wallet 477 } // namespace wallet
478 } // namespace autofill 478 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698