| OLD | NEW |
| 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 "base/guid.h" | 7 #include "base/guid.h" |
| 8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
| 9 #include "base/prefs/pref_service_factory.h" | 9 #include "base/prefs/pref_service_factory.h" |
| 10 #include "base/prefs/testing_pref_store.h" | 10 #include "base/prefs/testing_pref_store.h" |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 credit_card.set_origin(kSettingsOrigin); | 202 credit_card.set_origin(kSettingsOrigin); |
| 203 return credit_card; | 203 return credit_card; |
| 204 } | 204 } |
| 205 | 205 |
| 206 CreditCard GetVerifiedCreditCard2() { | 206 CreditCard GetVerifiedCreditCard2() { |
| 207 CreditCard credit_card(GetCreditCard2()); | 207 CreditCard credit_card(GetCreditCard2()); |
| 208 credit_card.set_origin(kSettingsOrigin); | 208 credit_card.set_origin(kSettingsOrigin); |
| 209 return credit_card; | 209 return credit_card; |
| 210 } | 210 } |
| 211 | 211 |
| 212 CreditCard GetMaskedServerCard() { |
| 213 CreditCard credit_card(CreditCard::MASKED_SERVER_CARD, "a123"); |
| 214 test::SetCreditCardInfo(&credit_card, "Bonnie Parker", |
| 215 "2109" /* Mastercard */, "12", "2012"); |
| 216 credit_card.SetTypeForMaskedCard(kMasterCard); |
| 217 return credit_card; |
| 218 } |
| 219 |
| 212 void SetProfileInfo(AutofillProfile* profile, | 220 void SetProfileInfo(AutofillProfile* profile, |
| 213 const char* first_name, const char* middle_name, | 221 const char* first_name, const char* middle_name, |
| 214 const char* last_name, const char* email, const char* company, | 222 const char* last_name, const char* email, const char* company, |
| 215 const char* address1, const char* address2, const char* city, | 223 const char* address1, const char* address2, const char* city, |
| 216 const char* state, const char* zipcode, const char* country, | 224 const char* state, const char* zipcode, const char* country, |
| 217 const char* phone) { | 225 const char* phone) { |
| 218 check_and_set(profile, NAME_FIRST, first_name); | 226 check_and_set(profile, NAME_FIRST, first_name); |
| 219 check_and_set(profile, NAME_MIDDLE, middle_name); | 227 check_and_set(profile, NAME_MIDDLE, middle_name); |
| 220 check_and_set(profile, NAME_LAST, last_name); | 228 check_and_set(profile, NAME_LAST, last_name); |
| 221 check_and_set(profile, EMAIL_ADDRESS, email); | 229 check_and_set(profile, EMAIL_ADDRESS, email); |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 for (const CreditCard& card : cards) { | 290 for (const CreditCard& card : cards) { |
| 283 if (card.record_type() != CreditCard::FULL_SERVER_CARD) | 291 if (card.record_type() != CreditCard::FULL_SERVER_CARD) |
| 284 continue; | 292 continue; |
| 285 | 293 |
| 286 table->UnmaskServerCreditCard(card.server_id(), card.number()); | 294 table->UnmaskServerCreditCard(card.server_id(), card.number()); |
| 287 } | 295 } |
| 288 } | 296 } |
| 289 | 297 |
| 290 } // namespace test | 298 } // namespace test |
| 291 } // namespace autofill | 299 } // namespace autofill |
| OLD | NEW |