chromium/device/fido/credential_management_handler_unittest.cc

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

#include "device/fido/credential_management_handler.h"

#include <algorithm>
#include <cstdint>
#include <memory>
#include <optional>
#include <string>
#include <tuple>
#include <utility>
#include <vector>

#include "base/check_op.h"
#include "base/containers/flat_set.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/ranges/algorithm.h"
#include "base/strings/strcat.h"
#include "base/test/task_environment.h"
#include "base/test/test_future.h"
#include "device/fido/credential_management.h"
#include "device/fido/fido_constants.h"
#include "device/fido/fido_parsing_utils.h"
#include "device/fido/fido_transport_protocol.h"
#include "device/fido/fido_types.h"
#include "device/fido/large_blob.h"
#include "device/fido/public_key_credential_descriptor.h"
#include "device/fido/public_key_credential_rp_entity.h"
#include "device/fido/public_key_credential_user_entity.h"
#include "device/fido/virtual_ctap2_device.h"
#include "device/fido/virtual_fido_device.h"
#include "device/fido/virtual_fido_device_factory.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace device {
namespace {

UnorderedElementsAreArray;

constexpr char kPIN[] =;
constexpr uint8_t kCredentialID[] =;
constexpr char kRPID[] =;
constexpr char kRPName[] =;
constexpr uint8_t kUserID[] =;
constexpr char kUserName[] =;
constexpr char kUserDisplayName[] =;

class CredentialManagementHandlerTest : public ::testing::Test {};

TEST_F(CredentialManagementHandlerTest, TestDeleteCredentials) {}

// Tests that the credential management handler performs garbage collection when
// starting up.
TEST_F(CredentialManagementHandlerTest, TestGarbageCollectLargeBlob_Startup) {}

// Tests that CredentialManagementHandler::DeleteCredentials performs large blob
// garbage collection.
TEST_F(CredentialManagementHandlerTest, TestGarbageCollectLargeBlob_Delete) {}

// Tests that CredentialManagementHandler::DeleteCredentials does not attempt
// large blob garbage collection if there is an error deleting the credential.
TEST_F(CredentialManagementHandlerTest,
       TestGarbageCollectLargeBlob_DeleteError) {}

TEST_F(CredentialManagementHandlerTest, TestUpdateUserInformation) {}

TEST_F(CredentialManagementHandlerTest, TestForcePINChange) {}

TEST_F(CredentialManagementHandlerTest,
       EnumerateCredentialResponse_TruncatedUTF8) {}

TEST_F(CredentialManagementHandlerTest, EnumerateCredentialsMultipleRPs) {}

}  // namespace
}  // namespace device