diff options
author | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-29 18:45:56 +0000 |
---|---|---|
committer | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-29 18:45:56 +0000 |
commit | b8fb303f7d06e12ec26d68330873400d53e91b47 (patch) | |
tree | ea9528c2eeddc71ddefeb75f1906593521cf0dfc /chrome/common/extensions/extension_unittest.cc | |
parent | 6da72f588fd7ff3c89b637930c09bb7bf1c15db4 (diff) | |
download | chromium_src-b8fb303f7d06e12ec26d68330873400d53e91b47.zip chromium_src-b8fb303f7d06e12ec26d68330873400d53e91b47.tar.gz chromium_src-b8fb303f7d06e12ec26d68330873400d53e91b47.tar.bz2 |
Allow extensions with NPAPI plugins to install on ChromeOS, just don't allow the plugin to run.
BUG=80619
TEST=unit tests
Review URL: http://codereview.chromium.org/6904105
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83560 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions/extension_unittest.cc')
-rw-r--r-- | chrome/common/extensions/extension_unittest.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/chrome/common/extensions/extension_unittest.cc b/chrome/common/extensions/extension_unittest.cc index b7a8041..ecae857 100644 --- a/chrome/common/extensions/extension_unittest.cc +++ b/chrome/common/extensions/extension_unittest.cc @@ -1215,6 +1215,21 @@ TEST(ExtensionTest, GetHostPermissionMessages_ManyHosts) { UTF16ToUTF8(warnings[0])); } +TEST(ExtensionTest, GetPermissionMessages_Plugins) { + scoped_refptr<Extension> extension; + extension = LoadManifest("permissions", "plugins.json"); + std::vector<string16> warnings = extension->GetPermissionMessageStrings(); + // We don't parse the plugins key on Chrome OS, so it should not ask for any + // permissions. +#if defined(OS_CHROMEOS) + ASSERT_EQ(0u, warnings.size()); +#else + ASSERT_EQ(1u, warnings.size()); + EXPECT_EQ("All data on your computer and the websites you visit", + UTF16ToUTF8(warnings[0])); +#endif +} + TEST(ExtensionTest, WantsFileAccess) { scoped_refptr<Extension> extension; GURL file_url("file:///etc/passwd"); |