blob: bfd2bc5b872ccdbb6fd0d2e9ff99b65a95e67b4e [file] [log] [blame]
Avi Drissman4a8573c2022-09-09 19:35:541// Copyright 2015 The Chromium Authors
bondd10a45b92015-02-04 23:29:402// 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 Struiksma606b1b52020-11-18 18:08:3610class Profile;
bondd10a45b92015-02-04 23:29:4011
12namespace autofill {
13
Christoph Schwering6853e972021-07-02 08:27:2214class AutofillExternalDelegate;
bondd10a45b92015-02-04 23:29:4015class AutofillProfile;
sebsge35b762c2018-03-29 20:33:2716class CreditCard;
bondd10a45b92015-02-04 23:29:4017
Ian Struiksma606b1b52020-11-18 18:08:3618void AddTestProfile(Profile* base_profile, const AutofillProfile& profile);
19void SetTestProfile(Profile* base_profile, const AutofillProfile& profile);
20void SetTestProfiles(Profile* base_profile,
21 std::vector<AutofillProfile>* profiles);
22void AddTestCreditCard(Profile* base_profile, const CreditCard& card);
23void AddTestServerCreditCard(Profile* base_profile, const CreditCard& card);
24void AddTestAutofillData(Profile* base_profile,
Yiming Zhou03261c82018-06-19 19:18:5425 const AutofillProfile& profile,
26 const CreditCard& card);
Ian Struiksma606b1b52020-11-18 18:08:3627void WaitForPersonalDataChange(Profile* base_profile);
Dominic Battreb5b59a52021-01-14 12:11:0728void WaitForPersonalDataManagerToBeLoaded(Profile* base_profile);
siyua748ce382019-02-11 22:18:2429
Christoph Schwering6853e972021-07-02 08:27:2230// 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 Kasting5a5bac0932021-07-23 17:12:3133// AskForValuesToFill(), instead of the |autofill_external_delegate|'s
Christoph Schwering6853e972021-07-02 08:27:2234// 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.
37void GenerateTestAutofillPopup(
38 AutofillExternalDelegate* autofill_external_delegate);
39
bondd10a45b92015-02-04 23:29:4040} // namespace autofill
41
42#endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_UITEST_UTIL_H_