diff options
author | DHNishi@gmail.com <DHNishi@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-31 07:49:16 +0000 |
---|---|---|
committer | DHNishi@gmail.com <DHNishi@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-31 07:49:16 +0000 |
commit | c21b5b613128267935e2d353d206832c856c8b10 (patch) | |
tree | 09d20258b08f23da6b22fd5689feec7412146d53 /chrome/browser/extensions/extension_service_unittest.cc | |
parent | c6ce08078b24a4ef2b0fd86c40001ad87b9c2b8c (diff) | |
download | chromium_src-c21b5b613128267935e2d353d206832c856c8b10.zip chromium_src-c21b5b613128267935e2d353d206832c856c8b10.tar.gz chromium_src-c21b5b613128267935e2d353d206832c856c8b10.tar.bz2 |
Fix a bug where packing an extension with bad private key causes crash.
BUG=263968
TEST=PackExtensionTest.ExtensionWithInvalidKey
Review URL: https://chromiumcodereview.appspot.com/20794003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214622 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_service_unittest.cc')
-rw-r--r-- | chrome/browser/extensions/extension_service_unittest.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/extensions/extension_service_unittest.cc b/chrome/browser/extensions/extension_service_unittest.cc index e8f452b..86dd4f1 100644 --- a/chrome/browser/extensions/extension_service_unittest.cc +++ b/chrome/browser/extensions/extension_service_unittest.cc @@ -2202,6 +2202,14 @@ TEST_F(ExtensionServiceTest, PackExtension) { creator.reset(new ExtensionCreator()); ASSERT_FALSE(creator->Run(temp_dir2.path(), crx_path, privkey_path, base::FilePath(), ExtensionCreator::kOverwriteCRX)); + + // Try packing with a private key that is a valid key, but invalid for the + // extension. + base::FilePath bad_private_key_dir = data_dir_.AppendASCII("bad_private_key"); + crx_path = output_directory.AppendASCII("bad_private_key.crx"); + privkey_path = data_dir_.AppendASCII("bad_private_key.pem"); + ASSERT_FALSE(creator->Run(bad_private_key_dir, crx_path, base::FilePath(), + privkey_path, ExtensionCreator::kOverwriteCRX)); } // Test Packaging and installing an extension whose name contains punctuation. |