| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_BROWSER_AUTOFILL_AUTOFILL_COMMON_TEST_H_ | 5 #ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_COMMON_TEST_H_ |
| 6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_COMMON_TEST_H_ | 6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_COMMON_TEST_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 class AutofillProfile; | 9 class AutofillProfile; |
| 10 class CreditCard; | 10 class CreditCard; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 webkit_glue::FormField* field); | 25 webkit_glue::FormField* field); |
| 26 | 26 |
| 27 // A unit testing utility that is common to a number of the Autofill unit | 27 // A unit testing utility that is common to a number of the Autofill unit |
| 28 // tests. |SetProfileInfo| provides a quick way to populate a profile with | 28 // tests. |SetProfileInfo| provides a quick way to populate a profile with |
| 29 // c-strings. | 29 // c-strings. |
| 30 void SetProfileInfo(AutofillProfile* profile, | 30 void SetProfileInfo(AutofillProfile* profile, |
| 31 const char* first_name, const char* middle_name, | 31 const char* first_name, const char* middle_name, |
| 32 const char* last_name, const char* email, const char* company, | 32 const char* last_name, const char* email, const char* company, |
| 33 const char* address1, const char* address2, const char* city, | 33 const char* address1, const char* address2, const char* city, |
| 34 const char* state, const char* zipcode, const char* country, | 34 const char* state, const char* zipcode, const char* country, |
| 35 const char* phone, const char* fax); | 35 const char* phone); |
| 36 | 36 |
| 37 void SetProfileInfoWithGuid(AutofillProfile* profile, | 37 void SetProfileInfoWithGuid(AutofillProfile* profile, |
| 38 const char* guid, const char* first_name, const char* middle_name, | 38 const char* guid, const char* first_name, const char* middle_name, |
| 39 const char* last_name, const char* email, const char* company, | 39 const char* last_name, const char* email, const char* company, |
| 40 const char* address1, const char* address2, const char* city, | 40 const char* address1, const char* address2, const char* city, |
| 41 const char* state, const char* zipcode, const char* country, | 41 const char* state, const char* zipcode, const char* country, |
| 42 const char* phone, const char* fax); | 42 const char* phone); |
| 43 | 43 |
| 44 // A unit testing utility that is common to a number of the Autofill unit | 44 // A unit testing utility that is common to a number of the Autofill unit |
| 45 // tests. |SetCreditCardInfo| provides a quick way to populate a credit card | 45 // tests. |SetCreditCardInfo| provides a quick way to populate a credit card |
| 46 // with c-strings. | 46 // with c-strings. |
| 47 void SetCreditCardInfo(CreditCard* credit_card, | 47 void SetCreditCardInfo(CreditCard* credit_card, |
| 48 const char* name_on_card, const char* card_number, | 48 const char* name_on_card, const char* card_number, |
| 49 const char* expiration_month, const char* expiration_year); | 49 const char* expiration_month, const char* expiration_year); |
| 50 | 50 |
| 51 // TODO(isherman): We should do this automatically for all tests, not manually | 51 // TODO(isherman): We should do this automatically for all tests, not manually |
| 52 // on a per-test basis: http://crbug.com/57221 | 52 // on a per-test basis: http://crbug.com/57221 |
| 53 // Disables or mocks out code that would otherwise reach out to system services. | 53 // Disables or mocks out code that would otherwise reach out to system services. |
| 54 void DisableSystemServices(Profile* profile); | 54 void DisableSystemServices(Profile* profile); |
| 55 | 55 |
| 56 } // namespace autofill_test | 56 } // namespace autofill_test |
| 57 | 57 |
| 58 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_COMMON_TEST_H_ | 58 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_COMMON_TEST_H_ |
| OLD | NEW |