| OLD | NEW | 
|    1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |    1 // Copyright (c) 2012 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 "webkit/browser/fileapi/file_system_file_stream_reader.h" |    5 #include "webkit/browser/fileapi/file_system_file_stream_reader.h" | 
|    6  |    6  | 
|    7 #include <limits> |    7 #include <limits> | 
|    8 #include <string> |    8 #include <string> | 
|    9  |    9  | 
|   10 #include "base/files/scoped_temp_dir.h" |   10 #include "base/files/scoped_temp_dir.h" | 
|   11 #include "base/memory/scoped_ptr.h" |   11 #include "base/memory/scoped_ptr.h" | 
|   12 #include "base/message_loop.h" |   12 #include "base/message_loop/message_loop.h" | 
|   13 #include "base/platform_file.h" |   13 #include "base/platform_file.h" | 
|   14 #include "net/base/io_buffer.h" |   14 #include "net/base/io_buffer.h" | 
|   15 #include "net/base/net_errors.h" |   15 #include "net/base/net_errors.h" | 
|   16 #include "net/base/test_completion_callback.h" |   16 #include "net/base/test_completion_callback.h" | 
|   17 #include "testing/gtest/include/gtest/gtest.h" |   17 #include "testing/gtest/include/gtest/gtest.h" | 
|   18 #include "webkit/browser/fileapi/external_mount_points.h" |   18 #include "webkit/browser/fileapi/external_mount_points.h" | 
|   19 #include "webkit/browser/fileapi/file_system_context.h" |   19 #include "webkit/browser/fileapi/file_system_context.h" | 
|   20 #include "webkit/browser/fileapi/file_system_file_util.h" |   20 #include "webkit/browser/fileapi/file_system_file_util.h" | 
|   21 #include "webkit/browser/fileapi/file_system_operation_context.h" |   21 #include "webkit/browser/fileapi/file_system_operation_context.h" | 
|   22 #include "webkit/browser/fileapi/mock_file_system_context.h" |   22 #include "webkit/browser/fileapi/mock_file_system_context.h" | 
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  274       new net::IOBufferWithSize(kTestDataSize)); |  274       new net::IOBufferWithSize(kTestDataSize)); | 
|  275   int rv = reader->Read(buf.get(), buf->size(), base::Bind(&NeverCalled)); |  275   int rv = reader->Read(buf.get(), buf->size(), base::Bind(&NeverCalled)); | 
|  276   ASSERT_TRUE(rv == net::ERR_IO_PENDING || rv >= 0); |  276   ASSERT_TRUE(rv == net::ERR_IO_PENDING || rv >= 0); | 
|  277  |  277  | 
|  278   // Delete immediately. |  278   // Delete immediately. | 
|  279   // Should not crash; nor should NeverCalled be callback. |  279   // Should not crash; nor should NeverCalled be callback. | 
|  280   reader.reset(); |  280   reader.reset(); | 
|  281 } |  281 } | 
|  282  |  282  | 
|  283 }  // namespace fileapi |  283 }  // namespace fileapi | 
| OLD | NEW |