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 "net/base/file_stream.h" | 5 #include "net/base/file_stream.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
11 #include "base/path_service.h" | 11 #include "base/path_service.h" |
12 #include "base/platform_file.h" | 12 #include "base/platform_file.h" |
13 #include "base/synchronization/waitable_event.h" | 13 #include "base/synchronization/waitable_event.h" |
14 #include "base/test/test_timeouts.h" | 14 #include "base/test/test_timeouts.h" |
15 #include "net/base/capturing_net_log.h" | 15 #include "net/base/capturing_net_log.h" |
16 #include "net/base/io_buffer.h" | 16 #include "net/base/io_buffer.h" |
17 #include "net/base/net_errors.h" | 17 #include "net/base/net_errors.h" |
18 #include "net/base/test_completion_callback.h" | 18 #include "net/base/test_completion_callback.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
20 #include "testing/platform_test.h" | 20 #include "testing/platform_test.h" |
(...skipping 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1073 scoped_refptr<IOBuffer> buf = new WrappedIOBuffer(NULL); | 1073 scoped_refptr<IOBuffer> buf = new WrappedIOBuffer(NULL); |
1074 rv = stream->Read(buf.get(), 1, callback.callback()); | 1074 rv = stream->Read(buf.get(), 1, callback.callback()); |
1075 if (rv == ERR_IO_PENDING) | 1075 if (rv == ERR_IO_PENDING) |
1076 rv = callback.WaitForResult(); | 1076 rv = callback.WaitForResult(); |
1077 EXPECT_LT(rv, 0); | 1077 EXPECT_LT(rv, 0); |
1078 } | 1078 } |
1079 | 1079 |
1080 } // namespace | 1080 } // namespace |
1081 | 1081 |
1082 } // namespace net | 1082 } // namespace net |
OLD | NEW |