chromium/content/browser/webauth/authenticator_mojom_traits_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 "third_party/blink/public/mojom/authenticator_mojom_traits.h"

#include <vector>

#include "device/fido/authenticator_selection_criteria.h"
#include "device/fido/cable/cable_discovery_data.h"
#include "device/fido/fido_constants.h"
#include "device/fido/fido_transport_protocol.h"
#include "device/fido/public_key_credential_descriptor.h"
#include "device/fido/public_key_credential_params.h"
#include "device/fido/public_key_credential_rp_entity.h"
#include "device/fido/public_key_credential_user_entity.h"
#include "mojo/public/cpp/test_support/test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/mojom/webauthn/authenticator.mojom.h"

namespace mojo {

AuthenticatorAttachment;
AuthenticatorSelectionCriteria;
CableDiscoveryData;
CableEidArray;
CableSessionPreKeyArray;
CoseAlgorithmIdentifier;
CredentialType;
FidoTransportProtocol;
PublicKeyCredentialDescriptor;
PublicKeyCredentialParams;
PublicKeyCredentialRpEntity;
PublicKeyCredentialUserEntity;
ResidentKeyRequirement;
UserVerificationRequirement;

const std::vector<uint8_t> kDescriptorId =;
constexpr char kRpId[] =;
constexpr char kRpName[] =;
constexpr CableEidArray kClientEid =;
constexpr CableEidArray kAuthenticatorEid =;
constexpr CableSessionPreKeyArray kSessionPreKey =;

namespace {

template <typename MojomType, typename UserType>
void AssertSerializeAndDeserializeSucceeds(std::vector<UserType> test_cases) {}

}  // namespace

// Verify serialization and deserialization of PublicKeyCredentialParams.
TEST(AuthenticatorMojomTraitsTest, SerializeCredentialParams) {}

// Verify serialization and deserialization of PublicKeyCredentialDescriptor.
TEST(AuthenticatorMojomTraitsTest, SerializeCredentialDescriptors) {}

// Verify serialization and deserialization of AuthenticatorSelectionCriteria.
TEST(AuthenticatorMojomTraitsTest, SerializeAuthenticatorSelectionCriteria) {}

// Verify serialization and deserialization of PublicKeyCredentialRpEntity.
TEST(AuthenticatorMojomTraitsTest, SerializePublicKeyCredentialRpEntity) {}

// Verify serialization and deserialization of PublicKeyCredentialUserEntity.
TEST(AuthenticatorMojomTraitsTest, SerializePublicKeyCredentialUserEntity) {}

// Verify serialization and deserialization of CableDiscoveryData.
TEST(AuthenticatorMojomTraitsTest, SerializeCableDiscoveryData) {}

}  // namespace mojo