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 "content/browser/byte_stream.h" | 5 #include "content/browser/byte_stream.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <deque> | 9 #include <deque> |
10 #include <limits> | 10 #include <limits> |
11 | 11 |
12 #include "base/bind.h" | 12 #include "base/bind.h" |
13 #include "base/callback.h" | 13 #include "base/callback.h" |
14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
| 15 #include "base/message_loop/message_loop.h" |
15 #include "base/run_loop.h" | 16 #include "base/run_loop.h" |
16 #include "base/test/test_simple_task_runner.h" | 17 #include "base/test/test_simple_task_runner.h" |
17 #include "net/base/io_buffer.h" | 18 #include "net/base/io_buffer.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
19 | 20 |
20 namespace content { | 21 namespace content { |
21 namespace { | 22 namespace { |
22 | 23 |
23 void CountCallbacks(int* counter) { | 24 void CountCallbacks(int* counter) { |
24 ++*counter; | 25 ++*counter; |
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
591 | 592 |
592 // The first write is below PostToPeer threshold. We shouldn't get anything | 593 // The first write is below PostToPeer threshold. We shouldn't get anything |
593 // from the output. | 594 // from the output. |
594 scoped_refptr<net::IOBuffer> output_io_buffer; | 595 scoped_refptr<net::IOBuffer> output_io_buffer; |
595 size_t output_length; | 596 size_t output_length; |
596 EXPECT_EQ(ByteStreamReader::STREAM_EMPTY, | 597 EXPECT_EQ(ByteStreamReader::STREAM_EMPTY, |
597 byte_stream_output->Read(&output_io_buffer, &output_length)); | 598 byte_stream_output->Read(&output_io_buffer, &output_length)); |
598 } | 599 } |
599 | 600 |
600 } // namespace content | 601 } // namespace content |
OLD | NEW |