#include "components/supervised_user/core/browser/supervised_user_service.h"
#include <memory>
#include <string>
#include <utility>
#include "base/memory/raw_ptr.h"
#include "base/path_service.h"
#include "base/strings/utf_string_conversions.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/gtest_util.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/task_environment.h"
#include "base/values.h"
#include "build/build_config.h"
#include "components/pref_registry/pref_registry_syncable.h"
#include "components/prefs/pref_service.h"
#include "components/prefs/scoped_user_pref_update.h"
#include "components/prefs/testing_pref_service.h"
#include "components/signin/public/base/consent_level.h"
#include "components/signin/public/identity_manager/account_capabilities_test_mutator.h"
#include "components/signin/public/identity_manager/account_info.h"
#include "components/signin/public/identity_manager/identity_test_environment.h"
#include "components/supervised_user/core/browser/supervised_user_preferences.h"
#include "components/supervised_user/core/browser/supervised_user_settings_service.h"
#include "components/supervised_user/core/browser/supervised_user_utils.h"
#include "components/supervised_user/core/common/features.h"
#include "components/supervised_user/core/common/pref_names.h"
#include "components/supervised_user/core/common/supervised_user_constants.h"
#include "components/supervised_user/test_support/supervised_user_url_filter_test_utils.h"
#include "components/sync/test/mock_sync_service.h"
#include "components/sync_preferences/testing_pref_service_syncable.h"
#include "services/network/public/cpp/weak_wrapper_shared_url_loader_factory.h"
#include "services/network/test/test_url_loader_factory.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace supervised_user {
namespace {
const char kExampleUrl0[] = …;
const char kExampleUrl1[] = …;
}
class SupervisedUserServiceTestBase : public ::testing::Test { … };
class SupervisedUserServiceTest : public SupervisedUserServiceTestBase { … };
TEST_F(SupervisedUserServiceTest, ApprovalRequestsEnabled) { … }
TEST_F(SupervisedUserServiceTest, UrlIsBlockedForUser) { … }
TEST_F(SupervisedUserServiceTest, UrlIsAllowedForUser) { … }
TEST_F(SupervisedUserServiceTest, WebFilterTypeOnPrefsChange) { … }
TEST_F(SupervisedUserServiceTest, ManagedSiteListTypeMetricOnPrefsChange) { … }
TEST_F(SupervisedUserServiceTest, InterstitialBannerState) { … }
class SupervisedUserServiceTestUnsupervised
: public SupervisedUserServiceTestBase { … };
TEST_F(SupervisedUserServiceTestUnsupervised, ApprovalRequestsDisabled) { … }
TEST_F(SupervisedUserServiceTestUnsupervised, UrlIsAllowedForUser) { … }
#if BUILDFLAG(IS_CHROMEOS)
#define MAYBE_DeprecatedFilterPolicy …
#else
#define MAYBE_DeprecatedFilterPolicy …
#endif
TEST_F(SupervisedUserServiceTest, MAYBE_DeprecatedFilterPolicy) { … }
}