| Index: chrome/browser/password_manager/login_database_unittest.cc
|
| diff --git a/chrome/browser/password_manager/login_database_unittest.cc b/chrome/browser/password_manager/login_database_unittest.cc
|
| index c879f0aae7ffa7208c458cb0ffa542d28456e867..9a288d686a6ac1a1b0aaa9be3978223777e2cfd4 100644
|
| --- a/chrome/browser/password_manager/login_database_unittest.cc
|
| +++ b/chrome/browser/password_manager/login_database_unittest.cc
|
| @@ -7,6 +7,7 @@
|
| #include "base/basictypes.h"
|
| #include "base/file_util.h"
|
| #include "base/path_service.h"
|
| +#include "base/scoped_temp_dir.h"
|
| #include "base/string_number_conversions.h"
|
| #include "base/time.h"
|
| #include "base/utf_string_conversions.h"
|
| @@ -19,19 +20,12 @@ using webkit::forms::PasswordForm;
|
| class LoginDatabaseTest : public testing::Test {
|
| protected:
|
| virtual void SetUp() {
|
| - PathService::Get(chrome::DIR_TEST_DATA, &file_);
|
| - const std::string test_db =
|
| - "TestMetadataStoreMacDatabase" +
|
| - base::Int64ToString(base::Time::Now().ToInternalValue()) + ".db";
|
| - file_ = file_.AppendASCII(test_db);
|
| - file_util::Delete(file_, false);
|
| - }
|
| -
|
| - virtual void TearDown() {
|
| - file_util::Delete(file_, false);
|
| + ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
|
| + file_ = temp_dir_.path().AppendASCII("TestMetadataStoreMacDatabase");
|
| }
|
|
|
| FilePath file_;
|
| + ScopedTempDir temp_dir_;
|
| };
|
|
|
| TEST_F(LoginDatabaseTest, Logins) {
|
|
|