#include "chrome/browser/extensions/shared_module_service.h"
#include <memory>
#include <string>
#include <utility>
#include "base/memory/ref_counted.h"
#include "base/values.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_service_test_base.h"
#include "chrome/browser/extensions/pending_extension_manager.h"
#include "components/crx_file/id_util.h"
#include "components/sync/model/string_ordinal.h"
#include "components/version_info/version_info.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/install_flag.h"
#include "extensions/browser/uninstall_reason.h"
#include "extensions/common/extension_builder.h"
#include "extensions/common/features/feature_channel.h"
namespace extensions {
namespace {
scoped_refptr<const Extension> CreateExtensionImportingModules(
const std::vector<std::string>& import_ids,
const std::string& id,
const std::string& version) { … }
scoped_refptr<const Extension> CreateSharedModule(
const std::string& module_id) { … }
}
class SharedModuleServiceUnitTest : public ExtensionServiceTestBase { … };
void SharedModuleServiceUnitTest::SetUp() { … }
testing::AssertionResult SharedModuleServiceUnitTest::InstallExtension(
const Extension* extension,
bool is_update) { … }
TEST_F(SharedModuleServiceUnitTest, AddDependentSharedModules) { … }
TEST_F(SharedModuleServiceUnitTest, PruneSharedModulesOnUninstall) { … }
TEST_F(SharedModuleServiceUnitTest, PruneSharedModulesOnUpdate) { … }
TEST_F(SharedModuleServiceUnitTest, AllowlistedImports) { … }
TEST_F(SharedModuleServiceUnitTest, PruneMultipleSharedModules) { … }
}