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,13 +718,10 @@ |
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"); |
@@ -739,8 +736,8 @@ |
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 @@ |
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 @@ |
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,13 +825,10 @@ |
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"); |
@@ -851,8 +843,8 @@ |
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( |