#include "components/policy/core/common/cloud/cloud_policy_core.h"
#include <memory>
#include "base/base64.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/task_environment.h"
#include "build/buildflag.h"
#include "components/policy/core/common/cloud/cloud_policy_client.h"
#include "components/policy/core/common/cloud/cloud_policy_constants.h"
#include "components/policy/core/common/cloud/cloud_policy_refresh_scheduler.h"
#include "components/policy/core/common/cloud/mock_cloud_policy_client.h"
#include "components/policy/core/common/cloud/mock_cloud_policy_store.h"
#include "components/policy/core/common/policy_pref_names.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/testing_pref_service.h"
#include "services/network/test/test_network_connection_tracker.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace policy {
namespace {
MockCloudPolicyClient* AddMockClient(CloudPolicyCore* core) { … }
}
class CloudPolicyCoreTest : public testing::Test,
public CloudPolicyCore::Observer { … };
TEST_F(CloudPolicyCoreTest, ConnectAndDisconnectAndDestroy) { … }
TEST_F(CloudPolicyCoreTest, RefreshScheduler) { … }
TEST_F(CloudPolicyCoreTest, RefreshSoonWithoutScheduler) { … }
TEST_F(CloudPolicyCoreTest, RefreshSoonWithoutConnectedClient) { … }
TEST_F(CloudPolicyCoreTest, RefreshSoon) { … }
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
TEST_F(CloudPolicyCoreTest, DmProtocolBase64Constants) { … }
#endif
TEST_F(CloudPolicyCoreTest, DestroyWithoutConnecting) { … }
}