#include "chrome/browser/autofill/autofill_flow_test_util.h"
#include <optional>
#include <string>
#include <tuple>
#include <utility>
#include "base/functional/bind.h"
#include "base/run_loop.h"
#include "base/test/bind.h"
#include "base/time/time.h"
#include "chrome/browser/autofill/autofill_uitest.h"
#include "chrome/browser/translate/translate_test_utils.h"
#include "chrome/browser/ui/autofill/autofill_popup_controller_impl.h"
#include "chrome/browser/ui/autofill/autofill_popup_controller_impl_test_api.h"
#include "chrome/browser/ui/autofill/autofill_suggestion_controller.h"
#include "chrome/browser/ui/autofill/chrome_autofill_client.h"
#include "chrome/browser/ui/translate/translate_bubble_model.h"
#include "chrome/browser/ui/translate/translate_bubble_test_utils.h"
#include "chrome/test/base/interactive_test_utils.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/autofill/core/common/autofill_util.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_widget_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/content_mock_cert_verifier.h"
#include "content/public/test/fenced_frame_test_util.h"
#include "content/public/test/test_renderer_host.h"
#include "content/public/test/test_utils.h"
#include "content/public/test/url_loader_interceptor.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/events/keycodes/dom/keycode_converter.h"
#include "ui/gfx/geometry/point.h"
ASCIIToUTF16;
_;
AssertionFailure;
AssertionResult;
AssertionSuccess;
namespace autofill {
namespace {
gfx::Point GetCenter(const ElementExpr& e,
content::ToRenderFrameHost execution_target) { … }
[[nodiscard]] AssertionResult TriggerAndWaitForEvent(
const ElementExpr& e,
const std::string& event_name,
content::ToRenderFrameHost execution_target) { … }
bool IsFocusedField(const ElementExpr& e,
content::ToRenderFrameHost execution_target) { … }
[[nodiscard]] AssertionResult BlurFocusedField(
content::ToRenderFrameHost execution_target) { … }
struct ShowAutofillSuggestionsParams { … };
[[nodiscard]] AssertionResult ShowAutofillSuggestions(
const ElementExpr& e,
AutofillUiTest* test,
ShowAutofillSuggestionsParams p) { … }
struct AutofillSuggestionParams { … };
[[nodiscard]] AssertionResult SelectAutofillSuggestion(
const ElementExpr& e,
AutofillUiTest* test,
AutofillSuggestionParams p) { … }
[[nodiscard]] AssertionResult AcceptAutofillSuggestion(
const ElementExpr& e,
AutofillUiTest* test,
AutofillSuggestionParams p) { … }
}
[[nodiscard]] AssertionResult FocusField(
const ElementExpr& e,
content::ToRenderFrameHost execution_target) { … }
[[nodiscard]] AssertionResult AutofillFlow(const ElementExpr& e,
AutofillUiTest* test,
AutofillFlowParams p) { … }
}