chromium/components/enterprise/client_certificates/core/client_certificates_service_unittest.cc

// Copyright 2024 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/enterprise/client_certificates/core/client_certificates_service.h"

#include "base/test/gmock_callback_support.h"
#include "base/test/task_environment.h"
#include "base/test/test_future.h"
#include "components/enterprise/client_certificates/core/certificate_provisioning_service.h"
#include "components/enterprise/client_certificates/core/client_identity.h"
#include "components/enterprise/client_certificates/core/mock_certificate_provisioning_service.h"
#include "components/enterprise/client_certificates/core/mock_private_key.h"
#include "net/cert/x509_certificate.h"
#include "net/ssl/client_cert_identity.h"
#include "net/ssl/client_cert_identity_test_util.h"
#include "net/ssl/client_cert_store.h"
#include "net/ssl/ssl_cert_request_info.h"
#include "net/ssl/test_ssl_private_key.h"
#include "net/test/cert_test_util.h"
#include "net/test/test_data_directory.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace client_certificates {

RunOnceCallback;
_;
Return;
StrictMock;

namespace {

class MockClientCertStore : public net::ClientCertStore {};

scoped_refptr<net::X509Certificate> LoadTestPlatformCert() {}

scoped_refptr<net::X509Certificate> LoadTestManagedCert() {}

}  // namespace

class ClientCertificatesServiceTest : public testing::Test {};

// Tests that only the platform identity is returned when there are no managed
// identity.
TEST_F(ClientCertificatesServiceTest, GetClientCertsNoManagedIdentity) {}

// Tests that both the platform identity and managed identity are returned.
TEST_F(ClientCertificatesServiceTest,
       GetClientCerts_WithManagedIdentity_NoSSLKey) {}

// Tests that both the platform identity and managed identity are returned when
// the managed identity has a valid key to be used with TLS.
TEST_F(ClientCertificatesServiceTest, GetClientCerts_WithManagedIdentity) {}

}  // namespace client_certificates