#include "chrome/browser/supervised_user/supervised_user_extensions_manager.h"
#include <string>
#include <vector>
#include "base/test/gtest_util.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/scoped_feature_list.h"
#include "base/values.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_service_test_base.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/supervised_user/supervised_user_extensions_metrics_recorder.h"
#include "chrome/browser/supervised_user/supervised_user_test_util.h"
#include "chrome/test/base/testing_profile.h"
#include "components/prefs/pref_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/version_info/version_info.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_builder.h"
#include "extensions/common/features/feature_channel.h"
#include "extensions/common/manifest_constants.h"
#include "testing/gtest/include/gtest/gtest.h"
enum class ExtensionsManagingToggle : int { … };
Extension;
class SupervisedUserExtensionsManagerTestBase
: public extensions::ExtensionServiceTestBase { … };
class SupervisedUserExtensionsManagerTest
: public SupervisedUserExtensionsManagerTestBase,
public ::testing::WithParamInterface<ExtensionsManagingToggle> { … };
TEST_P(SupervisedUserExtensionsManagerTest,
ExtensionManagementPolicyProviderWithoutSUInitiatedInstalls) { … }
TEST_P(SupervisedUserExtensionsManagerTest,
ExtensionManagementPolicyProviderWithSUInitiatedInstalls) { … }
TEST_P(SupervisedUserExtensionsManagerTest,
MigrateExtensionsToLocallyApproved) { … }
TEST_P(SupervisedUserExtensionsManagerTest,
GrantParentApprovalOnInstallationWhenExtensionsToggleOn) { … }
TEST_P(SupervisedUserExtensionsManagerTest,
GrantParentApprovalOnExtensionsWhenExtensionsToggleSetToOn) { … }
TEST_P(SupervisedUserExtensionsManagerTest, RevokeLocalApproval) { … }
INSTANTIATE_TEST_SUITE_P(…);
enum class LocalApprovalMigrationForDesktopState : int { … };
class AddingSupervisionTest
: public SupervisedUserExtensionsManagerTestBase,
public ::testing::WithParamInterface<
std::tuple<ExtensionsManagingToggle,
LocalApprovalMigrationForDesktopState>> { … };
TEST_P(AddingSupervisionTest,
DisableExistingExtensionsOnProfileBecomingSupervised) { … }
INSTANTIATE_TEST_SUITE_P(…);