#include <string>
#include "base/feature_list.h"
#include "base/test/scoped_feature_list.h"
#include "components/autofill/content/renderer/autofill_agent.h"
#include "components/autofill/content/renderer/autofill_renderer_test.h"
#include "components/autofill/content/renderer/form_autofill_util.h"
#include "components/autofill/core/common/aliases.h"
#include "components/autofill/core/common/autofill_features.h"
#include "components/autofill/core/common/form_field_data.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/web/web_document.h"
#include "third_party/blink/public/web/web_frame_widget.h"
#include "third_party/blink/public/web/web_input_element.h"
#include "third_party/blink/public/web/web_local_frame.h"
#include "third_party/blink/public/web/web_settings.h"
#include "third_party/blink/public/web/web_view.h"
#include "ui/events/keycodes/keyboard_codes.h"
#include "ui/gfx/geometry/rect.h"
namespace autofill {
namespace {
_;
AllOf;
ElementsAre;
Field;
InSequence;
MockFunction;
Not;
Property;
auto HasType(FormControlType type) { … }
auto IsContentEditable() { … }
template <typename... Args>
auto FieldsAre(Args&&... matchers) { … }
int NumCallsToAskForValuesToFillOnInitialLeftClick() { … }
int NumCallsToAskForValuesToFillOnTextfieldFocusWithoutLeftClick() { … }
int NumCallsToHidePopupOnFocusLoss() { … }
}
class AutofillAgentFormInteractionTest : public test::AutofillRendererTest { … };
TEST_F(AutofillAgentFormInteractionTest, TextInputLeftClick) { … }
TEST_F(AutofillAgentFormInteractionTest, TextInputRightClick) { … }
TEST_F(AutofillAgentFormInteractionTest, TextInputFocusAndLeftClick) { … }
TEST_F(AutofillAgentFormInteractionTest, TextAreaLeftClick) { … }
TEST_F(AutofillAgentFormInteractionTest, TextareaFocusAndLeftClick) { … }
TEST_F(AutofillAgentFormInteractionTest, ScaledTextareaLeftClick) { … }
TEST_F(AutofillAgentFormInteractionTest, ScaledTextareaTapped) { … }
TEST_F(AutofillAgentFormInteractionTest, DisabledInputLeftClick) { … }
TEST_F(AutofillAgentFormInteractionTest, DisabledInputFocusWithoutClick) { … }
TEST_F(AutofillAgentFormInteractionTest, DisabledTextareaLeftClick) { … }
TEST_F(AutofillAgentFormInteractionTest, DisabledTextareaFocusWithoutClick) { … }
TEST_F(AutofillAgentFormInteractionTest, ReadonlyInputLeftClick) { … }
TEST_F(AutofillAgentFormInteractionTest, ReadonlyInputFocusWithoutClick) { … }
TEST_F(AutofillAgentFormInteractionTest, ReadonlyTextareaLeftClick) { … }
TEST_F(AutofillAgentFormInteractionTest, ReadonlyTextareaFocusWithoutClick) { … }
TEST_F(AutofillAgentFormInteractionTest, TapNearEdge) { … }
AutofillAgentContentEditableInteractionTest;
TEST_F(AutofillAgentContentEditableInteractionTest, LeftClick) { … }
TEST_F(AutofillAgentContentEditableInteractionTest,
LossOfFocusOfContentEditableTriggersHideAutofillSuggestions) { … }
#if !BUILDFLAG(IS_ANDROID)
TEST_F(AutofillAgentContentEditableInteractionTest,
ScrollingHidesAutofillPopup) { … }
#endif
TEST_F(AutofillAgentContentEditableInteractionTest,
ClickOnContentEditableFormIsIgnored) { … }
TEST_F(AutofillAgentContentEditableInteractionTest,
ClickOnContentEditableFormControlIsTreatedAsFormControl) { … }
}