chromium/components/prefs/pref_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 "components/prefs/pref_value_store.h"

#include <memory>
#include <string>

#include "base/functional/bind.h"
#include "base/memory/ref_counted.h"
#include "base/values.h"
#include "components/prefs/pref_notifier.h"
#include "components/prefs/testing_pref_store.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

Mock;
_;

namespace {

// Allows to capture pref notifications through gmock.
class MockPrefNotifier : public PrefNotifier {};

}  // namespace

// Names of the preferences used in this test.
namespace prefs {
const char kManagedPref[] =;
const char kSupervisedUserPref[] =;
const char kCommandLinePref[] =;
const char kExtensionPref[] =;
const char kStandaloneBrowserPref[] =;
const char kUserPref[] =;
const char kRecommendedPref[] =;
const char kDefaultPref[] =;
const char kMissingPref[] =;
}

// Potentially expected values of all preferences used in this test program.
namespace managed_pref {
const char kManagedValue[] =;
}

namespace supervised_user_pref {
const char kManagedValue[] =;
const char kSupervisedUserValue[] =;
}

namespace extension_pref {
const char kManagedValue[] =;
const char kSupervisedUserValue[] =;
const char kExtensionValue[] =;
}

namespace standalone_browser_pref {
const char kManagedValue[] =;
const char kSupervisedUserValue[] =;
const char kExtensionValue[] =;
const char kStandaloneBrowserValue[] =;
}  // namespace standalone_browser_pref

namespace command_line_pref {
const char kManagedValue[] =;
const char kSupervisedUserValue[] =;
const char kExtensionValue[] =;
const char kStandaloneBrowserValue[] =;
const char kCommandLineValue[] =;
}

namespace user_pref {
const char kManagedValue[] =;
const char kSupervisedUserValue[] =;
const char kExtensionValue[] =;
const char kStandaloneBrowserValue[] =;
const char kCommandLineValue[] =;
const char kUserValue[] =;
}

namespace recommended_pref {
const char kManagedValue[] =;
const char kSupervisedUserValue[] =;
const char kExtensionValue[] =;
const char kStandaloneBrowserValue[] =;
const char kCommandLineValue[] =;
const char kUserValue[] =;
const char kRecommendedValue[] =;
}

namespace default_pref {
const char kManagedValue[] =;
const char kSupervisedUserValue[] =;
const char kExtensionValue[] =;
const char kStandaloneBrowserValue[] =;
const char kCommandLineValue[] =;
const char kUserValue[] =;
const char kRecommendedValue[] =;
const char kDefaultValue[] =;
}

class PrefValueStoreTest : public testing::Test {};

TEST_F(PrefValueStoreTest, GetValue) {}

TEST_F(PrefValueStoreTest, GetRecommendedValue) {}

TEST_F(PrefValueStoreTest, PrefChanges) {}

TEST_F(PrefValueStoreTest, OnInitializationCompleted) {}

TEST_F(PrefValueStoreTest, PrefValueInManagedStore) {}

TEST_F(PrefValueStoreTest, PrefValueInExtensionStore) {}

TEST_F(PrefValueStoreTest, PrefValueInUserStore) {}

TEST_F(PrefValueStoreTest, PrefValueFromExtensionStore) {}

TEST_F(PrefValueStoreTest, PrefValueFromUserStore) {}

TEST_F(PrefValueStoreTest, PrefValueFromRecommendedStore) {}

TEST_F(PrefValueStoreTest, PrefValueFromDefaultStore) {}

TEST_F(PrefValueStoreTest, PrefValueUserModifiable) {}

TEST_F(PrefValueStoreTest, PrefValueExtensionModifiable) {}