chromium/components/autofill/core/common/autofill_test_utils.cc

// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/autofill/core/common/autofill_test_utils.h"

#include <algorithm>
#include <string>
#include <utility>
#include <vector>

#include "base/check.h"
#include "base/location.h"
#include "base/strings/strcat.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/scoped_feature_list.h"
#include "base/unguessable_token.h"
#include "components/autofill/core/common/autocomplete_parsing_util.h"
#include "components/autofill/core/common/autofill_features.h"
#include "components/autofill/core/common/form_data.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/unique_ids.h"
#include "url/gurl.h"
#include "url/origin.h"

namespace autofill::test {

namespace {

FormData ConstructFormWithNameRenderIdAndProtocol(bool is_https) {}

}  // namespace

AutofillTestEnvironment* AutofillTestEnvironment::current_instance_ =;

AutofillTestEnvironment& AutofillTestEnvironment::GetCurrent(
    const base::Location& location) {}

AutofillTestEnvironment::AutofillTestEnvironment(const Options& options) {}

AutofillTestEnvironment::~AutofillTestEnvironment() {}

LocalFrameToken AutofillTestEnvironment::NextLocalFrameToken() {}

RemoteFrameToken AutofillTestEnvironment::NextRemoteFrameToken() {}

FormRendererId AutofillTestEnvironment::NextFormRendererId() {}

FieldRendererId AutofillTestEnvironment::NextFieldRendererId() {}

AutofillUnitTestEnvironment::AutofillUnitTestEnvironment(const Options& options)
    :{}

AutofillBrowserTestEnvironment::AutofillBrowserTestEnvironment(
    const Options& options)
    :{}

LocalFrameToken MakeLocalFrameToken(RandomizeFrame randomize) {}

RemoteFrameToken MakeRemoteFrameToken(RandomizeFrame randomize) {}

FormData CreateFormDataForFrame(FormData form, LocalFrameToken frame_token) {}

FormData WithoutValues(FormData form) {}

FormData AsAutofilled(FormData form, bool is_autofilled) {}

FormData WithoutUnserializedData(FormData form) {}

FormFieldData WithoutUnserializedData(FormFieldData field) {}

FormFieldData CreateTestFormField(std::string_view label,
                                  std::string_view name,
                                  std::string_view value,
                                  FormControlType type) {}

FormFieldData CreateTestFormField(std::string_view label,
                                  std::string_view name,
                                  std::string_view value,
                                  FormControlType type,
                                  std::string_view autocomplete) {}

FormFieldData CreateTestFormField(std::string_view label,
                                  std::string_view name,
                                  std::string_view value,
                                  FormControlType type,
                                  std::string_view autocomplete,
                                  uint64_t max_length) {}

FormFieldData CreateTestSelectField(std::string_view label,
                                    std::string_view name,
                                    std::string_view value,
                                    const std::vector<const char*>& values,
                                    const std::vector<const char*>& contents) {}

FormFieldData CreateTestSelectField(std::string_view label,
                                    std::string_view name,
                                    std::string_view value,
                                    std::string_view autocomplete,
                                    const std::vector<const char*>& values,
                                    const std::vector<const char*>& contents) {}

FormFieldData CreateTestSelectField(const std::vector<const char*>& values) {}

FormFieldData CreateTestSelectOrSelectListField(
    std::string_view label,
    std::string_view name,
    std::string_view value,
    std::string_view autocomplete,
    const std::vector<const char*>& values,
    const std::vector<const char*>& contents,
    FormControlType type) {}

FormFieldData CreateTestDatalistField(std::string_view label,
                                      std::string_view name,
                                      std::string_view value,
                                      const std::vector<const char*>& values,
                                      const std::vector<const char*>& labels) {}

FormData CreateTestPersonalInformationFormData() {}

FormData CreateTestCreditCardFormData(bool is_https,
                                      bool use_month_type,
                                      bool split_names) {}

FormData CreateTestIbanFormData(std::string_view value, bool is_https) {}

FormData CreateTestPasswordFormData() {}

FormData CreateTestUnclassifiedFormData() {}

}  // namespace autofill::test