diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-26 06:16:12 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-26 06:16:12 +0000 |
commit | 6ef635e4882c4f7af0e17bc525e5922d6d7f82f0 (patch) | |
tree | f6676862802e279b41eb66663b6c39874f9f6705 /chrome/browser/extensions/extensions_service_unittest.cc | |
parent | 9ceb0734baeac21d1560023475f381b8a21e6cfa (diff) | |
download | chromium_src-6ef635e4882c4f7af0e17bc525e5922d6d7f82f0.zip chromium_src-6ef635e4882c4f7af0e17bc525e5922d6d7f82f0.tar.gz chromium_src-6ef635e4882c4f7af0e17bc525e5922d6d7f82f0.tar.bz2 |
Try again to commit r21622: Add infobar preview for themes,
remove --enable-extension requirement.
Review URL: http://codereview.chromium.org/159390
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21626 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extensions_service_unittest.cc')
-rw-r--r-- | chrome/browser/extensions/extensions_service_unittest.cc | 35 |
1 files changed, 4 insertions, 31 deletions
diff --git a/chrome/browser/extensions/extensions_service_unittest.cc b/chrome/browser/extensions/extensions_service_unittest.cc index 99e43ea..f997894 100644 --- a/chrome/browser/extensions/extensions_service_unittest.cc +++ b/chrome/browser/extensions/extensions_service_unittest.cc @@ -342,15 +342,8 @@ class ExtensionsServiceTest void InstallExtension(const FilePath& path, bool should_succeed) { - InstallExtension(path, should_succeed, GURL(), GURL()); - } - - void InstallExtension(const FilePath& path, - bool should_succeed, - const GURL& download_url, - const GURL& referrer_url) { ASSERT_TRUE(file_util::PathExists(path)); - service_->InstallExtension(path, download_url, referrer_url); + service_->InstallExtension(path); loop_.RunAllPending(); std::vector<std::string> errors = GetErrors(); if (should_succeed) { @@ -803,35 +796,15 @@ TEST_F(ExtensionsServiceTest, InstallTheme) { ValidatePref(theme_crx, L"state", Extension::ENABLED); ValidatePref(theme_crx, L"location", Extension::INTERNAL); - // A theme when extensions are disabled. Themes cannot be installed when - // extensions are disabled... - SetExtensionsEnabled(false); - path = extensions_path.AppendASCII("theme2.crx"); - InstallExtension(path, false); - ValidatePrefKeyCount(pref_count); - - // ... unless they come from the gallery URL. + // A theme when extensions are disabled. Themes can be installed, even when + // extensions are disabled. SetExtensionsEnabled(false); path = extensions_path.AppendASCII("theme2.crx"); - InstallExtension(path, true, - GURL(std::string(ExtensionsService::kGalleryDownloadURLPrefix) + "f.crx"), - GURL(std::string(ExtensionsService::kGalleryURLPrefix) + "foobar")); + InstallExtension(path, true); ValidatePrefKeyCount(++pref_count); ValidatePref(theme2_crx, L"state", Extension::ENABLED); ValidatePref(theme2_crx, L"location", Extension::INTERNAL); - // also test this fails if either of the URLs is not correct - path = extensions_path.AppendASCII("theme2.crx"); - InstallExtension(path, false, - GURL(std::string(ExtensionsService::kGalleryDownloadURLPrefix) + "f.crx"), - GURL()); - ValidatePrefKeyCount(pref_count); - - path = extensions_path.AppendASCII("theme2.crx"); - InstallExtension(path, false, - GURL(), GURL(std::string(ExtensionsService::kGalleryURLPrefix) + "foobar")); - ValidatePrefKeyCount(pref_count); - // A theme with extension elements. Themes cannot have extension elements so // this test should fail. SetExtensionsEnabled(true); |