chromium/chrome/browser/extensions/api/storage/policy_value_store_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 "chrome/browser/extensions/api/storage/policy_value_store.h"

#include <memory>

#include "base/files/file_path.h"
#include "base/files/scoped_temp_dir.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/json/json_writer.h"
#include "base/memory/ref_counted.h"
#include "components/policy/core/common/external_data_fetcher.h"
#include "components/policy/core/common/policy_map.h"
#include "components/policy/core/common/policy_types.h"
#include "components/value_store/leveldb_value_store.h"
#include "components/value_store/value_store_test_suite.h"
#include "content/public/test/browser_task_environment.h"
#include "content/public/test/test_utils.h"
#include "extensions/browser/api/storage/backend_task_runner.h"
#include "extensions/browser/api/storage/settings_observer.h"
#include "extensions/browser/api/storage/storage_area_namespace.h"
#include "extensions/common/extension_id.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

_;
Mock;
NiceMock;
ValueStore;
ValueStoreTestSuite;

namespace extensions {

namespace {

const char kTestExtensionId[] =;
const char kDatabaseUMAClientName[] =;

std::string ValueToJson(const base::Value& changes) {}

std::string ValueStoreChangeToJson(value_store::ValueStoreChangeList changes) {}

class MockSettingsObserver {};

// Extends PolicyValueStore by overriding the mutating methods, so that the
// Get() base implementation can be tested with the ValueStoreTestSuite
// parameterized tests.
class MutablePolicyValueStore : public PolicyValueStore {};

ValueStore* Param(const base::FilePath& file_path) {}

}  // namespace

INSTANTIATE_TEST_SUITE_P();

class PolicyValueStoreTest : public testing::Test {};

TEST_F(PolicyValueStoreTest, DontProvideRecommendedPolicies) {}

TEST_F(PolicyValueStoreTest, ReadOnly) {}

TEST_F(PolicyValueStoreTest, NotifyOnChanges) {}

}  // namespace extensions