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

Side by Side Diff: components/autofill/core/browser/autofill_test_utils.cc

Issue 2805263003: [Payments] Selecting incomplete items will open editors (Closed)
Patch Set: fix ios test for realz Created 3 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 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 "components/autofill/core/browser/autofill_test_utils.h" 5 #include "components/autofill/core/browser/autofill_test_utils.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/guid.h" 9 #include "base/guid.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 } 219 }
220 220
221 AutofillProfile GetVerifiedProfile2() { 221 AutofillProfile GetVerifiedProfile2() {
222 AutofillProfile profile(GetFullProfile2()); 222 AutofillProfile profile(GetFullProfile2());
223 profile.set_origin(kSettingsOrigin); 223 profile.set_origin(kSettingsOrigin);
224 return profile; 224 return profile;
225 } 225 }
226 226
227 CreditCard GetCreditCard() { 227 CreditCard GetCreditCard() {
228 CreditCard credit_card(base::GenerateGUID(), "http://www.example.com"); 228 CreditCard credit_card(base::GenerateGUID(), "http://www.example.com");
229 SetCreditCardInfo( 229 SetCreditCardInfo(&credit_card, "Test User", "4111111111111111" /* Visa */,
230 &credit_card, "Test User", "4111111111111111" /* Visa */, "11", "2017"); 230 "11", "2022");
231 return credit_card; 231 return credit_card;
232 } 232 }
233 233
234 CreditCard GetCreditCard2() { 234 CreditCard GetCreditCard2() {
235 CreditCard credit_card(base::GenerateGUID(), "https://www.example.com"); 235 CreditCard credit_card(base::GenerateGUID(), "https://www.example.com");
236 SetCreditCardInfo( 236 SetCreditCardInfo(&credit_card, "Someone Else", "378282246310005" /* AmEx */,
237 &credit_card, "Someone Else", "378282246310005" /* AmEx */, "07", "2019"); 237 "07", "2022");
238 return credit_card; 238 return credit_card;
239 } 239 }
240 240
241 CreditCard GetVerifiedCreditCard() { 241 CreditCard GetVerifiedCreditCard() {
242 CreditCard credit_card(GetCreditCard()); 242 CreditCard credit_card(GetCreditCard());
243 credit_card.set_origin(kSettingsOrigin); 243 credit_card.set_origin(kSettingsOrigin);
244 return credit_card; 244 return credit_card;
245 } 245 }
246 246
247 CreditCard GetVerifiedCreditCard2() { 247 CreditCard GetVerifiedCreditCard2() {
248 CreditCard credit_card(GetCreditCard2()); 248 CreditCard credit_card(GetCreditCard2());
249 credit_card.set_origin(kSettingsOrigin); 249 credit_card.set_origin(kSettingsOrigin);
250 return credit_card; 250 return credit_card;
251 } 251 }
252 252
253 CreditCard GetMaskedServerCard() { 253 CreditCard GetMaskedServerCard() {
254 CreditCard credit_card(CreditCard::MASKED_SERVER_CARD, "a123"); 254 CreditCard credit_card(CreditCard::MASKED_SERVER_CARD, "a123");
255 test::SetCreditCardInfo(&credit_card, "Bonnie Parker", 255 test::SetCreditCardInfo(&credit_card, "Bonnie Parker",
256 "2109" /* Mastercard */, "12", "2012"); 256 "2109" /* Mastercard */, "12", "2020");
257 credit_card.SetTypeForMaskedCard(kMasterCard); 257 credit_card.SetTypeForMaskedCard(kMasterCard);
258 return credit_card; 258 return credit_card;
259 } 259 }
260 260
261 CreditCard GetMaskedServerCardAmex() { 261 CreditCard GetMaskedServerCardAmex() {
262 CreditCard credit_card(CreditCard::MASKED_SERVER_CARD, "b456"); 262 CreditCard credit_card(CreditCard::MASKED_SERVER_CARD, "b456");
263 test::SetCreditCardInfo(&credit_card, "Justin Thyme", 263 test::SetCreditCardInfo(&credit_card, "Justin Thyme",
264 "8431" /* Amex */, "9", "2020"); 264 "8431" /* Amex */, "9", "2020");
265 credit_card.SetTypeForMaskedCard(kAmericanExpressCard); 265 credit_card.SetTypeForMaskedCard(kAmericanExpressCard);
266 return credit_card; 266 return credit_card;
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 const char* control_type) { 358 const char* control_type) {
359 field->set_signature(signature); 359 field->set_signature(signature);
360 if (name) 360 if (name)
361 field->set_name(name); 361 field->set_name(name);
362 if (control_type) 362 if (control_type)
363 field->set_type(control_type); 363 field->set_type(control_type);
364 } 364 }
365 365
366 } // namespace test 366 } // namespace test
367 } // namespace autofill 367 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698