diff options
Diffstat (limited to 'chrome/common/extensions/extension_unittest.cc')
-rw-r--r-- | chrome/common/extensions/extension_unittest.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/chrome/common/extensions/extension_unittest.cc b/chrome/common/extensions/extension_unittest.cc index 9ad2a60..79cad1a 100644 --- a/chrome/common/extensions/extension_unittest.cc +++ b/chrome/common/extensions/extension_unittest.cc @@ -635,6 +635,19 @@ TEST(ExtensionTest, WantsFileAccess) { file_url, &extension->content_scripts()[0], NULL)); } +TEST(ExtensionTest, ExtraFlags) { + scoped_refptr<Extension> extension; + extension = LoadManifest("app", "manifest.json", Extension::FROM_WEBSTORE); + EXPECT_TRUE(extension->from_webstore()); + + extension = LoadManifest("app", "manifest.json", Extension::FROM_BOOKMARK); + EXPECT_TRUE(extension->from_bookmark()); + + extension = LoadManifest("app", "manifest.json", Extension::NO_FLAGS); + EXPECT_FALSE(extension->from_bookmark()); + EXPECT_FALSE(extension->from_webstore()); +} + // Base class for testing the CanExecuteScriptOnPage and CanCaptureVisiblePage // methods of Extension for extensions with various permissions. class ExtensionScriptAndCaptureVisibleTest : public testing::Test { |