chromium/components/policy/core/browser/configuration_policy_pref_store_unittest.cc

// Copyright 2014 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/browser/configuration_policy_pref_store.h"

#include <memory>
#include <string>
#include <utility>

#include "base/files/file_path.h"
#include "base/functional/callback.h"
#include "base/memory/ptr_util.h"
#include "base/run_loop.h"
#include "components/policy/core/browser/configuration_policy_handler.h"
#include "components/policy/core/browser/configuration_policy_pref_store_test.h"
#include "components/policy/core/common/external_data_fetcher.h"
#include "components/policy/core/common/policy_details.h"
#include "components/policy/core/common/policy_map.h"
#include "components/policy/core/common/policy_pref_names.h"
#include "components/policy/core/common/policy_service_impl.h"
#include "components/policy/core/common/policy_types.h"
#include "components/prefs/pref_store_observer_mock.h"
#include "testing/gmock/include/gmock/gmock.h"

// Note: this file should move to components/policy/core/browser, but the
// components_unittests runner does not load the ResourceBundle as
// ChromeTestSuite::Initialize does, which leads to failures using
// PolicyErrorMap.

Mock;
Return;
_;

namespace {

const char kTestPolicy[] =;
const char kTestPref[] =;

}  // namespace

namespace policy {

// Test cases for list-valued policy settings.
class ConfigurationPolicyPrefStoreListTest
    : public ConfigurationPolicyPrefStoreTest {};

TEST_F(ConfigurationPolicyPrefStoreListTest, GetDefault) {}

TEST_F(ConfigurationPolicyPrefStoreListTest, SetValue) {}

// Test cases for string-valued policy settings.
class ConfigurationPolicyPrefStoreStringTest
    : public ConfigurationPolicyPrefStoreTest {};

TEST_F(ConfigurationPolicyPrefStoreStringTest, GetDefault) {}

TEST_F(ConfigurationPolicyPrefStoreStringTest, SetValue) {}

// Test cases for boolean-valued policy settings.
class ConfigurationPolicyPrefStoreBooleanTest
    : public ConfigurationPolicyPrefStoreTest {};

TEST_F(ConfigurationPolicyPrefStoreBooleanTest, GetDefault) {}

TEST_F(ConfigurationPolicyPrefStoreBooleanTest, SetValue) {}

// Test cases for integer-valued policy settings.
class ConfigurationPolicyPrefStoreIntegerTest
    : public ConfigurationPolicyPrefStoreTest {};

TEST_F(ConfigurationPolicyPrefStoreIntegerTest, GetDefault) {}

TEST_F(ConfigurationPolicyPrefStoreIntegerTest, SetValue) {}

// Exercises the policy refresh mechanism.
class ConfigurationPolicyPrefStoreRefreshTest
    : public ConfigurationPolicyPrefStoreTest {};

TEST_F(ConfigurationPolicyPrefStoreRefreshTest, Refresh) {}

TEST_F(ConfigurationPolicyPrefStoreRefreshTest, Initialization) {}

}  // namespace policy