Chromium Code Reviews| 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 451353d1cd91e7bfe12797da0cef158340157a96..4834f482f5a1f25ed137778c20a8849349d0c561 100644 |
| --- a/content/browser/fileapi/copy_or_move_operation_delegate_unittest.cc |
| +++ b/content/browser/fileapi/copy_or_move_operation_delegate_unittest.cc |
| @@ -735,8 +735,13 @@ TEST(LocalFileSystemCopyOrMoveOperationTest, StreamCopyHelper) { |
| storage::FileStreamReader::CreateForLocalFile( |
| task_runner.get(), source_path, 0, base::Time())); |
| - scoped_ptr<FileStreamWriter> writer(FileStreamWriter::CreateForLocalFile( |
| - task_runner.get(), dest_path, 0, FileStreamWriter::CREATE_NEW_FILE)); |
| + { |
| + base::File file(dest_path, |
| + base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITE); |
| + EXPECT_TRUE(file.created()); |
|
michaeln
2015/03/03 00:02:51
Ah, so there were some uses of the CREATE_NEW_FILE
cmumford
2015/03/03 22:26:09
Done.
|
| + } |
| + scoped_ptr<FileStreamWriter> writer( |
| + FileStreamWriter::CreateForLocalFile(task_runner.get(), dest_path, 0)); |
| std::vector<int64> progress; |
| CopyOrMoveOperationDelegate::StreamCopyHelper helper( |
| @@ -791,8 +796,13 @@ TEST(LocalFileSystemCopyOrMoveOperationTest, StreamCopyHelperWithFlush) { |
| storage::FileStreamReader::CreateForLocalFile( |
| task_runner.get(), source_path, 0, base::Time())); |
| - scoped_ptr<FileStreamWriter> writer(FileStreamWriter::CreateForLocalFile( |
| - task_runner.get(), dest_path, 0, FileStreamWriter::CREATE_NEW_FILE)); |
| + { |
| + base::File file(dest_path, |
| + base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITE); |
| + EXPECT_TRUE(file.created()); |
| + } |
| + scoped_ptr<FileStreamWriter> writer( |
| + FileStreamWriter::CreateForLocalFile(task_runner.get(), dest_path, 0)); |
| std::vector<int64> progress; |
| CopyOrMoveOperationDelegate::StreamCopyHelper helper( |
| @@ -842,8 +852,13 @@ TEST(LocalFileSystemCopyOrMoveOperationTest, StreamCopyHelper_Cancel) { |
| storage::FileStreamReader::CreateForLocalFile( |
| task_runner.get(), source_path, 0, base::Time())); |
| - scoped_ptr<FileStreamWriter> writer(FileStreamWriter::CreateForLocalFile( |
| - task_runner.get(), dest_path, 0, FileStreamWriter::CREATE_NEW_FILE)); |
| + { |
| + base::File file(dest_path, |
| + base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITE); |
| + EXPECT_TRUE(file.created()); |
| + } |
| + scoped_ptr<FileStreamWriter> writer( |
| + FileStreamWriter::CreateForLocalFile(task_runner.get(), dest_path, 0)); |
| std::vector<int64> progress; |
| CopyOrMoveOperationDelegate::StreamCopyHelper helper( |