diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-24 05:23:11 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-24 05:23:11 +0000 |
commit | 2ff00409b547090d8daf14f92374b272df561c83 (patch) | |
tree | 2b8b9a024e5bd04b504e557c8d29979ecc4ac8ad /chrome/browser | |
parent | 0faa0aa739c7d05c2b8b9a0274e9a1b11cd161a0 (diff) | |
download | chromium_src-2ff00409b547090d8daf14f92374b272df561c83.zip chromium_src-2ff00409b547090d8daf14f92374b272df561c83.tar.gz chromium_src-2ff00409b547090d8daf14f92374b272df561c83.tar.bz2 |
The Firefox3XImporter test was incorrectly deleting a ref counted object causing an ASSERT to fire
resulting in this test to randomly fail on the Vista dbg builder.
Fix is to get rid of the delete and wrap the allocated Firefox3Observer object in a scoped_refptr.
This fixes http://code.google.com/p/chromium/issues/detail?id=22884
Bug=22884
Review URL: http://codereview.chromium.org/231012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27045 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/importer/importer_unittest.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/chrome/browser/importer/importer_unittest.cc b/chrome/browser/importer/importer_unittest.cc index d268ba6..bd5e2697 100644 --- a/chrome/browser/importer/importer_unittest.cc +++ b/chrome/browser/importer/importer_unittest.cc @@ -71,7 +71,6 @@ class ImporterTest : public testing::Test { file_util::AppendToPath(&data_path, L"firefox3_searchplugins"); if (!file_util::PathExists(data_path)) { // TODO(maruel): Create search test data that we can open source! - delete observer; LOG(ERROR) << L"Missing internal test data"; return; } @@ -838,14 +837,16 @@ class Firefox3Observer : public ProfileWriter, }; // This test is disabled, see bug 22884 -TEST_F(ImporterTest, DISABLED_Firefox30Importer) { - Firefox3Observer* observer = new Firefox3Observer(); - Firefox3xImporterTest(L"firefox3_profile", observer, observer, true); +TEST_F(ImporterTest, Firefox30Importer) { + scoped_refptr<Firefox3Observer> observer = new Firefox3Observer(); + Firefox3xImporterTest(L"firefox3_profile", observer.get(), observer.get(), + true); } TEST_F(ImporterTest, Firefox35Importer) { bool import_search_engines = false; - Firefox3Observer* observer = new Firefox3Observer(import_search_engines); - Firefox3xImporterTest(L"firefox35_profile", observer, observer, + scoped_refptr<Firefox3Observer> observer = + new Firefox3Observer(import_search_engines); + Firefox3xImporterTest(L"firefox35_profile", observer.get(), observer.get(), import_search_engines); } |