| 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/message_loop/message_loop.h" |
| 16 #include "base/run_loop.h" | 17 #include "base/run_loop.h" |
| 17 #include "net/base/io_buffer.h" | 18 #include "net/base/io_buffer.h" |
| 18 #include "net/base/net_errors.h" | 19 #include "net/base/net_errors.h" |
| 19 #include "net/base/test_completion_callback.h" | 20 #include "net/base/test_completion_callback.h" |
| 20 #include "storage/browser/fileapi/external_mount_points.h" | 21 #include "storage/browser/fileapi/external_mount_points.h" |
| 21 #include "storage/browser/fileapi/file_system_context.h" | 22 #include "storage/browser/fileapi/file_system_context.h" |
| 22 #include "storage/browser/fileapi/file_system_file_util.h" | 23 #include "storage/browser/fileapi/file_system_file_util.h" |
| 23 #include "storage/browser/test/async_file_test_helper.h" | 24 #include "storage/browser/test/async_file_test_helper.h" |
| 24 #include "storage/browser/test/test_file_system_context.h" | 25 #include "storage/browser/test/test_file_system_context.h" |
| 25 #include "testing/gtest/include/gtest/gtest.h" | 26 #include "testing/gtest/include/gtest/gtest.h" |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 new net::IOBufferWithSize(kTestDataSize)); | 266 new net::IOBufferWithSize(kTestDataSize)); |
| 266 int rv = reader->Read(buf.get(), buf->size(), base::Bind(&NeverCalled)); | 267 int rv = reader->Read(buf.get(), buf->size(), base::Bind(&NeverCalled)); |
| 267 ASSERT_TRUE(rv == net::ERR_IO_PENDING || rv >= 0); | 268 ASSERT_TRUE(rv == net::ERR_IO_PENDING || rv >= 0); |
| 268 | 269 |
| 269 // Delete immediately. | 270 // Delete immediately. |
| 270 // Should not crash; nor should NeverCalled be callback. | 271 // Should not crash; nor should NeverCalled be callback. |
| 271 reader.reset(); | 272 reader.reset(); |
| 272 } | 273 } |
| 273 | 274 |
| 274 } // namespace content | 275 } // namespace content |
| OLD | NEW |