#include "base/memory/raw_ptr.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/values_test_util.h"
#include "chrome/browser/extensions/extension_management_internal.h"
#include "chrome/browser/extensions/extension_service_test_base.h"
#include "chrome/browser/extensions/manifest_v2_experiment_manager.h"
#include "chrome/browser/extensions/mv2_experiment_stage.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/test/base/testing_profile.h"
#include "components/sync_preferences/testing_pref_service_syncable.h"
#include "extensions/browser/pref_names.h"
#include "extensions/common/extension_builder.h"
#include "extensions/common/extension_features.h"
#include "extensions/common/mojom/manifest.mojom.h"
namespace extensions {
namespace {
constexpr char kTestHashedIdA[] = …;
constexpr char kTestHashedIdB[] = …;
enum class MV2PolicyLevel { … };
TestVariant;
std::string DescribeTestVariant(const TestVariant& test_variant) { … }
}
class MV2DeprecationImpactCheckerUnitTest
: public ExtensionServiceTestBase,
public testing::WithParamInterface<TestVariant> { … };
MV2DeprecationImpactCheckerUnitTest::MV2DeprecationImpactCheckerUnitTest()
: … { … }
class MV2DeprecationImpactCheckerUnitTestWithAllowlist
: public MV2DeprecationImpactCheckerUnitTest { … };
INSTANTIATE_TEST_SUITE_P(…);
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(MV2DeprecationImpactCheckerUnitTest,
UserVisibleMV2ExtensionsAreAffected) { … }
TEST_P(MV2DeprecationImpactCheckerUnitTest,
DefaultInstalledMV2ExtensionsAreAffected) { … }
TEST_P(MV2DeprecationImpactCheckerUnitTest, ComponentExtensionsAreNotAffected) { … }
TEST_P(MV2DeprecationImpactCheckerUnitTest, NoMV3ExtensionsAreAffected) { … }
TEST_P(MV2DeprecationImpactCheckerUnitTest,
MV2PolicyInstalledExtensionsMayBeAffected) { … }
TEST_P(MV2DeprecationImpactCheckerUnitTest,
MV2PolicyAllowedExtensionsMayBeAffected) { … }
TEST_P(MV2DeprecationImpactCheckerUnitTest,
MV3PolicyInstalledExtensionsNeverAffected) { … }
TEST_P(MV2DeprecationImpactCheckerUnitTest, NonExtensionsAreNotAffected) { … }
TEST_P(MV2DeprecationImpactCheckerUnitTestWithAllowlist, AllowlistWorks) { … }
}