bondd | 10a45b9 | 2015-02-04 23:29:40 | [diff] [blame] | 1 | // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_UITEST_UTIL_H_ |
| 6 | #define CHROME_BROWSER_AUTOFILL_AUTOFILL_UITEST_UTIL_H_ |
| 7 | |
| 8 | #include <vector> |
| 9 | |
Ian Struiksma | 606b1b5 | 2020-11-18 18:08:36 | [diff] [blame] | 10 | class Profile; |
bondd | 10a45b9 | 2015-02-04 23:29:40 | [diff] [blame] | 11 | |
| 12 | namespace autofill { |
| 13 | |
Christoph Schwering | 6853e97 | 2021-07-02 08:27:22 | [diff] [blame] | 14 | class AutofillExternalDelegate; |
bondd | 10a45b9 | 2015-02-04 23:29:40 | [diff] [blame] | 15 | class AutofillProfile; |
sebsg | e35b762c | 2018-03-29 20:33:27 | [diff] [blame] | 16 | class CreditCard; |
bondd | 10a45b9 | 2015-02-04 23:29:40 | [diff] [blame] | 17 | |
Ian Struiksma | 606b1b5 | 2020-11-18 18:08:36 | [diff] [blame] | 18 | void AddTestProfile(Profile* base_profile, const AutofillProfile& profile); |
| 19 | void SetTestProfile(Profile* base_profile, const AutofillProfile& profile); |
| 20 | void SetTestProfiles(Profile* base_profile, |
| 21 | std::vector<AutofillProfile>* profiles); |
| 22 | void AddTestCreditCard(Profile* base_profile, const CreditCard& card); |
| 23 | void AddTestServerCreditCard(Profile* base_profile, const CreditCard& card); |
| 24 | void AddTestAutofillData(Profile* base_profile, |
Yiming Zhou | 03261c8 | 2018-06-19 19:18:54 | [diff] [blame] | 25 | const AutofillProfile& profile, |
| 26 | const CreditCard& card); |
Ian Struiksma | 606b1b5 | 2020-11-18 18:08:36 | [diff] [blame] | 27 | void WaitForPersonalDataChange(Profile* base_profile); |
Dominic Battre | b5b59a5 | 2021-01-14 12:11:07 | [diff] [blame] | 28 | void WaitForPersonalDataManagerToBeLoaded(Profile* base_profile); |
siyua | 748ce38 | 2019-02-11 22:18:24 | [diff] [blame] | 29 | |
Christoph Schwering | 6853e97 | 2021-07-02 08:27:22 | [diff] [blame] | 30 | // Displays an Autofill popup with a dummy suggestion. |
| 31 | // Unlike autofill::test::GenerateTestAutofillPopup(), this function triggers |
| 32 | // the popup through the `autofill_external_delegate->GetAutofillDriver()`'s |
Peter Kasting | 5a5bac093 | 2021-07-23 17:12:31 | [diff] [blame^] | 33 | // AskForValuesToFill(), instead of the |autofill_external_delegate|'s |
Christoph Schwering | 6853e97 | 2021-07-02 08:27:22 | [diff] [blame] | 34 | // OnQuery() event. This initializes the form's meta data and prepares |
| 35 | // ContentAutofillDriver's and ContentAutofillRouter's state to process events |
| 36 | // such as AutofillDriver::PopupHidden() triggered by the popup. |
| 37 | void GenerateTestAutofillPopup( |
| 38 | AutofillExternalDelegate* autofill_external_delegate); |
| 39 | |
bondd | 10a45b9 | 2015-02-04 23:29:40 | [diff] [blame] | 40 | } // namespace autofill |
| 41 | |
| 42 | #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_UITEST_UTIL_H_ |