Relax shared module whitelist restriction
This is to allow unpacked extensions to load without checking
a shared module's whitelist. Webstore installs and side-loading
via CRX are still restricted.
BUG=414950
Review URL: https://codereview.chromium.org/573113002
Cr-Commit-Position: refs/heads/master@{#296134}
diff --git a/chrome/browser/extensions/shared_module_service_unittest.cc b/chrome/browser/extensions/shared_module_service_unittest.cc
index ca12165..1a8a2f2 100644
--- a/chrome/browser/extensions/shared_module_service_unittest.cc
+++ b/chrome/browser/extensions/shared_module_service_unittest.cc
@@ -268,7 +268,11 @@
CreateExtensionImportingModule(shared_module->id(),
nonwhitelisted_id,
"1.0");
- EXPECT_FALSE(InstallExtension(nonwhitelisted_extension.get(), false));
+ // This should succeed because only CRX installer (and by extension the
+ // WebStore Installer) checks the shared module whitelist. InstallExtension
+ // bypasses the whitelist check because the SharedModuleService does not
+ // care about whitelists.
+ EXPECT_TRUE(InstallExtension(nonwhitelisted_extension.get(), false));
}
} // namespace extensions