chromium/components/prefs/pref_change_registrar_unittest.cc

// Copyright 2010 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_change_registrar.h"

#include <memory>
#include <string_view>

#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "components/prefs/pref_observer.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/testing_pref_service.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace base {
namespace {

Mock;

const char kHomePage[] =;
const char kHomePageIsNewTabPage[] =;
const char kApplicationLocale[] =;

// A mock provider that allows us to capture pref observer changes.
class MockPrefService : public TestingPrefServiceSimple {};

// Due to overloads, base::DoNothing() cannot be passed directly to
// PrefChangeRegistrar::Add() as it is convertible to all callbacks.
base::RepeatingClosure DoNothingClosure() {}

}  // namespace

class PrefChangeRegistrarTest : public testing::Test {};

void PrefChangeRegistrarTest::SetUp() {}

TEST_F(PrefChangeRegistrarTest, AddAndRemove) {}

TEST_F(PrefChangeRegistrarTest, AutoRemove) {}

TEST_F(PrefChangeRegistrarTest, RemoveAll) {}

class ObserveSetOfPreferencesTest : public testing::Test {};

TEST_F(ObserveSetOfPreferencesTest, IsObserved) {}

TEST_F(ObserveSetOfPreferencesTest, Observe) {}

}  // namespace base