summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorasargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-10 22:42:10 +0000
committerasargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-10 22:42:10 +0000
commite041296f30fd16e3fd5c749bbc0975b1aae6a4d8 (patch)
tree0c7d677a992757d8ceb6389b8b231a6c1a7522e3 /chrome/browser
parente9abf8daab0dd491ba7b03abc2ce3eee39105e0a (diff)
downloadchromium_src-e041296f30fd16e3fd5c749bbc0975b1aae6a4d8.zip
chromium_src-e041296f30fd16e3fd5c749bbc0975b1aae6a4d8.tar.gz
chromium_src-e041296f30fd16e3fd5c749bbc0975b1aae6a4d8.tar.bz2
Fix leaks in ExtensionUpdater unit tests
BUG=http://crbug.com/16444 TEST=none Review URL: http://codereview.chromium.org/149479 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20430 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/extensions/extension_updater.cc3
-rw-r--r--chrome/browser/extensions/extension_updater_unittest.cc11
2 files changed, 8 insertions, 6 deletions
diff --git a/chrome/browser/extensions/extension_updater.cc b/chrome/browser/extensions/extension_updater.cc
index c14281c..770f9c6 100644
--- a/chrome/browser/extensions/extension_updater.cc
+++ b/chrome/browser/extensions/extension_updater.cc
@@ -466,7 +466,8 @@ bool ExtensionUpdater::Parse(const std::string& manifest_xml,
return false;
}
}
- tmp_results.release(results);
+ results->insert(results->end(), tmp_results.begin(), tmp_results.end());
+ tmp_results.get().clear();
return true;
}
diff --git a/chrome/browser/extensions/extension_updater_unittest.cc b/chrome/browser/extensions/extension_updater_unittest.cc
index ab59a4d..05686d4 100644
--- a/chrome/browser/extensions/extension_updater_unittest.cc
+++ b/chrome/browser/extensions/extension_updater_unittest.cc
@@ -269,6 +269,7 @@ class ExtensionUpdaterTest : public testing::Test {
EXPECT_EQ(1u, updateable.size());
EXPECT_EQ(0, updateable[0]);
STLDeleteElements(&updates);
+ STLDeleteElements(&tmp);
}
static void TestMultipleManifestDownloading() {
@@ -414,23 +415,23 @@ class ExtensionUpdaterTest : public testing::Test {
// actual test code to live in ExtenionUpdaterTest methods instead of TEST_F
// subclasses where friendship with ExtenionUpdater is not inherited.
-TEST(ExtensionUpdaterTest, DISABLED_TestXmlParsing) {
+TEST(ExtensionUpdaterTest, TestXmlParsing) {
ExtensionUpdaterTest::TestXmlParsing();
}
-TEST(ExtensionUpdaterTest, DISABLED_TestDetermineUpdates) {
+TEST(ExtensionUpdaterTest, TestDetermineUpdates) {
ExtensionUpdaterTest::TestDetermineUpdates();
}
-TEST(ExtensionUpdaterTest, DISABLED_TestMultipleManifestDownloading) {
+TEST(ExtensionUpdaterTest, TestMultipleManifestDownloading) {
ExtensionUpdaterTest::TestMultipleManifestDownloading();
}
-TEST(ExtensionUpdaterTest, DISABLED_TestSingleExtensionDownloading) {
+TEST(ExtensionUpdaterTest, TestSingleExtensionDownloading) {
ExtensionUpdaterTest::TestSingleExtensionDownloading();
}
-TEST(ExtensionUpdaterTest, DISABLED_TestMultipleExtensionDownloading) {
+TEST(ExtensionUpdaterTest, TestMultipleExtensionDownloading) {
ExtensionUpdaterTest::TestMultipleExtensionDownloading();
}