chromium/components/password_manager/core/common/password_manager_util_unittest.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/password_manager/core/common/password_manager_util.h"

#include <string>

#include "components/autofill/core/common/form_data.h"
#include "components/autofill/core/common/form_field_data.h"
#include "components/password_manager/core/common/password_manager_constants.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace password_manager::util {

namespace {

FormData;
FormFieldData;

FormFieldData CreateFormField(autofill::FormControlType form_control_type,
                              std::string autocomplete_attribute) {}

TEST(PasswordsManagerUtilTest,
     IsRendererRecognizedCredentialFormWithPasswordField) {}

TEST(PasswordsManagerUtilTest,
     IsRendererRecognizedCredentialFormWithUsernameAutocompleteAttribute) {}

TEST(PasswordsManagerUtilTest,
     IsRendererRecognizedCredentialFormWithFamilyNameAutocompleteAttribute) {}

// Test that a valid username field is considered as such.
TEST(PasswordsManagerUtilTest, CanValueBeConsideredAsSingleUsername_Valid) {}

TEST(PasswordsManagerUtilTest,
     CanValueBeConsideredAsSingleUsername_ValueHasOtpSize) {}

TEST(PasswordsManagerUtilTest,
     CanValueBeConsideredAsSingleUsername_ValueEmpty) {}

TEST(PasswordsManagerUtilTest,
     CanValueBeConsideredAsSingleUsername_ValueTooLarge) {}

// Test that a valid username field is considered as such.
TEST(PasswordsManagerUtilTest, CanFieldBeConsideredAsSingleUsername_Valid) {}

// Test that a field with a too short id and name attribute isn't considered as
// a valid username.
TEST(PasswordsManagerUtilTest,
     CanFieldBeConsideredAsSingleUsername_IdAndNameTooShort) {}

// Test that a field that looks like a search field isn't considered as a valid
// username.
TEST(PasswordsManagerUtilTest,
     CanFieldBeConsideredAsSingleUsername_IsSearchField) {}

// Tests that a field that looks like an OTP is considered as such.
TEST(PasswordsManagerUtilTest, IsLikelyOtp_True) {}

// Tests that a field that doesn't look like an OTP isn't considered as
// such.
TEST(PasswordsManagerUtilTest, IsLikelyOtp_False) {}

}  // namespace

}  // namespace password_manager::util