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

Unified Diff: webkit/browser/fileapi/sandbox_origin_database_unittest.cc

Issue 100573002: Move directory creation functions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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
Index: webkit/browser/fileapi/sandbox_origin_database_unittest.cc
diff --git a/webkit/browser/fileapi/sandbox_origin_database_unittest.cc b/webkit/browser/fileapi/sandbox_origin_database_unittest.cc
index 87c5e23c1511e23a3089c583c36e98e6615cadc6..340baf22409de108b251615cd16111e5f11a974a 100644
--- a/webkit/browser/fileapi/sandbox_origin_database_unittest.cc
+++ b/webkit/browser/fileapi/sandbox_origin_database_unittest.cc
@@ -34,7 +34,7 @@ TEST(SandboxOriginDatabaseTest, BasicTest) {
ASSERT_TRUE(dir.CreateUniqueTempDir());
const base::FilePath kFSDir = dir.path().Append(kFileSystemDirName);
EXPECT_FALSE(base::PathExists(kFSDir));
- EXPECT_TRUE(file_util::CreateDirectory(kFSDir));
+ EXPECT_TRUE(base::CreateDirectory(kFSDir));
SandboxOriginDatabase database(kFSDir);
std::string origin("origin");
@@ -64,7 +64,7 @@ TEST(SandboxOriginDatabaseTest, TwoPathTest) {
ASSERT_TRUE(dir.CreateUniqueTempDir());
const base::FilePath kFSDir = dir.path().Append(kFileSystemDirName);
EXPECT_FALSE(base::PathExists(kFSDir));
- EXPECT_TRUE(file_util::CreateDirectory(kFSDir));
+ EXPECT_TRUE(base::CreateDirectory(kFSDir));
SandboxOriginDatabase database(kFSDir);
std::string origin0("origin0");
@@ -92,7 +92,7 @@ TEST(SandboxOriginDatabaseTest, DropDatabaseTest) {
ASSERT_TRUE(dir.CreateUniqueTempDir());
const base::FilePath kFSDir = dir.path().Append(kFileSystemDirName);
EXPECT_FALSE(base::PathExists(kFSDir));
- EXPECT_TRUE(file_util::CreateDirectory(kFSDir));
+ EXPECT_TRUE(base::CreateDirectory(kFSDir));
SandboxOriginDatabase database(kFSDir);
std::string origin("origin");
@@ -120,7 +120,7 @@ TEST(SandboxOriginDatabaseTest, DeleteOriginTest) {
ASSERT_TRUE(dir.CreateUniqueTempDir());
const base::FilePath kFSDir = dir.path().Append(kFileSystemDirName);
EXPECT_FALSE(base::PathExists(kFSDir));
- EXPECT_TRUE(file_util::CreateDirectory(kFSDir));
+ EXPECT_TRUE(base::CreateDirectory(kFSDir));
SandboxOriginDatabase database(kFSDir);
std::string origin("origin");
@@ -147,7 +147,7 @@ TEST(SandboxOriginDatabaseTest, ListOriginsTest) {
ASSERT_TRUE(dir.CreateUniqueTempDir());
const base::FilePath kFSDir = dir.path().Append(kFileSystemDirName);
EXPECT_FALSE(base::PathExists(kFSDir));
- EXPECT_TRUE(file_util::CreateDirectory(kFSDir));
+ EXPECT_TRUE(base::CreateDirectory(kFSDir));
std::vector<SandboxOriginDatabase::OriginRecord> origins;
@@ -197,7 +197,7 @@ TEST(SandboxOriginDatabaseTest, DatabaseRecoveryTest) {
const base::FilePath kFSDir = dir.path().Append(kFileSystemDirName);
const base::FilePath kDBDir = kFSDir.Append(kOriginDatabaseName);
EXPECT_FALSE(base::PathExists(kFSDir));
- EXPECT_TRUE(file_util::CreateDirectory(kFSDir));
+ EXPECT_TRUE(base::CreateDirectory(kFSDir));
const std::string kOrigins[] = {
"foo.example.com",
@@ -217,13 +217,13 @@ TEST(SandboxOriginDatabaseTest, DatabaseRecoveryTest) {
EXPECT_TRUE(database->GetPathForOrigin(kOrigins[i], &path));
if (i != 1)
- EXPECT_TRUE(file_util::CreateDirectory(kFSDir.Append(path)));
+ EXPECT_TRUE(base::CreateDirectory(kFSDir.Append(path)));
}
database.reset();
const base::FilePath kGarbageDir = kFSDir.AppendASCII("foo");
const base::FilePath kGarbageFile = kGarbageDir.AppendASCII("bar");
- EXPECT_TRUE(file_util::CreateDirectory(kGarbageDir));
+ EXPECT_TRUE(base::CreateDirectory(kGarbageDir));
bool created = false;
base::PlatformFileError error;
base::PlatformFile file = base::CreatePlatformFile(
@@ -277,7 +277,7 @@ TEST(SandboxOriginDatabaseTest, DatabaseRecoveryForMissingDBFileTest) {
const base::FilePath kFSDir = dir.path().Append(kFileSystemDirName);
const base::FilePath kDBDir = kFSDir.Append(kOriginDatabaseName);
EXPECT_FALSE(base::PathExists(kFSDir));
- EXPECT_TRUE(file_util::CreateDirectory(kFSDir));
+ EXPECT_TRUE(base::CreateDirectory(kFSDir));
const std::string kOrigin = "foo.example.com";
base::FilePath path;
@@ -288,7 +288,7 @@ TEST(SandboxOriginDatabaseTest, DatabaseRecoveryForMissingDBFileTest) {
EXPECT_TRUE(database->GetPathForOrigin(kOrigin, &path));
EXPECT_FALSE(path.empty());
EXPECT_TRUE(database->GetPathForOrigin(kOrigin, &path));
- EXPECT_TRUE(file_util::CreateDirectory(kFSDir.Append(path)));
+ EXPECT_TRUE(base::CreateDirectory(kFSDir.Append(path)));
database.reset();
DeleteDatabaseFile(kDBDir, kLevelDBFileTypes[i]);

Powered by Google App Engine
This is Rietveld 408576698