Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(663)

Unified Diff: chrome/browser/importer/importer_unittest.cc

Issue 231012: The Firefox3XImporter test was incorrectly deleting a ref counted object caus... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/importer/importer_unittest.cc
===================================================================
--- chrome/browser/importer/importer_unittest.cc (revision 27039)
+++ chrome/browser/importer/importer_unittest.cc (working copy)
@@ -71,7 +71,6 @@
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 @@
};
// 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);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698