#include <stddef.h>
#include <memory>
#include <string>
#include <tuple>
#include <vector>
#include "base/command_line.h"
#include "base/files/file_util.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/ref_counted.h"
#include "base/rand_util.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/scoped_command_line.h"
#include "base/test/scoped_feature_list.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "chrome/browser/autofill/autofill_uitest_util.h"
#include "chrome/browser/autofill/personal_data_manager_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_navigator_params.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/webdata_services/web_data_service_factory.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/test_switches.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/autofill/content/browser/content_autofill_driver.h"
#include "components/autofill/content/browser/test_autofill_manager_injector.h"
#include "components/autofill/core/browser/address_data_manager.h"
#include "components/autofill/core/browser/address_data_manager_test_api.h"
#include "components/autofill/core/browser/autofill_test_utils.h"
#include "components/autofill/core/browser/browser_autofill_manager.h"
#include "components/autofill/core/browser/data_model/autofill_profile.h"
#include "components/autofill/core/browser/data_model/credit_card.h"
#include "components/autofill/core/browser/personal_data_manager.h"
#include "components/autofill/core/browser/personal_data_manager_observer.h"
#include "components/autofill/core/browser/personal_data_manager_test_utils.h"
#include "components/autofill/core/browser/test_autofill_manager_waiter.h"
#include "components/autofill/core/browser/validation.h"
#include "components/autofill/core/common/autofill_features.h"
#include "components/autofill/core/common/mojom/autofill_types.mojom-shared.h"
#include "components/keyed_service/core/service_access_type.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
#include "content/public/test/accessibility_notification_waiter.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/prerender_test_util.h"
#include "content/public/test/scoped_accessibility_mode_override.h"
#include "content/public/test/test_renderer_host.h"
#include "content/public/test/test_utils.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "net/test/embedded_test_server/http_request.h"
#include "net/test/embedded_test_server/http_response.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/common/switches.h"
#include "ui/accessibility/ax_enums.mojom.h"
#include "ui/accessibility/ax_mode.h"
#include "ui/events/keycodes/keyboard_codes.h"
namespace autofill {
namespace {
ASCIIToUTF16;
UTF16ToASCII;
_;
AssertionResult;
MockFunction;
Sequence;
UnorderedElementsAre;
UnorderedElementsAreArray;
ACTION_P(InvokeClosure, closure) { … }
const char kDocumentClickHandlerSubmitJS[] = …;
class AutofillTest : public InProcessBrowserTest { … };
IN_PROC_BROWSER_TEST_F(AutofillTest, AggregatesMinValidProfile) { … }
IN_PROC_BROWSER_TEST_F(AutofillTest, AggregatesMinValidProfileDifferentJS) { … }
IN_PROC_BROWSER_TEST_F(AutofillTest, ProfilesAggregatedWithSubmitHandler) { … }
IN_PROC_BROWSER_TEST_F(AutofillTest, ProfilesNotAggregatedWithNoAddress) { … }
IN_PROC_BROWSER_TEST_F(AutofillTest, ProfilesNotAggregatedWithInvalidEmail) { … }
IN_PROC_BROWSER_TEST_F(AutofillTest, ProfileSavedWithValidCountryPhone) { … }
IN_PROC_BROWSER_TEST_F(AutofillTest, AppendCountryCodeForAggregatedPhones) { … }
IN_PROC_BROWSER_TEST_F(AutofillTest, UsePlusSignForInternationalNumber) { … }
IN_PROC_BROWSER_TEST_F(AutofillTest, ProfileWithEmailInOtherFieldNotSaved) { … }
IN_PROC_BROWSER_TEST_F(AutofillTest,
DISABLED_MergeAggregatedProfilesWithSameAddress) { … }
IN_PROC_BROWSER_TEST_F(AutofillTest, ProfilesNotMergedWhenNoMinAddressData) { … }
IN_PROC_BROWSER_TEST_F(AutofillTest,
DISABLED_MergeAggregatedDuplicatedProfiles) { … }
class AutofillElementRemovalDetectionTest : public AutofillTest { … };
IN_PROC_BROWSER_TEST_F(AutofillElementRemovalDetectionTest,
DynamicForm_DiscoverRemovedFormFields) { … }
class AutofillAccessibilityTest : public AutofillTest { … };
IN_PROC_BROWSER_TEST_F(AutofillAccessibilityTest,
DISABLED_TestAutofillSuggestionAvailability) { … }
IN_PROC_BROWSER_TEST_F(AutofillAccessibilityTest,
DISABLED_TestAutocompleteState) { … }
class AutofillTestPrerendering : public InProcessBrowserTest { … };
IN_PROC_BROWSER_TEST_F(AutofillTestPrerendering, DeferWhilePrerendering) { … }
class AutofillTestFormSubmission : public InProcessBrowserTest { … };
IN_PROC_BROWSER_TEST_F(AutofillTestFormSubmission, Submission) { … }
IN_PROC_BROWSER_TEST_F(AutofillTestFormSubmission, ProbableSubmission) { … }
}
}