diff options
author | gbillock@chromium.org <gbillock@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-26 18:23:05 +0000 |
---|---|---|
committer | gbillock@chromium.org <gbillock@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-26 18:23:05 +0000 |
commit | e805baf32a66a7e73a9d3cb1512683c29af244b4 (patch) | |
tree | bc75cbc1b998b56545e32c44a4b118db8b6a7e50 /chrome/common/extensions/extension_unittest.cc | |
parent | 3243501e8b51236df8e9b010c84d7a093eabe7ad (diff) | |
download | chromium_src-e805baf32a66a7e73a9d3cb1512683c29af244b4.zip chromium_src-e805baf32a66a7e73a9d3cb1512683c29af244b4.tar.gz chromium_src-e805baf32a66a7e73a9d3cb1512683c29af244b4.tar.bz2 |
Add ability to create extension/app for a bookmark-app drop.
R=estade@chromium.org
BUG=none
TEST=WebAppInfo.Bookmark,ExtensionTest.ExtraFlags,ExtensionPrefsFlags
Review URL: http://codereview.chromium.org/7410004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94127 0039d316-1c4b-4281-b951-d872f2087c98
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 { |