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

Unified Diff: chrome/browser/importer/safari_importer_unittest.mm

Issue 7056011: Replace all usage of FileAutoDeleter with ScopedTempDir. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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
Index: chrome/browser/importer/safari_importer_unittest.mm
===================================================================
--- chrome/browser/importer/safari_importer_unittest.mm (revision 86426)
+++ chrome/browser/importer/safari_importer_unittest.mm (working copy)
@@ -9,12 +9,12 @@
#include "base/file_path.h"
#include "base/file_util.h"
#include "base/path_service.h"
+#include "base/scoped_temp_dir.h"
#include "base/sys_string_conversions.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/history/history_types.h"
#include "chrome/browser/importer/importer_bridge.h"
#include "chrome/common/chrome_paths.h"
-#include "chrome/test/file_test_utils.h"
#include "testing/platform_test.h"
// In order to test the Safari import functionality effectively, we store a
@@ -157,8 +157,7 @@
EXPECT_EQ(items & importer::HOME_PAGE, importer::NONE);
// Check that we don't import anything from a bogus library directory.
- FilePath fake_library_dir;
- file_util::CreateNewTempDirectory("FakeSafariLibrary", &fake_library_dir);
- FileAutoDeleter deleter(fake_library_dir);
- EXPECT_FALSE(SafariImporter::CanImport(fake_library_dir, &items));
+ ScopedTempDir fake_library_dir;
+ ASSERT_TRUE(fake_library_dir.CreateUniqueTempDir());
+ EXPECT_FALSE(SafariImporter::CanImport(fake_library_dir.path(), &items));
}

Powered by Google App Engine
This is Rietveld 408576698