| Index: content/browser/fileapi/external_mount_points_unittest.cc
|
| diff --git a/content/browser/fileapi/external_mount_points_unittest.cc b/content/browser/fileapi/external_mount_points_unittest.cc
|
| index fa0d1f5bbc2c829285f2510e5682b0a30e3c5d87..38cf4c7d20dada85238fc0e70c68dda0dfc32224 100644
|
| --- a/content/browser/fileapi/external_mount_points_unittest.cc
|
| +++ b/content/browser/fileapi/external_mount_points_unittest.cc
|
| @@ -18,13 +18,13 @@
|
| #define DRIVE
|
| #endif
|
|
|
| -using fileapi::FileSystemURL;
|
| +using storage::FileSystemURL;
|
|
|
| namespace content {
|
|
|
| TEST(ExternalMountPointsTest, AddMountPoint) {
|
| - scoped_refptr<fileapi::ExternalMountPoints> mount_points(
|
| - fileapi::ExternalMountPoints::CreateRefCounted());
|
| + scoped_refptr<storage::ExternalMountPoints> mount_points(
|
| + storage::ExternalMountPoints::CreateRefCounted());
|
|
|
| struct TestCase {
|
| // The mount point's name.
|
| @@ -107,12 +107,12 @@ TEST(ExternalMountPointsTest, AddMountPoint) {
|
|
|
| // Test adding mount points.
|
| for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kTestCases); ++i) {
|
| - EXPECT_EQ(kTestCases[i].success,
|
| - mount_points->RegisterFileSystem(
|
| - kTestCases[i].name,
|
| - fileapi::kFileSystemTypeNativeLocal,
|
| - fileapi::FileSystemMountOption(),
|
| - base::FilePath(kTestCases[i].path)))
|
| + EXPECT_EQ(
|
| + kTestCases[i].success,
|
| + mount_points->RegisterFileSystem(kTestCases[i].name,
|
| + storage::kFileSystemTypeNativeLocal,
|
| + storage::FileSystemMountOption(),
|
| + base::FilePath(kTestCases[i].path)))
|
| << "Adding mount point: " << kTestCases[i].name << " with path "
|
| << kTestCases[i].path;
|
| }
|
| @@ -132,35 +132,35 @@ TEST(ExternalMountPointsTest, AddMountPoint) {
|
| }
|
|
|
| TEST(ExternalMountPointsTest, GetVirtualPath) {
|
| - scoped_refptr<fileapi::ExternalMountPoints> mount_points(
|
| - fileapi::ExternalMountPoints::CreateRefCounted());
|
| + scoped_refptr<storage::ExternalMountPoints> mount_points(
|
| + storage::ExternalMountPoints::CreateRefCounted());
|
|
|
| mount_points->RegisterFileSystem("c",
|
| - fileapi::kFileSystemTypeNativeLocal,
|
| - fileapi::FileSystemMountOption(),
|
| + storage::kFileSystemTypeNativeLocal,
|
| + storage::FileSystemMountOption(),
|
| base::FilePath(DRIVE FPL("/a/b/c")));
|
| // Note that "/a/b/c" < "/a/b/c(1)" < "/a/b/c/".
|
| mount_points->RegisterFileSystem("c(1)",
|
| - fileapi::kFileSystemTypeNativeLocal,
|
| - fileapi::FileSystemMountOption(),
|
| + storage::kFileSystemTypeNativeLocal,
|
| + storage::FileSystemMountOption(),
|
| base::FilePath(DRIVE FPL("/a/b/c(1)")));
|
| mount_points->RegisterFileSystem("x",
|
| - fileapi::kFileSystemTypeNativeLocal,
|
| - fileapi::FileSystemMountOption(),
|
| + storage::kFileSystemTypeNativeLocal,
|
| + storage::FileSystemMountOption(),
|
| base::FilePath(DRIVE FPL("/z/y/x")));
|
| mount_points->RegisterFileSystem("o",
|
| - fileapi::kFileSystemTypeNativeLocal,
|
| - fileapi::FileSystemMountOption(),
|
| + storage::kFileSystemTypeNativeLocal,
|
| + storage::FileSystemMountOption(),
|
| base::FilePath(DRIVE FPL("/m/n/o")));
|
| // A mount point whose name does not match its path base name.
|
| mount_points->RegisterFileSystem("mount",
|
| - fileapi::kFileSystemTypeNativeLocal,
|
| - fileapi::FileSystemMountOption(),
|
| + storage::kFileSystemTypeNativeLocal,
|
| + storage::FileSystemMountOption(),
|
| base::FilePath(DRIVE FPL("/root/foo")));
|
| // A mount point with an empty path.
|
| mount_points->RegisterFileSystem("empty_path",
|
| - fileapi::kFileSystemTypeNativeLocal,
|
| - fileapi::FileSystemMountOption(),
|
| + storage::kFileSystemTypeNativeLocal,
|
| + storage::FileSystemMountOption(),
|
| base::FilePath());
|
|
|
| struct TestCase {
|
| @@ -234,57 +234,57 @@ TEST(ExternalMountPointsTest, GetVirtualPath) {
|
| }
|
|
|
| TEST(ExternalMountPointsTest, HandlesFileSystemMountType) {
|
| - scoped_refptr<fileapi::ExternalMountPoints> mount_points(
|
| - fileapi::ExternalMountPoints::CreateRefCounted());
|
| + scoped_refptr<storage::ExternalMountPoints> mount_points(
|
| + storage::ExternalMountPoints::CreateRefCounted());
|
|
|
| const GURL test_origin("http://chromium.org");
|
| const base::FilePath test_path(FPL("/mount"));
|
|
|
| // Should handle External File System.
|
| EXPECT_TRUE(mount_points->HandlesFileSystemMountType(
|
| - fileapi::kFileSystemTypeExternal));
|
| + storage::kFileSystemTypeExternal));
|
|
|
| // Shouldn't handle the rest.
|
| EXPECT_FALSE(mount_points->HandlesFileSystemMountType(
|
| - fileapi::kFileSystemTypeIsolated));
|
| - EXPECT_FALSE(mount_points->HandlesFileSystemMountType(
|
| - fileapi::kFileSystemTypeTemporary));
|
| + storage::kFileSystemTypeIsolated));
|
| EXPECT_FALSE(mount_points->HandlesFileSystemMountType(
|
| - fileapi::kFileSystemTypePersistent));
|
| + storage::kFileSystemTypeTemporary));
|
| EXPECT_FALSE(mount_points->HandlesFileSystemMountType(
|
| - fileapi::kFileSystemTypeTest));
|
| + storage::kFileSystemTypePersistent));
|
| + EXPECT_FALSE(
|
| + mount_points->HandlesFileSystemMountType(storage::kFileSystemTypeTest));
|
| // Not even if it's external subtype.
|
| EXPECT_FALSE(mount_points->HandlesFileSystemMountType(
|
| - fileapi::kFileSystemTypeNativeLocal));
|
| - EXPECT_FALSE(mount_points->HandlesFileSystemMountType(
|
| - fileapi::kFileSystemTypeRestrictedNativeLocal));
|
| + storage::kFileSystemTypeNativeLocal));
|
| EXPECT_FALSE(mount_points->HandlesFileSystemMountType(
|
| - fileapi::kFileSystemTypeDrive));
|
| + storage::kFileSystemTypeRestrictedNativeLocal));
|
| + EXPECT_FALSE(
|
| + mount_points->HandlesFileSystemMountType(storage::kFileSystemTypeDrive));
|
| EXPECT_FALSE(mount_points->HandlesFileSystemMountType(
|
| - fileapi::kFileSystemTypeSyncable));
|
| + storage::kFileSystemTypeSyncable));
|
| }
|
|
|
| TEST(ExternalMountPointsTest, CreateCrackedFileSystemURL) {
|
| - scoped_refptr<fileapi::ExternalMountPoints> mount_points(
|
| - fileapi::ExternalMountPoints::CreateRefCounted());
|
| + scoped_refptr<storage::ExternalMountPoints> mount_points(
|
| + storage::ExternalMountPoints::CreateRefCounted());
|
|
|
| const GURL kTestOrigin("http://chromium.org");
|
|
|
| mount_points->RegisterFileSystem("c",
|
| - fileapi::kFileSystemTypeNativeLocal,
|
| - fileapi::FileSystemMountOption(),
|
| + storage::kFileSystemTypeNativeLocal,
|
| + storage::FileSystemMountOption(),
|
| base::FilePath(DRIVE FPL("/a/b/c")));
|
| mount_points->RegisterFileSystem("c(1)",
|
| - fileapi::kFileSystemTypeDrive,
|
| - fileapi::FileSystemMountOption(),
|
| + storage::kFileSystemTypeDrive,
|
| + storage::FileSystemMountOption(),
|
| base::FilePath(DRIVE FPL("/a/b/c(1)")));
|
| mount_points->RegisterFileSystem("empty_path",
|
| - fileapi::kFileSystemTypeSyncable,
|
| - fileapi::FileSystemMountOption(),
|
| + storage::kFileSystemTypeSyncable,
|
| + storage::FileSystemMountOption(),
|
| base::FilePath());
|
| mount_points->RegisterFileSystem("mount",
|
| - fileapi::kFileSystemTypeDrive,
|
| - fileapi::FileSystemMountOption(),
|
| + storage::kFileSystemTypeDrive,
|
| + storage::FileSystemMountOption(),
|
| base::FilePath(DRIVE FPL("/root")));
|
|
|
| // Try cracking invalid GURL.
|
| @@ -293,69 +293,62 @@ TEST(ExternalMountPointsTest, CreateCrackedFileSystemURL) {
|
|
|
| // Try cracking isolated path.
|
| FileSystemURL isolated = mount_points->CreateCrackedFileSystemURL(
|
| - kTestOrigin, fileapi::kFileSystemTypeIsolated, base::FilePath(FPL("c")));
|
| + kTestOrigin, storage::kFileSystemTypeIsolated, base::FilePath(FPL("c")));
|
| EXPECT_FALSE(isolated.is_valid());
|
|
|
| // Try native local which is not cracked.
|
| FileSystemURL native_local = mount_points->CreateCrackedFileSystemURL(
|
| kTestOrigin,
|
| - fileapi::kFileSystemTypeNativeLocal,
|
| + storage::kFileSystemTypeNativeLocal,
|
| base::FilePath(FPL("c")));
|
| EXPECT_FALSE(native_local.is_valid());
|
|
|
| struct TestCase {
|
| const base::FilePath::CharType* const path;
|
| bool expect_valid;
|
| - fileapi::FileSystemType expect_type;
|
| + storage::FileSystemType expect_type;
|
| const base::FilePath::CharType* const expect_path;
|
| const char* const expect_fs_id;
|
| };
|
|
|
| const TestCase kTestCases[] = {
|
| - { FPL("c/d/e"),
|
| - true, fileapi::kFileSystemTypeNativeLocal, DRIVE FPL("/a/b/c/d/e"), "c" },
|
| - { FPL("c(1)/d/e"),
|
| - true, fileapi::kFileSystemTypeDrive, DRIVE FPL("/a/b/c(1)/d/e"), "c(1)" },
|
| - { FPL("c(1)"),
|
| - true, fileapi::kFileSystemTypeDrive, DRIVE FPL("/a/b/c(1)"), "c(1)" },
|
| - { FPL("empty_path/a"),
|
| - true, fileapi::kFileSystemTypeSyncable, FPL("a"), "empty_path" },
|
| - { FPL("empty_path"),
|
| - true, fileapi::kFileSystemTypeSyncable, FPL(""), "empty_path" },
|
| - { FPL("mount/a/b"),
|
| - true, fileapi::kFileSystemTypeDrive, DRIVE FPL("/root/a/b"), "mount" },
|
| - { FPL("mount"),
|
| - true, fileapi::kFileSystemTypeDrive, DRIVE FPL("/root"), "mount" },
|
| - { FPL("cc"),
|
| - false, fileapi::kFileSystemTypeUnknown, FPL(""), "" },
|
| - { FPL(""),
|
| - false, fileapi::kFileSystemTypeUnknown, FPL(""), "" },
|
| - { FPL(".."),
|
| - false, fileapi::kFileSystemTypeUnknown, FPL(""), "" },
|
| + {FPL("c/d/e"), true, storage::kFileSystemTypeNativeLocal,
|
| + DRIVE FPL("/a/b/c/d/e"), "c"},
|
| + {FPL("c(1)/d/e"), true, storage::kFileSystemTypeDrive,
|
| + DRIVE FPL("/a/b/c(1)/d/e"), "c(1)"},
|
| + {FPL("c(1)"), true, storage::kFileSystemTypeDrive, DRIVE FPL("/a/b/c(1)"),
|
| + "c(1)"},
|
| + {FPL("empty_path/a"), true, storage::kFileSystemTypeSyncable, FPL("a"),
|
| + "empty_path"},
|
| + {FPL("empty_path"), true, storage::kFileSystemTypeSyncable, FPL(""),
|
| + "empty_path"},
|
| + {FPL("mount/a/b"), true, storage::kFileSystemTypeDrive,
|
| + DRIVE FPL("/root/a/b"), "mount"},
|
| + {FPL("mount"), true, storage::kFileSystemTypeDrive, DRIVE FPL("/root"),
|
| + "mount"},
|
| + {FPL("cc"), false, storage::kFileSystemTypeUnknown, FPL(""), ""},
|
| + {FPL(""), false, storage::kFileSystemTypeUnknown, FPL(""), ""},
|
| + {FPL(".."), false, storage::kFileSystemTypeUnknown, FPL(""), ""},
|
| // Absolte paths.
|
| - { FPL("/c/d/e"),
|
| - false, fileapi::kFileSystemTypeUnknown, FPL(""), "" },
|
| - { FPL("/c(1)/d/e"),
|
| - false, fileapi::kFileSystemTypeUnknown, FPL(""), "" },
|
| - { FPL("/empty_path"),
|
| - false, fileapi::kFileSystemTypeUnknown, FPL(""), "" },
|
| + {FPL("/c/d/e"), false, storage::kFileSystemTypeUnknown, FPL(""), ""},
|
| + {FPL("/c(1)/d/e"), false, storage::kFileSystemTypeUnknown, FPL(""), ""},
|
| + {FPL("/empty_path"), false, storage::kFileSystemTypeUnknown, FPL(""), ""},
|
| // PAth references parent.
|
| - { FPL("c/d/../e"),
|
| - false, fileapi::kFileSystemTypeUnknown, FPL(""), "" },
|
| - { FPL("/empty_path/a/../b"),
|
| - false, fileapi::kFileSystemTypeUnknown, FPL(""), "" },
|
| + {FPL("c/d/../e"), false, storage::kFileSystemTypeUnknown, FPL(""), ""},
|
| + {FPL("/empty_path/a/../b"), false, storage::kFileSystemTypeUnknown, FPL(""),
|
| + ""},
|
| #if defined(FILE_PATH_USES_WIN_SEPARATORS)
|
| - { FPL("c/d\\e"),
|
| - true, fileapi::kFileSystemTypeNativeLocal, DRIVE FPL("/a/b/c/d/e"), "c" },
|
| - { FPL("mount\\a\\b"),
|
| - true, fileapi::kFileSystemTypeDrive, DRIVE FPL("/root/a/b"), "mount" },
|
| + {FPL("c/d\\e"), true, storage::kFileSystemTypeNativeLocal,
|
| + DRIVE FPL("/a/b/c/d/e"), "c"},
|
| + {FPL("mount\\a\\b"), true, storage::kFileSystemTypeDrive,
|
| + DRIVE FPL("/root/a/b"), "mount"},
|
| #endif
|
| };
|
|
|
| for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kTestCases); ++i) {
|
| FileSystemURL cracked = mount_points->CreateCrackedFileSystemURL(
|
| kTestOrigin,
|
| - fileapi::kFileSystemTypeExternal,
|
| + storage::kFileSystemTypeExternal,
|
| base::FilePath(kTestCases[i].path));
|
|
|
| EXPECT_EQ(kTestCases[i].expect_valid, cracked.is_valid())
|
| @@ -376,89 +369,82 @@ TEST(ExternalMountPointsTest, CreateCrackedFileSystemURL) {
|
| << "Test case index: " << i;
|
| EXPECT_EQ(kTestCases[i].expect_fs_id, cracked.filesystem_id())
|
| << "Test case index: " << i;
|
| - EXPECT_EQ(fileapi::kFileSystemTypeExternal, cracked.mount_type())
|
| + EXPECT_EQ(storage::kFileSystemTypeExternal, cracked.mount_type())
|
| << "Test case index: " << i;
|
| }
|
| }
|
|
|
| TEST(ExternalMountPointsTest, CrackVirtualPath) {
|
| - scoped_refptr<fileapi::ExternalMountPoints> mount_points(
|
| - fileapi::ExternalMountPoints::CreateRefCounted());
|
| + scoped_refptr<storage::ExternalMountPoints> mount_points(
|
| + storage::ExternalMountPoints::CreateRefCounted());
|
|
|
| const GURL kTestOrigin("http://chromium.org");
|
|
|
| mount_points->RegisterFileSystem("c",
|
| - fileapi::kFileSystemTypeNativeLocal,
|
| - fileapi::FileSystemMountOption(),
|
| + storage::kFileSystemTypeNativeLocal,
|
| + storage::FileSystemMountOption(),
|
| base::FilePath(DRIVE FPL("/a/b/c")));
|
| mount_points->RegisterFileSystem("c(1)",
|
| - fileapi::kFileSystemTypeDrive,
|
| - fileapi::FileSystemMountOption(),
|
| + storage::kFileSystemTypeDrive,
|
| + storage::FileSystemMountOption(),
|
| base::FilePath(DRIVE FPL("/a/b/c(1)")));
|
| mount_points->RegisterFileSystem("empty_path",
|
| - fileapi::kFileSystemTypeSyncable,
|
| - fileapi::FileSystemMountOption(),
|
| + storage::kFileSystemTypeSyncable,
|
| + storage::FileSystemMountOption(),
|
| base::FilePath());
|
| mount_points->RegisterFileSystem("mount",
|
| - fileapi::kFileSystemTypeDrive,
|
| - fileapi::FileSystemMountOption(),
|
| + storage::kFileSystemTypeDrive,
|
| + storage::FileSystemMountOption(),
|
| base::FilePath(DRIVE FPL("/root")));
|
|
|
| struct TestCase {
|
| const base::FilePath::CharType* const path;
|
| bool expect_valid;
|
| - fileapi::FileSystemType expect_type;
|
| + storage::FileSystemType expect_type;
|
| const base::FilePath::CharType* const expect_path;
|
| const char* const expect_name;
|
| };
|
|
|
| const TestCase kTestCases[] = {
|
| - { FPL("c/d/e"),
|
| - true, fileapi::kFileSystemTypeNativeLocal, DRIVE FPL("/a/b/c/d/e"), "c" },
|
| - { FPL("c(1)/d/e"),
|
| - true, fileapi::kFileSystemTypeDrive, DRIVE FPL("/a/b/c(1)/d/e"), "c(1)" },
|
| - { FPL("c(1)"),
|
| - true, fileapi::kFileSystemTypeDrive, DRIVE FPL("/a/b/c(1)"), "c(1)" },
|
| - { FPL("empty_path/a"),
|
| - true, fileapi::kFileSystemTypeSyncable, FPL("a"), "empty_path" },
|
| - { FPL("empty_path"),
|
| - true, fileapi::kFileSystemTypeSyncable, FPL(""), "empty_path" },
|
| - { FPL("mount/a/b"),
|
| - true, fileapi::kFileSystemTypeDrive, DRIVE FPL("/root/a/b"), "mount" },
|
| - { FPL("mount"),
|
| - true, fileapi::kFileSystemTypeDrive, DRIVE FPL("/root"), "mount" },
|
| - { FPL("cc"),
|
| - false, fileapi::kFileSystemTypeUnknown, FPL(""), "" },
|
| - { FPL(""),
|
| - false, fileapi::kFileSystemTypeUnknown, FPL(""), "" },
|
| - { FPL(".."),
|
| - false, fileapi::kFileSystemTypeUnknown, FPL(""), "" },
|
| + {FPL("c/d/e"), true, storage::kFileSystemTypeNativeLocal,
|
| + DRIVE FPL("/a/b/c/d/e"), "c"},
|
| + {FPL("c(1)/d/e"), true, storage::kFileSystemTypeDrive,
|
| + DRIVE FPL("/a/b/c(1)/d/e"), "c(1)"},
|
| + {FPL("c(1)"), true, storage::kFileSystemTypeDrive, DRIVE FPL("/a/b/c(1)"),
|
| + "c(1)"},
|
| + {FPL("empty_path/a"), true, storage::kFileSystemTypeSyncable, FPL("a"),
|
| + "empty_path"},
|
| + {FPL("empty_path"), true, storage::kFileSystemTypeSyncable, FPL(""),
|
| + "empty_path"},
|
| + {FPL("mount/a/b"), true, storage::kFileSystemTypeDrive,
|
| + DRIVE FPL("/root/a/b"), "mount"},
|
| + {FPL("mount"), true, storage::kFileSystemTypeDrive, DRIVE FPL("/root"),
|
| + "mount"},
|
| + {FPL("cc"), false, storage::kFileSystemTypeUnknown, FPL(""), ""},
|
| + {FPL(""), false, storage::kFileSystemTypeUnknown, FPL(""), ""},
|
| + {FPL(".."), false, storage::kFileSystemTypeUnknown, FPL(""), ""},
|
| // Absolte paths.
|
| - { FPL("/c/d/e"),
|
| - false, fileapi::kFileSystemTypeUnknown, FPL(""), "" },
|
| - { FPL("/c(1)/d/e"),
|
| - false, fileapi::kFileSystemTypeUnknown, FPL(""), "" },
|
| - { FPL("/empty_path"),
|
| - false, fileapi::kFileSystemTypeUnknown, FPL(""), "" },
|
| + {FPL("/c/d/e"), false, storage::kFileSystemTypeUnknown, FPL(""), ""},
|
| + {FPL("/c(1)/d/e"), false, storage::kFileSystemTypeUnknown, FPL(""), ""},
|
| + {FPL("/empty_path"), false, storage::kFileSystemTypeUnknown, FPL(""), ""},
|
| // PAth references parent.
|
| - { FPL("c/d/../e"),
|
| - false, fileapi::kFileSystemTypeUnknown, FPL(""), "" },
|
| - { FPL("/empty_path/a/../b"),
|
| - false, fileapi::kFileSystemTypeUnknown, FPL(""), "" },
|
| + {FPL("c/d/../e"), false, storage::kFileSystemTypeUnknown, FPL(""), ""},
|
| + {FPL("/empty_path/a/../b"), false, storage::kFileSystemTypeUnknown, FPL(""),
|
| + ""},
|
| #if defined(FILE_PATH_USES_WIN_SEPARATORS)
|
| - { FPL("c/d\\e"),
|
| - true, fileapi::kFileSystemTypeNativeLocal, DRIVE FPL("/a/b/c/d/e"), "c" },
|
| - { FPL("mount\\a\\b"),
|
| - true, fileapi::kFileSystemTypeDrive, DRIVE FPL("/root/a/b"), "mount" },
|
| + {FPL("c/d\\e"), true, storage::kFileSystemTypeNativeLocal,
|
| + DRIVE FPL("/a/b/c/d/e"), "c"},
|
| + {FPL("mount\\a\\b"), true, storage::kFileSystemTypeDrive,
|
| + DRIVE FPL("/root/a/b"), "mount"},
|
| #endif
|
| };
|
|
|
| for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kTestCases); ++i) {
|
| std::string cracked_name;
|
| - fileapi::FileSystemType cracked_type;
|
| + storage::FileSystemType cracked_type;
|
| std::string cracked_id;
|
| base::FilePath cracked_path;
|
| - fileapi::FileSystemMountOption cracked_option;
|
| + storage::FileSystemMountOption cracked_option;
|
| EXPECT_EQ(kTestCases[i].expect_valid,
|
| mount_points->CrackVirtualPath(base::FilePath(kTestCases[i].path),
|
| &cracked_name, &cracked_type, &cracked_id, &cracked_path,
|
| @@ -482,33 +468,33 @@ TEST(ExternalMountPointsTest, CrackVirtualPath) {
|
| }
|
|
|
| TEST(ExternalMountPointsTest, MountOption) {
|
| - scoped_refptr<fileapi::ExternalMountPoints> mount_points(
|
| - fileapi::ExternalMountPoints::CreateRefCounted());
|
| + scoped_refptr<storage::ExternalMountPoints> mount_points(
|
| + storage::ExternalMountPoints::CreateRefCounted());
|
|
|
| mount_points->RegisterFileSystem(
|
| "nosync",
|
| - fileapi::kFileSystemTypeNativeLocal,
|
| - fileapi::FileSystemMountOption(fileapi::COPY_SYNC_OPTION_NO_SYNC),
|
| + storage::kFileSystemTypeNativeLocal,
|
| + storage::FileSystemMountOption(storage::COPY_SYNC_OPTION_NO_SYNC),
|
| base::FilePath(DRIVE FPL("/nosync")));
|
| mount_points->RegisterFileSystem(
|
| "sync",
|
| - fileapi::kFileSystemTypeNativeLocal,
|
| - fileapi::FileSystemMountOption(fileapi::COPY_SYNC_OPTION_SYNC),
|
| + storage::kFileSystemTypeNativeLocal,
|
| + storage::FileSystemMountOption(storage::COPY_SYNC_OPTION_SYNC),
|
| base::FilePath(DRIVE FPL("/sync")));
|
|
|
| std::string name;
|
| - fileapi::FileSystemType type;
|
| + storage::FileSystemType type;
|
| std::string cracked_id;
|
| - fileapi::FileSystemMountOption option;
|
| + storage::FileSystemMountOption option;
|
| base::FilePath path;
|
| EXPECT_TRUE(mount_points->CrackVirtualPath(
|
| base::FilePath(FPL("nosync/file")), &name, &type, &cracked_id, &path,
|
| &option));
|
| - EXPECT_EQ(fileapi::COPY_SYNC_OPTION_NO_SYNC, option.copy_sync_option());
|
| + EXPECT_EQ(storage::COPY_SYNC_OPTION_NO_SYNC, option.copy_sync_option());
|
| EXPECT_TRUE(mount_points->CrackVirtualPath(
|
| base::FilePath(FPL("sync/file")), &name, &type, &cracked_id, &path,
|
| &option));
|
| - EXPECT_EQ(fileapi::COPY_SYNC_OPTION_SYNC, option.copy_sync_option());
|
| + EXPECT_EQ(storage::COPY_SYNC_OPTION_SYNC, option.copy_sync_option());
|
| }
|
|
|
| } // namespace content
|
|
|