#include "components/autofill/content/renderer/form_cache.h"
#include <optional>
#include <string_view>
#include "base/memory/raw_ptr.h"
#include "base/memory/raw_ref.h"
#include "base/ranges/algorithm.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/scoped_feature_list.h"
#include "build/build_config.h"
#include "components/autofill/content/renderer/autofill_agent_test_api.h"
#include "components/autofill/content/renderer/autofill_renderer_test.h"
#include "components/autofill/content/renderer/focus_test_utils.h"
#include "components/autofill/content/renderer/form_autofill_util.h"
#include "components/autofill/content/renderer/form_cache_test_api.h"
#include "components/autofill/content/renderer/test_utils.h"
#include "components/autofill/core/common/autofill_features.h"
#include "components/autofill/core/common/field_data_manager.h"
#include "components/autofill/core/common/form_data_test_api.h"
#include "components/autofill/core/common/form_field_data.h"
#include "components/autofill/core/common/mojom/autofill_types.mojom-shared.h"
#include "content/public/test/render_view_test.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/web/web_document.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_select_element.h"
WebDocument;
WebElement;
AllOf;
ElementsAre;
Field;
Property;
UnorderedElementsAre;
namespace autofill {
namespace {
CheckStatus;
auto HasId(FormRendererId expected_id) { … }
auto HasName(std::string_view expected_name) { … }
auto IsToken(FrameToken expected_token, int expected_predecessor) { … }
const FormData* GetFormByName(const std::vector<FormData>& forms,
std::string_view name) { … }
class FormCacheBrowserTest : public test::AutofillRendererTest { … };
TEST_F(FormCacheBrowserTest, UpdatedForms) { … }
TEST_F(FormCacheBrowserTest, RemovedForms) { … }
TEST_F(FormCacheBrowserTest, ExtractFormAfterDynamicFieldChange) { … }
TEST_F(FormCacheBrowserTest, ExtractFrames) { … }
TEST_F(FormCacheBrowserTest, ExtractFormsTwice) { … }
TEST_F(FormCacheBrowserTest, ExtractFramesTwice) { … }
TEST_F(FormCacheBrowserTest, ExtractFramesAfterVisibilityChange) { … }
TEST_F(FormCacheBrowserTest, ExtractFormsAfterModification) { … }
TEST_F(FormCacheBrowserTest,
VerifyFocusAndBlurEventsAfterAutofillAndClearingWithFocusElement) { … }
TEST_F(FormCacheBrowserTest, DoNotStoreEmptyForms) { … }
TEST_F(FormCacheBrowserTest, FormCacheSizeUpperBound) { … }
TEST_F(FormCacheBrowserTest, FieldLimit) { … }
TEST_F(FormCacheBrowserTest, FrameLimit) { … }
#if BUILDFLAG(IS_ANDROID)
#define MAYBE_FieldAndFrameLimit …
#else
#define MAYBE_FieldAndFrameLimit …
#endif
TEST_F(FormCacheBrowserTest, MAYBE_FieldAndFrameLimit) { … }
TEST_F(FormCacheBrowserTest, UpdateFormCacheMeasuresTotalTime) { … }
}
}