| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/fileapi/upload_file_system_file_element_reader.h" | 5 #include "content/browser/fileapi/upload_file_system_file_element_reader.h" |
| 6 | 6 |
| 7 #include <stddef.h> |
| 8 #include <stdint.h> |
| 9 |
| 7 #include <limits> | 10 #include <limits> |
| 8 | 11 |
| 9 #include "base/files/scoped_temp_dir.h" | 12 #include "base/files/scoped_temp_dir.h" |
| 13 #include "base/macros.h" |
| 10 #include "base/message_loop/message_loop.h" | 14 #include "base/message_loop/message_loop.h" |
| 11 #include "base/run_loop.h" | 15 #include "base/run_loop.h" |
| 12 #include "content/public/test/async_file_test_helper.h" | 16 #include "content/public/test/async_file_test_helper.h" |
| 13 #include "content/public/test/test_file_system_context.h" | 17 #include "content/public/test/test_file_system_context.h" |
| 14 #include "net/base/io_buffer.h" | 18 #include "net/base/io_buffer.h" |
| 15 #include "net/base/test_completion_callback.h" | 19 #include "net/base/test_completion_callback.h" |
| 16 #include "storage/browser/fileapi/file_system_backend.h" | 20 #include "storage/browser/fileapi/file_system_backend.h" |
| 17 #include "storage/browser/fileapi/file_system_context.h" | 21 #include "storage/browser/fileapi/file_system_context.h" |
| 18 #include "storage/browser/fileapi/file_system_operation_context.h" | 22 #include "storage/browser/fileapi/file_system_operation_context.h" |
| 19 #include "storage/browser/fileapi/file_system_url.h" | 23 #include "storage/browser/fileapi/file_system_url.h" |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 const GURL wrong_url = GetFileSystemURL("wrong_file_name.dat"); | 275 const GURL wrong_url = GetFileSystemURL("wrong_file_name.dat"); |
| 272 reader_.reset(new UploadFileSystemFileElementReader( | 276 reader_.reset(new UploadFileSystemFileElementReader( |
| 273 file_system_context_.get(), wrong_url, 0, | 277 file_system_context_.get(), wrong_url, 0, |
| 274 std::numeric_limits<uint64_t>::max(), base::Time())); | 278 std::numeric_limits<uint64_t>::max(), base::Time())); |
| 275 net::TestCompletionCallback init_callback; | 279 net::TestCompletionCallback init_callback; |
| 276 ASSERT_EQ(net::ERR_IO_PENDING, reader_->Init(init_callback.callback())); | 280 ASSERT_EQ(net::ERR_IO_PENDING, reader_->Init(init_callback.callback())); |
| 277 EXPECT_EQ(net::ERR_FILE_NOT_FOUND, init_callback.WaitForResult()); | 281 EXPECT_EQ(net::ERR_FILE_NOT_FOUND, init_callback.WaitForResult()); |
| 278 } | 282 } |
| 279 | 283 |
| 280 } // namespace content | 284 } // namespace content |
| OLD | NEW |