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

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

Issue 115930: Clean-up temporary files/folders in firefox importer tests. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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
« no previous file with comments | « no previous file | chrome/chrome.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/importer/firefox_importer_unittest.cc
===================================================================
--- chrome/browser/importer/firefox_importer_unittest.cc (revision 16874)
+++ chrome/browser/importer/firefox_importer_unittest.cc (working copy)
@@ -11,6 +11,7 @@
#include "chrome/browser/importer/firefox_importer_utils.h"
#include "chrome/browser/importer/firefox_profile_lock.h"
#include "chrome/common/chrome_paths.h"
+#include "chrome/test/file_test_utils.h"
using base::Time;
@@ -148,6 +149,7 @@
std::wstring test_path;
file_util::CreateNewTempDirectory(L"firefox_profile", &test_path);
FilePath lock_file_path = FilePath::FromWStringHack(test_path);
+ FileAutoDeleter deleter(lock_file_path);
lock_file_path = lock_file_path.Append(FirefoxProfileLock::kLockFileName);
scoped_ptr<FirefoxProfileLock> lock;
@@ -175,6 +177,7 @@
std::wstring test_path;
file_util::CreateNewTempDirectory(L"firefox_profile", &test_path);
FilePath lock_file_path = FilePath::FromWStringHack(test_path);
+ FileAutoDeleter deleter(lock_file_path);
lock_file_path = lock_file_path.Append(FirefoxProfileLock::kLockFileName);
// Create the orphaned lock file.
@@ -195,6 +198,7 @@
TEST(FirefoxImporterTest, ProfileLockContention) {
std::wstring test_path;
file_util::CreateNewTempDirectory(L"firefox_profile", &test_path);
+ FileAutoDeleter deleter(FilePath::FromWStringHack(test_path));
scoped_ptr<FirefoxProfileLock> lock1;
EXPECT_EQ(static_cast<FirefoxProfileLock*>(NULL), lock1.get());
« no previous file with comments | « no previous file | chrome/chrome.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698