chromium/components/policy/core/common/cloud/cloud_policy_manager_unittest.cc

// Copyright 2012 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/policy/core/common/cloud/cloud_policy_manager.h"

#include <memory>
#include <utility>

#include "base/compiler_specific.h"
#include "base/functional/callback.h"
#include "base/memory/raw_ptr.h"
#include "base/task/sequenced_task_runner.h"
#include "base/test/task_environment.h"
#include "base/values.h"
#include "components/policy/core/common/cloud/cloud_policy_constants.h"
#include "components/policy/core/common/cloud/mock_cloud_policy_client.h"
#include "components/policy/core/common/cloud/mock_cloud_policy_manager.h"
#include "components/policy/core/common/cloud/mock_cloud_policy_store.h"
#include "components/policy/core/common/cloud/test/policy_builder.h"
#include "components/policy/core/common/configuration_policy_provider_test.h"
#include "components/policy/core/common/external_data_fetcher.h"
#include "components/policy/core/common/mock_configuration_policy_provider.h"
#include "components/policy/core/common/policy_types.h"
#include "components/policy/core/common/schema_registry.h"
#include "services/network/test/test_network_connection_tracker.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

Mock;
_;

em;

namespace policy {
namespace {

class TestHarness : public PolicyProviderTestHarness {};

TestHarness::TestHarness(PolicyLevel level)
    :{}

TestHarness::~TestHarness() {}

void TestHarness::SetUp() {}

void TestHarness::TearDown() {}

ConfigurationPolicyProvider* TestHarness::CreateProvider(
    SchemaRegistry* registry,
    scoped_refptr<base::SequencedTaskRunner> task_runner) {}

void TestHarness::InstallEmptyPolicy() {}

void TestHarness::InstallStringPolicy(const std::string& policy_name,
                                      const std::string& policy_value) {}

void TestHarness::InstallIntegerPolicy(const std::string& policy_name,
                                       int policy_value) {}

void TestHarness::InstallBooleanPolicy(const std::string& policy_name,
                                       bool policy_value) {}

void TestHarness::InstallStringListPolicy(
    const std::string& policy_name,
    const base::Value::List& policy_value) {}

void TestHarness::InstallDictionaryPolicy(
    const std::string& policy_name,
    const base::Value::Dict& policy_value) {}

// static
PolicyProviderTestHarness* TestHarness::CreateMandatory() {}

// static
PolicyProviderTestHarness* TestHarness::CreateRecommended() {}

// Instantiate abstract test case for basic policy reading tests.
INSTANTIATE_TEST_SUITE_P();

MATCHER_P(ProtoMatches, proto, std::string()) {}

class CloudPolicyManagerTest : public testing::Test {};

TEST_F(CloudPolicyManagerTest, InitAndShutdown) {}

TEST_F(CloudPolicyManagerTest, RegistrationAndFetch) {}

TEST_F(CloudPolicyManagerTest, Update) {}

TEST_F(CloudPolicyManagerTest, RefreshNotRegistered) {}

TEST_F(CloudPolicyManagerTest, RefreshSuccessful) {}

TEST_F(CloudPolicyManagerTest, SignalOnError) {}

}  // namespace
}  // namespace policy