#include "components/autofill/core/browser/rationalization_util.h"
#include <memory>
#include <tuple>
#include <vector>
#include "components/autofill/core/browser/autofill_field.h"
#include "components/autofill/core/browser/field_types.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace autofill {
namespace {
struct FieldTemplate { … };
std::tuple<std::vector<std::unique_ptr<AutofillField>>, std::vector<bool>>
CreateTest(std::vector<FieldTemplate> field_templates) { … }
std::vector<AutofillField*> ToPointers(
std::vector<std::unique_ptr<AutofillField>>& fields) { … }
std::vector<bool> GetOnlyFilledWhenFocused(
const std::vector<std::unique_ptr<AutofillField>>& fields) { … }
}
TEST(AutofillRationalizationUtilTest, PhoneNumber_FirstNumberIsWholeNumber) { … }
TEST(AutofillRationalizationUtilTest, PhoneNumber_FirstNumberIsComponentized) { … }
TEST(AutofillRationalizationUtilTest,
PhoneNumber_BestEffortWhenNoCompleteNumberIsFound) { … }
TEST(AutofillRationalizationUtilTest, PhoneNumber_FillPhonePartsOnceOnly) { … }
TEST(AutofillRationalizationUtilTest, PhoneNumber_SkipHiddenPhoneNumberFields) { … }
TEST(AutofillRationalizationUtilTest,
PhoneNumber_ProcessNumberPrefixAndSuffix) { … }
TEST(AutofillRationalizationUtilTest, PhoneNumber_IncorrectPrefix) { … }
TEST(AutofillRationalizationUtilTest, PhoneNumber_IncorrectSuffix) { … }
}