| Index: content/browser/fileapi/copy_or_move_operation_delegate_unittest.cc
|
| diff --git a/content/browser/fileapi/copy_or_move_operation_delegate_unittest.cc b/content/browser/fileapi/copy_or_move_operation_delegate_unittest.cc
|
| index 1b7abf9852bcdbe714b4d13091f0d20a6a8d8a59..d5192a815101aed4fe3af345599448e9e26b620a 100644
|
| --- a/content/browser/fileapi/copy_or_move_operation_delegate_unittest.cc
|
| +++ b/content/browser/fileapi/copy_or_move_operation_delegate_unittest.cc
|
| @@ -718,14 +718,11 @@ TEST(LocalFileSystemCopyOrMoveOperationTest, StreamCopyHelper) {
|
| base::ScopedTempDir temp_dir;
|
| ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
|
| base::FilePath source_path = temp_dir.path().AppendASCII("source");
|
| + base::FilePath dest_path = temp_dir.path().AppendASCII("dest");
|
| const char kTestData[] = "abcdefghijklmnopqrstuvwxyz0123456789";
|
| base::WriteFile(source_path, kTestData,
|
| arraysize(kTestData) - 1); // Exclude trailing '\0'.
|
|
|
| - base::FilePath dest_path = temp_dir.path().AppendASCII("dest");
|
| - // LocalFileWriter requires the file exists. So create an empty file here.
|
| - base::WriteFile(dest_path, "", 0);
|
| -
|
| base::MessageLoopForIO message_loop;
|
| base::Thread file_thread("file_thread");
|
| ASSERT_TRUE(file_thread.Start());
|
| @@ -739,8 +736,8 @@ TEST(LocalFileSystemCopyOrMoveOperationTest, StreamCopyHelper) {
|
| webkit_blob::FileStreamReader::CreateForLocalFile(
|
| task_runner.get(), source_path, 0, base::Time()));
|
|
|
| - scoped_ptr<FileStreamWriter> writer(
|
| - FileStreamWriter::CreateForLocalFile(task_runner.get(), dest_path, 0));
|
| + scoped_ptr<FileStreamWriter> writer(FileStreamWriter::CreateForLocalFile(
|
| + task_runner.get(), dest_path, 0, FileStreamWriter::CREATE_NEW_FILE));
|
|
|
| std::vector<int64> progress;
|
| CopyOrMoveOperationDelegate::StreamCopyHelper helper(
|
| @@ -776,13 +773,11 @@ TEST(LocalFileSystemCopyOrMoveOperationTest, StreamCopyHelperWithFlush) {
|
| base::ScopedTempDir temp_dir;
|
| ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
|
| base::FilePath source_path = temp_dir.path().AppendASCII("source");
|
| + base::FilePath dest_path = temp_dir.path().AppendASCII("dest");
|
| const char kTestData[] = "abcdefghijklmnopqrstuvwxyz0123456789";
|
| base::WriteFile(source_path, kTestData,
|
| arraysize(kTestData) - 1); // Exclude trailing '\0'.
|
|
|
| - base::FilePath dest_path = temp_dir.path().AppendASCII("dest");
|
| - // LocalFileWriter requires the file exists. So create an empty file here.
|
| - base::WriteFile(dest_path, "", 0);
|
|
|
| base::MessageLoopForIO message_loop;
|
| base::Thread file_thread("file_thread");
|
| @@ -797,8 +792,8 @@ TEST(LocalFileSystemCopyOrMoveOperationTest, StreamCopyHelperWithFlush) {
|
| webkit_blob::FileStreamReader::CreateForLocalFile(
|
| task_runner.get(), source_path, 0, base::Time()));
|
|
|
| - scoped_ptr<FileStreamWriter> writer(
|
| - FileStreamWriter::CreateForLocalFile(task_runner.get(), dest_path, 0));
|
| + scoped_ptr<FileStreamWriter> writer(FileStreamWriter::CreateForLocalFile(
|
| + task_runner.get(), dest_path, 0, FileStreamWriter::CREATE_NEW_FILE));
|
|
|
| std::vector<int64> progress;
|
| CopyOrMoveOperationDelegate::StreamCopyHelper helper(
|
| @@ -830,14 +825,11 @@ TEST(LocalFileSystemCopyOrMoveOperationTest, StreamCopyHelper_Cancel) {
|
| base::ScopedTempDir temp_dir;
|
| ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
|
| base::FilePath source_path = temp_dir.path().AppendASCII("source");
|
| + base::FilePath dest_path = temp_dir.path().AppendASCII("dest");
|
| const char kTestData[] = "abcdefghijklmnopqrstuvwxyz0123456789";
|
| base::WriteFile(source_path, kTestData,
|
| arraysize(kTestData) - 1); // Exclude trailing '\0'.
|
|
|
| - base::FilePath dest_path = temp_dir.path().AppendASCII("dest");
|
| - // LocalFileWriter requires the file exists. So create an empty file here.
|
| - base::WriteFile(dest_path, "", 0);
|
| -
|
| base::MessageLoopForIO message_loop;
|
| base::Thread file_thread("file_thread");
|
| ASSERT_TRUE(file_thread.Start());
|
| @@ -851,8 +843,8 @@ TEST(LocalFileSystemCopyOrMoveOperationTest, StreamCopyHelper_Cancel) {
|
| webkit_blob::FileStreamReader::CreateForLocalFile(
|
| task_runner.get(), source_path, 0, base::Time()));
|
|
|
| - scoped_ptr<FileStreamWriter> writer(
|
| - FileStreamWriter::CreateForLocalFile(task_runner.get(), dest_path, 0));
|
| + scoped_ptr<FileStreamWriter> writer(FileStreamWriter::CreateForLocalFile(
|
| + task_runner.get(), dest_path, 0, FileStreamWriter::CREATE_NEW_FILE));
|
|
|
| std::vector<int64> progress;
|
| CopyOrMoveOperationDelegate::StreamCopyHelper helper(
|
|
|