| Index: webkit/fileapi/file_system_mount_point_provider_unittest.cc
|
| diff --git a/webkit/fileapi/file_system_mount_point_provider_unittest.cc b/webkit/fileapi/file_system_mount_point_provider_unittest.cc
|
| index c36aa9bf57bfb3a691a8b44e1e4dfdc47ae55a03..e3abb477faf7938aef8352f3bf2dd06749d245fd 100644
|
| --- a/webkit/fileapi/file_system_mount_point_provider_unittest.cc
|
| +++ b/webkit/fileapi/file_system_mount_point_provider_unittest.cc
|
| @@ -88,7 +88,7 @@ const struct RootPathFileURITest {
|
| };
|
|
|
| const struct CheckValidPathTest {
|
| - FilePath::StringType path;
|
| + base::FilePath::StringType path;
|
| bool expected_valid;
|
| } kCheckValidPathTestCases[] = {
|
| { FILE_PATH_LITERAL("//tmp/foo.txt"), false, },
|
| @@ -102,7 +102,7 @@ const struct CheckValidPathTest {
|
| };
|
|
|
| const struct IsRestrictedNameTest {
|
| - FilePath::StringType name;
|
| + base::FilePath::StringType name;
|
| bool expected_dangerous;
|
| } kIsRestrictedNameTestCases[] = {
|
| // Names that contain strings that used to be restricted, but are now allowed.
|
| @@ -193,9 +193,9 @@ const struct IsRestrictedNameTest {
|
| };
|
|
|
| // For External filesystem.
|
| -const FilePath::CharType kMountPoint[] = FILE_PATH_LITERAL("/tmp/testing");
|
| -const FilePath::CharType kRootPath[] = FILE_PATH_LITERAL("/tmp");
|
| -const FilePath::CharType kVirtualPath[] = FILE_PATH_LITERAL("testing");
|
| +const base::FilePath::CharType kMountPoint[] = FILE_PATH_LITERAL("/tmp/testing");
|
| +const base::FilePath::CharType kRootPath[] = FILE_PATH_LITERAL("/tmp");
|
| +const base::FilePath::CharType kVirtualPath[] = FILE_PATH_LITERAL("testing");
|
|
|
| } // namespace
|
|
|
| @@ -222,7 +222,7 @@ class FileSystemMountPointProviderTest : public testing::Test {
|
| data_dir_.path(),
|
| options);
|
| #if defined(OS_CHROMEOS)
|
| - FilePath mount_point_path = FilePath(kMountPoint);
|
| + base::FilePath mount_point_path = base::FilePath(kMountPoint);
|
| external_mount_points->RegisterFileSystem(
|
| mount_point_path.BaseName().AsUTF8Unsafe(),
|
| kFileSystemTypeNativeLocal,
|
| @@ -238,21 +238,21 @@ class FileSystemMountPointProviderTest : public testing::Test {
|
| bool GetRootPath(const GURL& origin_url,
|
| fileapi::FileSystemType type,
|
| bool create,
|
| - FilePath* root_path) {
|
| - FilePath virtual_path = FilePath();
|
| + base::FilePath* root_path) {
|
| + base::FilePath virtual_path = base::FilePath();
|
| if (type == kFileSystemTypeExternal)
|
| - virtual_path = FilePath(kVirtualPath);
|
| + virtual_path = base::FilePath(kVirtualPath);
|
| FileSystemURL url = file_system_context_->CreateCrackedFileSystemURL(
|
| origin_url, type, virtual_path);
|
| - FilePath returned_root_path =
|
| + base::FilePath returned_root_path =
|
| provider(type)->GetFileSystemRootPathOnFileThread(url, create);
|
| if (root_path)
|
| *root_path = returned_root_path;
|
| return !returned_root_path.empty();
|
| }
|
|
|
| - FilePath data_path() const { return data_dir_.path(); }
|
| - FilePath file_system_path() const {
|
| + base::FilePath data_path() const { return data_dir_.path(); }
|
| + base::FilePath file_system_path() const {
|
| return data_dir_.path().Append(
|
| SandboxMountPointProvider::kFileSystemDirectory);
|
| }
|
| @@ -272,7 +272,7 @@ class FileSystemMountPointProviderTest : public testing::Test {
|
| };
|
|
|
| TEST_F(FileSystemMountPointProviderTest, GetRootPathCreateAndExamine) {
|
| - std::vector<FilePath> returned_root_path(
|
| + std::vector<base::FilePath> returned_root_path(
|
| ARRAYSIZE_UNSAFE(kRootPathTestCases));
|
| SetupNewContext(CreateAllowFileAccessOptions());
|
|
|
| @@ -281,13 +281,13 @@ TEST_F(FileSystemMountPointProviderTest, GetRootPathCreateAndExamine) {
|
| SCOPED_TRACE(testing::Message() << "RootPath (create) #" << i << " "
|
| << kRootPathTestCases[i].expected_path);
|
|
|
| - FilePath root_path;
|
| + base::FilePath root_path;
|
| EXPECT_TRUE(GetRootPath(GURL(kRootPathTestCases[i].origin_url),
|
| kRootPathTestCases[i].type,
|
| true /* create */, &root_path));
|
|
|
| if (kRootPathTestCases[i].type != kFileSystemTypeExternal) {
|
| - FilePath expected = file_system_path().AppendASCII(
|
| + base::FilePath expected = file_system_path().AppendASCII(
|
| kRootPathTestCases[i].expected_path);
|
| EXPECT_EQ(expected.value(), root_path.value());
|
| EXPECT_TRUE(file_util::DirectoryExists(root_path));
|
| @@ -306,7 +306,7 @@ TEST_F(FileSystemMountPointProviderTest, GetRootPathCreateAndExamine) {
|
| SCOPED_TRACE(testing::Message() << "RootPath (get) #" << i << " "
|
| << kRootPathTestCases[i].expected_path);
|
|
|
| - FilePath root_path;
|
| + base::FilePath root_path;
|
| EXPECT_TRUE(GetRootPath(GURL(kRootPathTestCases[i].origin_url),
|
| kRootPathTestCases[i].type,
|
| false /* create */, &root_path));
|
| @@ -317,18 +317,18 @@ TEST_F(FileSystemMountPointProviderTest, GetRootPathCreateAndExamine) {
|
|
|
| TEST_F(FileSystemMountPointProviderTest,
|
| GetRootPathCreateAndExamineWithNewProvider) {
|
| - std::vector<FilePath> returned_root_path(
|
| + std::vector<base::FilePath> returned_root_path(
|
| ARRAYSIZE_UNSAFE(kRootPathTestCases));
|
| SetupNewContext(CreateAllowFileAccessOptions());
|
|
|
| GURL origin_url("http://foo.com:1/");
|
|
|
| - FilePath root_path1;
|
| + base::FilePath root_path1;
|
| EXPECT_TRUE(GetRootPath(origin_url,
|
| kFileSystemTypeTemporary, true, &root_path1));
|
|
|
| SetupNewContext(CreateDisallowFileAccessOptions());
|
| - FilePath root_path2;
|
| + base::FilePath root_path2;
|
| EXPECT_TRUE(GetRootPath(origin_url,
|
| kFileSystemTypeTemporary, false, &root_path2));
|
|
|
| @@ -383,11 +383,11 @@ TEST_F(FileSystemMountPointProviderTest, GetRootPathFileURIWithAllowFlag) {
|
| for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kRootPathFileURITestCases); ++i) {
|
| SCOPED_TRACE(testing::Message() << "RootPathFileURI (allow) #"
|
| << i << " " << kRootPathFileURITestCases[i].expected_path);
|
| - FilePath root_path;
|
| + base::FilePath root_path;
|
| EXPECT_TRUE(GetRootPath(GURL(kRootPathFileURITestCases[i].origin_url),
|
| kRootPathFileURITestCases[i].type,
|
| true /* create */, &root_path));
|
| - FilePath expected = file_system_path().AppendASCII(
|
| + base::FilePath expected = file_system_path().AppendASCII(
|
| kRootPathFileURITestCases[i].expected_path);
|
| EXPECT_EQ(expected.value(), root_path.value());
|
| EXPECT_TRUE(file_util::DirectoryExists(root_path));
|
| @@ -399,7 +399,7 @@ TEST_F(FileSystemMountPointProviderTest, IsRestrictedName) {
|
| for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kIsRestrictedNameTestCases); ++i) {
|
| SCOPED_TRACE(testing::Message() << "IsRestrictedName #" << i << " "
|
| << kIsRestrictedNameTestCases[i].name);
|
| - FilePath name(kIsRestrictedNameTestCases[i].name);
|
| + base::FilePath name(kIsRestrictedNameTestCases[i].name);
|
| EXPECT_EQ(kIsRestrictedNameTestCases[i].expected_dangerous,
|
| provider(kFileSystemTypeTemporary)->IsRestrictedFileName(name));
|
| }
|
|
|