#ifndef COMPONENTS_AUTOFILL_CONTENT_BROWSER_CONTENT_AUTOFILL_DRIVER_TEST_API_H_
#define COMPONENTS_AUTOFILL_CONTENT_BROWSER_CONTENT_AUTOFILL_DRIVER_TEST_API_H_
#include "components/autofill/content/browser/content_autofill_driver.h"
#include "components/autofill/core/browser/foundations/autofill_driver_test_api.h"
namespace autofill {
class ContentAutofillDriverTestApi : public AutofillDriverTestApi {
public:
explicit ContentAutofillDriverTestApi(ContentAutofillDriver* driver)
: AutofillDriverTestApi(driver) {}
void set_autofill_manager(std::unique_ptr<AutofillManager> autofill_manager) {
driver().autofill_manager_ = std::move(autofill_manager);
}
void LiftForTest(FormData& form) { driver().LiftForTest(form); }
private:
ContentAutofillDriver& driver() {
return static_cast<ContentAutofillDriver&>(*driver_);
}
};
inline ContentAutofillDriverTestApi test_api(ContentAutofillDriver& driver) {
return ContentAutofillDriverTestApi(&driver);
}
}
#endif