diff options
author | cira@chromium.org <cira@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-19 00:41:33 +0000 |
---|---|---|
committer | cira@chromium.org <cira@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-19 00:41:33 +0000 |
commit | 14c42626863dc927b1dd0048b27502e67fef6904 (patch) | |
tree | fe4bb05ced904d1b1e5aa38af6c45b0c158d5d4c | |
parent | 90c8ee331f42ce56e50a1e22af18de4882231a15 (diff) | |
download | chromium_src-14c42626863dc927b1dd0048b27502e67fef6904.zip chromium_src-14c42626863dc927b1dd0048b27502e67fef6904.tar.gz chromium_src-14c42626863dc927b1dd0048b27502e67fef6904.tar.bz2 |
Enabling (sandboxed) extension unpacker tests.
XP bots were failing on directory Delete. Removing ASSERT_TRUE for deletes solves the problem.
Review URL: http://codereview.chromium.org/408009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32451 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/extensions/sandboxed_extension_unpacker_unittest.cc | 10 | ||||
-rw-r--r-- | chrome/common/extensions/extension_unpacker_unittest.cc | 26 |
2 files changed, 16 insertions, 20 deletions
diff --git a/chrome/browser/extensions/sandboxed_extension_unpacker_unittest.cc b/chrome/browser/extensions/sandboxed_extension_unpacker_unittest.cc index 02bb01a..5613c9e 100644 --- a/chrome/browser/extensions/sandboxed_extension_unpacker_unittest.cc +++ b/chrome/browser/extensions/sandboxed_extension_unpacker_unittest.cc @@ -76,10 +76,8 @@ class SandboxedExtensionUnpackerTest : public testing::Test { ASSERT_TRUE(PathService::Get(base::DIR_TEMP, &install_dir_)); install_dir_ = install_dir_.AppendASCII("sandboxed_extension_unpacker_test"); - ASSERT_TRUE(file_util::Delete(install_dir_, true)) << - install_dir_.value(); - ASSERT_TRUE(file_util::CreateDirectory(install_dir_)) << - install_dir_.value(); + file_util::Delete(install_dir_, true); + file_util::CreateDirectory(install_dir_); FilePath crx_path = install_dir_.AppendASCII(crx_name); ASSERT_TRUE(file_util::CopyFile(original_path, crx_path)) << @@ -120,7 +118,7 @@ class SandboxedExtensionUnpackerTest : public testing::Test { scoped_refptr<SandboxedExtensionUnpacker> sandboxed_unpacker_; }; -TEST_F(SandboxedExtensionUnpackerTest, DISABLED_NoCatalogsSuccess) { +TEST_F(SandboxedExtensionUnpackerTest, NoCatalogsSuccess) { EXPECT_CALL(*client_, OnUnpackSuccess(_, _, _)); SetupUnpacker("no_l10n.crx"); @@ -138,7 +136,7 @@ TEST_F(SandboxedExtensionUnpackerTest, DISABLED_NoCatalogsSuccess) { EXPECT_FALSE(file_util::PathExists(install_path)); } -TEST_F(SandboxedExtensionUnpackerTest, DISABLED_WithCatalogsSuccess) { +TEST_F(SandboxedExtensionUnpackerTest, WithCatalogsSuccess) { EXPECT_CALL(*client_, OnUnpackSuccess(_, _, _)); SetupUnpacker("good_l10n.crx"); diff --git a/chrome/common/extensions/extension_unpacker_unittest.cc b/chrome/common/extensions/extension_unpacker_unittest.cc index 0b11851..fe3272e 100644 --- a/chrome/common/extensions/extension_unpacker_unittest.cc +++ b/chrome/common/extensions/extension_unpacker_unittest.cc @@ -29,10 +29,8 @@ public: // a temp folder to play in. ASSERT_TRUE(PathService::Get(base::DIR_TEMP, &install_dir_)); install_dir_ = install_dir_.AppendASCII("extension_unpacker_test"); - ASSERT_TRUE(file_util::Delete(install_dir_, true)) << - install_dir_.value(); - ASSERT_TRUE(file_util::CreateDirectory(install_dir_)) << - install_dir_.value(); + file_util::Delete(install_dir_, true); + file_util::CreateDirectory(install_dir_); FilePath crx_path = install_dir_.AppendASCII(crx_name); ASSERT_TRUE(file_util::CopyFile(original_path, crx_path)) << @@ -52,25 +50,25 @@ public: scoped_ptr<ExtensionUnpacker> unpacker_; }; -TEST_F(ExtensionUnpackerTest, DISABLED_EmptyDefaultLocale) { +TEST_F(ExtensionUnpackerTest, EmptyDefaultLocale) { SetupUnpacker("empty_default_locale.crx"); EXPECT_FALSE(unpacker_->Run()); EXPECT_EQ(errors::kInvalidDefaultLocale, unpacker_->error_message()); } -TEST_F(ExtensionUnpackerTest, DISABLED_HasDefaultLocaleMissingLocalesFolder) { +TEST_F(ExtensionUnpackerTest, HasDefaultLocaleMissingLocalesFolder) { SetupUnpacker("has_default_missing_locales.crx"); EXPECT_FALSE(unpacker_->Run()); EXPECT_EQ(errors::kLocalesTreeMissing, unpacker_->error_message()); } -TEST_F(ExtensionUnpackerTest, DISABLED_InvalidDefaultLocale) { +TEST_F(ExtensionUnpackerTest, InvalidDefaultLocale) { SetupUnpacker("invalid_default_locale.crx"); EXPECT_FALSE(unpacker_->Run()); EXPECT_EQ(errors::kInvalidDefaultLocale, unpacker_->error_message()); } -TEST_F(ExtensionUnpackerTest, DISABLED_InvalidMessagesFile) { +TEST_F(ExtensionUnpackerTest, InvalidMessagesFile) { SetupUnpacker("invalid_messages_file.crx"); EXPECT_FALSE(unpacker_->Run()); EXPECT_TRUE(MatchPattern(unpacker_->error_message(), @@ -78,20 +76,20 @@ TEST_F(ExtensionUnpackerTest, DISABLED_InvalidMessagesFile) { " Dictionary keys must be quoted."))); } -TEST_F(ExtensionUnpackerTest, DISABLED_MissingDefaultData) { +TEST_F(ExtensionUnpackerTest, MissingDefaultData) { SetupUnpacker("missing_default_data.crx"); EXPECT_FALSE(unpacker_->Run()); EXPECT_EQ(errors::kLocalesNoDefaultMessages, unpacker_->error_message()); } -TEST_F(ExtensionUnpackerTest, DISABLED_MissingDefaultLocaleHasLocalesFolder) { +TEST_F(ExtensionUnpackerTest, MissingDefaultLocaleHasLocalesFolder) { SetupUnpacker("missing_default_has_locales.crx"); EXPECT_FALSE(unpacker_->Run()); EXPECT_EQ(errors::kLocalesNoDefaultLocaleSpecified, unpacker_->error_message()); } -TEST_F(ExtensionUnpackerTest, DISABLED_MissingMessagesFile) { +TEST_F(ExtensionUnpackerTest, MissingMessagesFile) { SetupUnpacker("missing_messages_file.crx"); EXPECT_FALSE(unpacker_->Run()); EXPECT_TRUE(MatchPattern(unpacker_->error_message(), @@ -99,20 +97,20 @@ TEST_F(ExtensionUnpackerTest, DISABLED_MissingMessagesFile) { std::string("*_locales?en_US?messages.json"))); } -TEST_F(ExtensionUnpackerTest, DISABLED_NoLocaleData) { +TEST_F(ExtensionUnpackerTest, NoLocaleData) { SetupUnpacker("no_locale_data.crx"); EXPECT_FALSE(unpacker_->Run()); EXPECT_EQ(errors::kLocalesTreeMissing, unpacker_->error_message()); } -TEST_F(ExtensionUnpackerTest, DISABLED_GoodL10n) { +TEST_F(ExtensionUnpackerTest, GoodL10n) { SetupUnpacker("good_l10n.crx"); EXPECT_TRUE(unpacker_->Run()); EXPECT_TRUE(unpacker_->error_message().empty()); ASSERT_EQ(2U, unpacker_->parsed_catalogs()->GetSize()); } -TEST_F(ExtensionUnpackerTest, DISABLED_NoL10n) { +TEST_F(ExtensionUnpackerTest, NoL10n) { SetupUnpacker("no_l10n.crx"); EXPECT_TRUE(unpacker_->Run()); EXPECT_TRUE(unpacker_->error_message().empty()); |