#include "components/autofill/core/browser/form_structure_rationalization_engine.h"
#include "base/test/scoped_feature_list.h"
#include "components/autofill/core/browser/field_types.h"
#include "components/autofill/core/browser/form_parsing/form_field_parser.h"
#include "components/autofill/core/browser/heuristic_source.h"
#include "components/autofill/core/common/autofill_test_utils.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace autofill::rationalization {
namespace {
ElementsAre;
BASE_FEATURE(…);
struct FieldTemplate { … };
std::vector<std::unique_ptr<AutofillField>> CreateFields(
const std::vector<FieldTemplate>& field_templates) { … }
std::vector<FieldType> GetTypes(
const std::vector<std::unique_ptr<AutofillField>>& fields) { … }
RationalizationRule CreateTestRule() { … }
TEST(FormStructureRationalizationEngine, TestBuilder) { … }
TEST(FormStructureRationalizationEngine,
IsEnvironmentConditionFulfilled_CheckCountry) { … }
TEST(FormStructureRationalizationEngine,
IsEnvironmentConditionFulfilled_CheckExperiment) { … }
TEST(FormStructureRationalizationEngine,
IsFieldConditionFulfilledIgnoringLocation_CheckPossibleTypes) { … }
TEST(FormStructureRationalizationEngine,
IsFieldConditionFulfilledIgnoringLocation_CheckRegex) { … }
TEST(FormStructureRationalizationEngine, TestRulesAreApplied) { … }
TEST(FormStructureRationalizationEngine,
TestRulesAreNotAppliedWithMissingTriggerField) { … }
TEST(FormStructureRationalizationEngine,
TestRulesAreNotAppliedWithMissingAdditionalCondition) { … }
TEST(FormStructureRationalizationEngine,
TestRulesAreNotAppliedWithViolatedDirectPredecessorRule) { … }
TEST(FormStructureRationalizationEngine,
TestRulesAreAppliedIfLastClassifiedPredecessorNeedsToSkipAField) { … }
TEST(FormStructureRationalizationEngine, TestDEOverflowRuleIsApplied) { … }
TEST(FormStructureRationalizationEngine, TestPLHouseNumberAndAptChanged) { … }
TEST(FormStructureRationalizationEngine, TestPLHouseNumberAndAptNoChange) { … }
TEST(FormStructureRationalizationEngine, TestPLHouseNumberAndAptWithNoNext) { … }
TEST(FormStructureRationalizationEngine, TestPLAddressLine1WithNoNext) { … }
TEST(FormStructureRationalizationEngine, TestITAddressLine1WithAL1Next) { … }
TEST(FormStructureRationalizationEngine, TestITAddressLine1WithNoNext) { … }
}
}