diff options
author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-21 19:40:08 +0000 |
---|---|---|
committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-21 19:40:08 +0000 |
commit | 7fa19f8c525235f3318359b4e6f647e1dfd18f46 (patch) | |
tree | 83b8148a77823c65c8f74aba0a079bc4b1e94bd1 /chrome/browser/sync/glue/extension_util_unittest.cc | |
parent | 0ff0ff32b0b9f301200cb4e595fef541118a2987 (diff) | |
download | chromium_src-7fa19f8c525235f3318359b4e6f647e1dfd18f46.zip chromium_src-7fa19f8c525235f3318359b4e6f647e1dfd18f46.tar.gz chromium_src-7fa19f8c525235f3318359b4e6f647e1dfd18f46.tar.bz2 |
Coalesced various extension type enums into Extension::Type.
Renamed Extension::HistogramType to Extension::Type and used it
everywhere.
Moved extension sync security checks into sync land and simplified them.
BUG=55823
TEST=Existing unit tests / sync integration tests
Review URL: http://codereview.chromium.org/5946001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69855 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/glue/extension_util_unittest.cc')
-rw-r--r-- | chrome/browser/sync/glue/extension_util_unittest.cc | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/chrome/browser/sync/glue/extension_util_unittest.cc b/chrome/browser/sync/glue/extension_util_unittest.cc index 1a375ff..946ca5a 100644 --- a/chrome/browser/sync/glue/extension_util_unittest.cc +++ b/chrome/browser/sync/glue/extension_util_unittest.cc @@ -83,45 +83,6 @@ scoped_refptr<Extension> MakeExtension( return extension; } -TEST_F(ExtensionUtilTest, GetExtensionType) { - { - FilePath file_path(kExtensionFilePath); - scoped_refptr<Extension> extension( - MakeExtension(false, GURL(), GURL(), false, - Extension::INTERNAL, 0, file_path)); - EXPECT_EQ(EXTENSION, GetExtensionType(*extension)); - } - { - FilePath file_path(kExtensionFilePath); - scoped_refptr<Extension> extension( - MakeExtension(true, GURL(), GURL(), false, - Extension::INTERNAL, 0, file_path)); - EXPECT_EQ(THEME, GetExtensionType(*extension)); - } - { - FilePath file_path(kExtensionFilePath); - scoped_refptr<Extension> extension( - MakeExtension(false, GURL(), GURL(), true, - Extension::INTERNAL, 0, file_path)); - EXPECT_EQ(LOCAL_USER_SCRIPT, GetExtensionType(*extension)); - } - { - FilePath file_path(kExtensionFilePath); - scoped_refptr<Extension> extension( - MakeExtension(false, GURL("http://www.google.com"), GURL(), true, - Extension::INTERNAL, 0, file_path)); - EXPECT_EQ(UPDATEABLE_USER_SCRIPT, GetExtensionType(*extension)); - } - { - FilePath file_path(kExtensionFilePath); - scoped_refptr<Extension> extension( - MakeExtension(false, GURL(), - GURL("http://www.google.com"), false, - Extension::INTERNAL, 0, file_path)); - EXPECT_EQ(APP, GetExtensionType(*extension)); - } -} - TEST_F(ExtensionUtilTest, IsExtensionValid) { { FilePath file_path(kExtensionFilePath); @@ -190,46 +151,6 @@ TEST_F(ExtensionUtilTest, IsExtensionValid) { } } -TEST_F(ExtensionUtilTest, IsExtensionValidAndSyncable) { - ExtensionTypeSet allowed_extension_types; - allowed_extension_types.insert(EXTENSION); - allowed_extension_types.insert(APP); - { - FilePath file_path(kExtensionFilePath); - scoped_refptr<Extension> extension( - MakeExtension(false, GURL(), GURL(), false, - Extension::INTERNAL, 0, file_path)); - EXPECT_TRUE(IsExtensionValidAndSyncable( - *extension, allowed_extension_types)); - } - { - FilePath file_path(kExtensionFilePath); - scoped_refptr<Extension> extension( - MakeExtension(false, GURL(), - GURL("http://www.google.com"), false, - Extension::INTERNAL, 0, file_path)); - EXPECT_TRUE(IsExtensionValidAndSyncable( - *extension, allowed_extension_types)); - } - { - FilePath file_path(kExtensionFilePath); - scoped_refptr<Extension> extension( - MakeExtension(false, GURL(), GURL(), true, - Extension::INTERNAL, 0, file_path)); - EXPECT_FALSE(IsExtensionValidAndSyncable( - *extension, allowed_extension_types)); - } - { - FilePath file_path(kExtensionFilePath); - scoped_refptr<Extension> extension( - MakeExtension(false, GURL(), GURL(), false, - Extension::EXTERNAL_PREF, 0, file_path)); - EXPECT_FALSE(IsExtensionValidAndSyncable( - *extension, allowed_extension_types)); - } -} - - TEST_F(ExtensionUtilTest, IsExtensionSpecificsUnset) { { sync_pb::ExtensionSpecifics specifics; |