| Index: chrome/common/pepper_permission_util_unittest.cc
|
| diff --git a/chrome/common/pepper_permission_util_unittest.cc b/chrome/common/pepper_permission_util_unittest.cc
|
| index b31297db161fbae7e29d1dd10f12b1b20f6a701a..54ca829b2a1816e1104b241a14e1b409a3c76c4b 100644
|
| --- a/chrome/common/pepper_permission_util_unittest.cc
|
| +++ b/chrome/common/pepper_permission_util_unittest.cc
|
| @@ -115,15 +115,19 @@ TEST(PepperPermissionUtilTest, SharedModuleWhitelisting) {
|
| extensions.Insert(shared_module);
|
| EXPECT_TRUE(IsExtensionOrSharedModuleWhitelisted(
|
| GURL(extension_url), &extensions, whitelist));
|
| - scoped_refptr<Extension> bad_ext =
|
| + scoped_refptr<Extension> not_in_sm_whitelist =
|
| CreateExtensionImportingModule(shared_module->id(), bad_id);
|
| - std::string bad_extension_url = std::string("chrome-extension://") +
|
| - bad_ext->id() + std::string("/foo.html");
|
| -
|
| - extensions.Insert(bad_ext);
|
| - // This should fail because bad_ext is not whitelisted to use shared_module.
|
| - EXPECT_FALSE(IsExtensionOrSharedModuleWhitelisted(
|
| - GURL(bad_extension_url), &extensions, whitelist));
|
| + std::string not_in_sm_whitelist_url = std::string("chrome-extension://") +
|
| + not_in_sm_whitelist->id() +
|
| + std::string("/foo.html");
|
| +
|
| + extensions.Insert(not_in_sm_whitelist);
|
| + // This should succeed, even though |not_in_sm_whitelist| is not whitelisted
|
| + // to use shared_module, because the pepper permission utility does not care
|
| + // about that whitelist. It is possible to install against the whitelist as
|
| + // an unpacked extension.
|
| + EXPECT_TRUE(IsExtensionOrSharedModuleWhitelisted(
|
| + GURL(not_in_sm_whitelist_url), &extensions, whitelist));
|
|
|
| // Note that the whitelist should be empty after this call, so tests checking
|
| // for failure to import will fail because of this.
|
|
|