Index: webkit/fileapi/isolated_file_util_unittest.cc |
diff --git a/webkit/fileapi/isolated_file_util_unittest.cc b/webkit/fileapi/isolated_file_util_unittest.cc |
index 33bf01061d3850eaea166e43f6305b8b26571393..cfecc49f41011edd2827ab3f66475134a09ae9f6 100644 |
--- a/webkit/fileapi/isolated_file_util_unittest.cc |
+++ b/webkit/fileapi/isolated_file_util_unittest.cc |
@@ -50,13 +50,15 @@ FilePath GetTopLevelPath(const FilePath& path) { |
} // namespace |
+// TODO(kinuko): we should have separate tests for DraggedFileUtil and |
+// IsolatedFileUtil. |
class IsolatedFileUtilTest : public testing::Test { |
public: |
IsolatedFileUtilTest() {} |
void SetUp() { |
ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); |
- file_util_.reset(new IsolatedFileUtil()); |
+ file_util_.reset(new DraggedFileUtil()); |
// Register the files/directories of RegularTestCases (with random |
// root paths) as dropped files. |
@@ -206,14 +208,14 @@ class IsolatedFileUtilTest : public testing::Test { |
FilePath root = root_path().Append( |
kRootPaths[(root_path_index++) % arraysize(kRootPaths)]); |
toplevel_root_map_[toplevel] = root; |
- toplevels.AddPath(root.Append(path)); |
+ toplevels.AddPath(root.Append(path), NULL); |
} |
test::SetUpOneTestCase(toplevel_root_map_[toplevel], test_case); |
} |
// Register the toplevel entries. |
- filesystem_id_ = isolated_context()->RegisterFileSystem(toplevels); |
+ filesystem_id_ = isolated_context()->RegisterDraggedFileSystem(toplevels); |
} |
ScopedTempDir data_dir_; |
@@ -394,14 +396,6 @@ TEST_F(IsolatedFileUtilTest, CopyOutFileTest) { |
file_util(), other_file_util(), |
src_url, dest_url)); |
- // The other way (copy-in) should not work. |
- context.reset(new FileSystemOperationContext(file_system_context())); |
- ASSERT_EQ(base::PLATFORM_FILE_ERROR_SECURITY, |
- FileUtilHelper::Copy( |
- context.get(), |
- other_file_util(), file_util(), |
- dest_url, src_url)); |
- |
VerifyFilesHaveSameContent(file_util(), other_file_util(), |
src_url, dest_url); |
} |
@@ -442,15 +436,6 @@ TEST_F(IsolatedFileUtilTest, CopyOutDirectoryTest) { |
file_util(), other_file_util(), |
src_url, dest_url)); |
- // The other way (copy-in) should not work for two reasons: |
- // write is prohibited in the isolated filesystem, and copying directory |
- // to non-empty directory shouldn't work. |
- context.reset(new FileSystemOperationContext(file_system_context())); |
- base::PlatformFileError result = FileUtilHelper::Copy( |
- context.get(), other_file_util(), file_util(), dest_url, src_url); |
- ASSERT_TRUE(result == base::PLATFORM_FILE_ERROR_FAILED || |
- result == base::PLATFORM_FILE_ERROR_NOT_EMPTY); |
- |
VerifyDirectoriesHaveSameContent(file_util(), other_file_util(), |
src_url, dest_url); |
} |