| 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 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_TEST_UTILS_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_TEST_UTILS_H_ |
| 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_TEST_UTILS_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_TEST_UTILS_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 | 62 |
| 63 // Returns a credit card full of dummy info, different to the above. | 63 // Returns a credit card full of dummy info, different to the above. |
| 64 CreditCard GetCreditCard2(); | 64 CreditCard GetCreditCard2(); |
| 65 | 65 |
| 66 // Returns a verified credit card full of dummy info. | 66 // Returns a verified credit card full of dummy info. |
| 67 CreditCard GetVerifiedCreditCard(); | 67 CreditCard GetVerifiedCreditCard(); |
| 68 | 68 |
| 69 // Returns a verified credit card full of dummy info, different to the above. | 69 // Returns a verified credit card full of dummy info, different to the above. |
| 70 CreditCard GetVerifiedCreditCard2(); | 70 CreditCard GetVerifiedCreditCard2(); |
| 71 | 71 |
| 72 // Returns a masked server card full of dummy info. |
| 73 CreditCard GetMaskedServerCard(); |
| 74 |
| 72 // A unit testing utility that is common to a number of the Autofill unit | 75 // A unit testing utility that is common to a number of the Autofill unit |
| 73 // tests. |SetProfileInfo| provides a quick way to populate a profile with | 76 // tests. |SetProfileInfo| provides a quick way to populate a profile with |
| 74 // c-strings. | 77 // c-strings. |
| 75 void SetProfileInfo(AutofillProfile* profile, | 78 void SetProfileInfo(AutofillProfile* profile, |
| 76 const char* first_name, const char* middle_name, | 79 const char* first_name, const char* middle_name, |
| 77 const char* last_name, const char* email, const char* company, | 80 const char* last_name, const char* email, const char* company, |
| 78 const char* address1, const char* address2, const char* city, | 81 const char* address1, const char* address2, const char* city, |
| 79 const char* state, const char* zipcode, const char* country, | 82 const char* state, const char* zipcode, const char* country, |
| 80 const char* phone); | 83 const char* phone); |
| 81 | 84 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 100 | 103 |
| 101 // Sets |cards| for |table|. |cards| may contain full, unmasked server cards, | 104 // Sets |cards| for |table|. |cards| may contain full, unmasked server cards, |
| 102 // whereas AutofillTable::SetServerCreditCards can only contain masked cards. | 105 // whereas AutofillTable::SetServerCreditCards can only contain masked cards. |
| 103 void SetServerCreditCards(AutofillTable* table, | 106 void SetServerCreditCards(AutofillTable* table, |
| 104 const std::vector<CreditCard>& cards); | 107 const std::vector<CreditCard>& cards); |
| 105 | 108 |
| 106 } // namespace test | 109 } // namespace test |
| 107 } // namespace autofill | 110 } // namespace autofill |
| 108 | 111 |
| 109 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_TEST_UTILS_H_ | 112 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_TEST_UTILS_H_ |
| OLD | NEW |