#include "components/autofill/core/browser/form_structure_sectioning_util.h"
#include <memory>
#include <string>
#include <vector>
#include "autofill_test_utils.h"
#include "base/check_op.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/scoped_feature_list.h"
#include "components/autofill/core/browser/autofill_field.h"
#include "components/autofill/core/browser/autofill_type.h"
#include "components/autofill/core/browser/field_types.h"
#include "components/autofill/core/common/autocomplete_parsing_util.h"
#include "components/autofill/core/common/autofill_features.h"
#include "components/autofill/core/common/form_field_data.h"
#include "components/autofill/core/common/mojom/autofill_types.mojom-shared.h"
#include "components/autofill/core/common/signatures.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace autofill {
namespace {
Bucket;
BucketsAre;
constexpr char kNumberOfSectionsHistogram[] = …;
constexpr char kFieldsPerSectionHistogram[] = …;
struct FieldTemplate { … };
std::vector<std::unique_ptr<AutofillField>> CreateFields(
const std::vector<FieldTemplate>& field_templates) { … }
std::vector<Section> GetSections(
const std::vector<std::unique_ptr<AutofillField>>& fields) { … }
class FormStructureSectioningTest : public testing::Test { … };
std::vector<std::unique_ptr<AutofillField>> CreateExampleFields() { … }
TEST_F(FormStructureSectioningTest, ExampleFormNoSectioningMode) { … }
TEST_F(FormStructureSectioningTest,
SelectFieldOfHiddenSectionDoesNotLeakIntoFollowingSection) { … }
TEST_F(FormStructureSectioningTest,
RepeatedSequenceOfStateCountryEtcDoesNotBreakSection) { … }
}
}