chromium/chrome/browser/enterprise/connectors/device_trust/key_management/browser/key_rotation_launcher_unittest.cc

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

#include "chrome/browser/enterprise/connectors/device_trust/key_management/browser/key_rotation_launcher.h"

#include <memory>
#include <optional>
#include <utility>

#include "base/check.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/scoped_refptr.h"
#include "base/test/bind.h"
#include "base/test/task_environment.h"
#include "base/test/test_future.h"
#include "chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/key_rotation_command.h"
#include "chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/key_rotation_command_factory.h"
#include "chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/mock_key_rotation_command.h"
#include "chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/scoped_key_rotation_command_factory.h"
#include "components/enterprise/browser/controller/browser_dm_token_storage.h"
#include "components/enterprise/browser/controller/fake_browser_dm_token_storage.h"
#include "components/policy/core/common/cloud/device_management_service.h"
#include "components/policy/core/common/cloud/mock_device_management_service.h"
#include "components/policy/proto/device_management_backend.pb.h"
#include "services/network/public/cpp/weak_wrapper_shared_url_loader_factory.h"
#include "services/network/test/test_url_loader_factory.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

BPKUR;

namespace enterprise_connectors {

namespace {

constexpr char kNonce[] =;
constexpr char kFakeDMToken[] =;
constexpr char kFakeClientId[] =;
constexpr char kExpectedDmServerUrl[] =;

}  // namespace

class KeyRotationLauncherTest : public testing::Test {};

TEST_F(KeyRotationLauncherTest, LaunchKeyRotation) {}

TEST_F(KeyRotationLauncherTest, LaunchKeyRotation_InvalidDMTokenStorage) {}

TEST_F(KeyRotationLauncherTest, LaunchKeyRotation_InvalidDMToken) {}

TEST_F(KeyRotationLauncherTest, LaunchKeyRotation_InvalidManagementService) {}

TEST_F(KeyRotationLauncherTest, LaunchKeyRotation_InvalidCommand) {}

}  // namespace enterprise_connectors