#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[] = …;
class MockPrefService : public TestingPrefServiceSimple { … };
base::RepeatingClosure DoNothingClosure() { … }
}
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) { … }
}