| Index: chrome/browser/webdata/autofill_table_unittest.cc
|
| diff --git a/chrome/browser/webdata/autofill_table_unittest.cc b/chrome/browser/webdata/autofill_table_unittest.cc
|
| index 337da0bc0dd8719c3c4113c8182c106fbe85962a..bdff3c5aea15ffef08ac45645c11163c3eb9be3f 100644
|
| --- a/chrome/browser/webdata/autofill_table_unittest.cc
|
| +++ b/chrome/browser/webdata/autofill_table_unittest.cc
|
| @@ -6,6 +6,7 @@
|
|
|
| #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"
|
| @@ -97,16 +98,8 @@ class AutofillTableTest : public testing::Test {
|
| #if defined(OS_MACOSX)
|
| Encryptor::UseMockKeychain(true);
|
| #endif
|
| - PathService::Get(chrome::DIR_TEST_DATA, &file_);
|
| - const std::string test_db = "TestWebDatabase" +
|
| - base::Int64ToString(Time::Now().ToTimeT()) +
|
| - ".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("TestWebDatabase");
|
| }
|
|
|
| static AutofillEntry MakeAutofillEntry(const char* name,
|
| @@ -123,6 +116,7 @@ class AutofillTableTest : public testing::Test {
|
| }
|
|
|
| FilePath file_;
|
| + ScopedTempDir temp_dir_;
|
|
|
| private:
|
| DISALLOW_COPY_AND_ASSIGN(AutofillTableTest);
|
|
|