| 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 "storage/browser/fileapi/file_system_file_stream_reader.h" | 5 #include "storage/browser/fileapi/file_system_file_stream_reader.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <limits> | 10 #include <limits> |
| 11 #include <memory> | 11 #include <memory> |
| 12 #include <string> | 12 #include <string> |
| 13 | 13 |
| 14 #include "base/files/scoped_temp_dir.h" | 14 #include "base/files/scoped_temp_dir.h" |
| 15 #include "base/macros.h" | 15 #include "base/macros.h" |
| 16 #include "base/run_loop.h" | 16 #include "base/run_loop.h" |
| 17 #include "content/public/test/async_file_test_helper.h" | |
| 18 #include "content/public/test/test_file_system_context.h" | |
| 19 #include "net/base/io_buffer.h" | 17 #include "net/base/io_buffer.h" |
| 20 #include "net/base/net_errors.h" | 18 #include "net/base/net_errors.h" |
| 21 #include "net/base/test_completion_callback.h" | 19 #include "net/base/test_completion_callback.h" |
| 22 #include "storage/browser/fileapi/external_mount_points.h" | 20 #include "storage/browser/fileapi/external_mount_points.h" |
| 23 #include "storage/browser/fileapi/file_system_context.h" | 21 #include "storage/browser/fileapi/file_system_context.h" |
| 24 #include "storage/browser/fileapi/file_system_file_util.h" | 22 #include "storage/browser/fileapi/file_system_file_util.h" |
| 23 #include "storage/browser/test/async_file_test_helper.h" |
| 24 #include "storage/browser/test/test_file_system_context.h" |
| 25 #include "testing/gtest/include/gtest/gtest.h" | 25 #include "testing/gtest/include/gtest/gtest.h" |
| 26 | 26 |
| 27 using content::AsyncFileTestHelper; | 27 using content::AsyncFileTestHelper; |
| 28 using storage::FileSystemContext; | 28 using storage::FileSystemContext; |
| 29 using storage::FileSystemFileStreamReader; | 29 using storage::FileSystemFileStreamReader; |
| 30 using storage::FileSystemType; | 30 using storage::FileSystemType; |
| 31 using storage::FileSystemURL; | 31 using storage::FileSystemURL; |
| 32 | 32 |
| 33 namespace content { | 33 namespace content { |
| 34 | 34 |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 new net::IOBufferWithSize(kTestDataSize)); | 265 new net::IOBufferWithSize(kTestDataSize)); |
| 266 int rv = reader->Read(buf.get(), buf->size(), base::Bind(&NeverCalled)); | 266 int rv = reader->Read(buf.get(), buf->size(), base::Bind(&NeverCalled)); |
| 267 ASSERT_TRUE(rv == net::ERR_IO_PENDING || rv >= 0); | 267 ASSERT_TRUE(rv == net::ERR_IO_PENDING || rv >= 0); |
| 268 | 268 |
| 269 // Delete immediately. | 269 // Delete immediately. |
| 270 // Should not crash; nor should NeverCalled be callback. | 270 // Should not crash; nor should NeverCalled be callback. |
| 271 reader.reset(); | 271 reader.reset(); |
| 272 } | 272 } |
| 273 | 273 |
| 274 } // namespace content | 274 } // namespace content |
| OLD | NEW |