summaryrefslogtreecommitdiffstats
path: root/chrome/browser/importer
diff options
context:
space:
mode:
authormunjal@chromium.org <munjal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-29 21:08:14 +0000
committermunjal@chromium.org <munjal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-29 21:08:14 +0000
commitf1a8760cc11a49cf1aca88c76712bc2d55a8f5ac (patch)
tree255902f572beac669f3efa7ffc86a6ea82b0e4d3 /chrome/browser/importer
parent6af916aa551e6d6ce44404ab8775da015bb6d533 (diff)
downloadchromium_src-f1a8760cc11a49cf1aca88c76712bc2d55a8f5ac.zip
chromium_src-f1a8760cc11a49cf1aca88c76712bc2d55a8f5ac.tar.gz
chromium_src-f1a8760cc11a49cf1aca88c76712bc2d55a8f5ac.tar.bz2
Clean-up temporary files/folders in firefox importer tests.
Review URL: http://codereview.chromium.org/115930 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17238 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/importer')
-rw-r--r--chrome/browser/importer/firefox_importer_unittest.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/browser/importer/firefox_importer_unittest.cc b/chrome/browser/importer/firefox_importer_unittest.cc
index d753ecb0..e836a5a 100644
--- a/chrome/browser/importer/firefox_importer_unittest.cc
+++ b/chrome/browser/importer/firefox_importer_unittest.cc
@@ -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 @@ TEST(FirefoxImporterTest, ProfileLock) {
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 @@ TEST(FirefoxImporterTest, ProfileLockOrphaned) {
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, ProfileLockOrphaned) {
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());