| Index: webkit/fileapi/file_system_directory_database_unittest.cc
|
| diff --git a/webkit/fileapi/file_system_directory_database_unittest.cc b/webkit/fileapi/file_system_directory_database_unittest.cc
|
| index 3a47c91c8d0ca286439120e87466bca7cd35964e..2748b7728a6ecd89331e08dc9cd2b616cba0711c 100644
|
| --- a/webkit/fileapi/file_system_directory_database_unittest.cc
|
| +++ b/webkit/fileapi/file_system_directory_database_unittest.cc
|
| @@ -6,6 +6,7 @@
|
|
|
| #include <math.h>
|
|
|
| +#include "base/platform_file.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/scoped_temp_dir.h"
|
| #include "base/string_number_conversions.h"
|
| @@ -14,6 +15,10 @@
|
|
|
| namespace fileapi {
|
|
|
| +namespace {
|
| +const FilePath::CharType kDirectoryDatabaseName[] = FILE_PATH_LITERAL("Paths");
|
| +}
|
| +
|
| class FileSystemDirectoryDatabaseTest : public testing::Test {
|
| public:
|
| typedef FileSystemDirectoryDatabase::FileId FileId;
|
| @@ -29,9 +34,12 @@ class FileSystemDirectoryDatabaseTest : public testing::Test {
|
| }
|
|
|
| void InitDatabase() {
|
| + CloseDatabase();
|
| + db_.reset(new FileSystemDirectoryDatabase(sandbox_path()));
|
| + }
|
| +
|
| + void CloseDatabase() {
|
| db_.reset();
|
| - FilePath path = base_.path().AppendASCII("db");
|
| - db_.reset(new FileSystemDirectoryDatabase(path));
|
| }
|
|
|
| bool AddFileInfo(FileId parent_id, const FilePath::StringType& name) {
|
| @@ -42,6 +50,10 @@ class FileSystemDirectoryDatabaseTest : public testing::Test {
|
| return db_->AddFileInfo(info, &file_id);
|
| }
|
|
|
| + FilePath sandbox_path() const {
|
| + return base_.path();
|
| + }
|
| +
|
| protected:
|
| // Common temp base for nondestructive uses.
|
| ScopedTempDir base_;
|
|
|