OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "net/spdy/spdy_read_queue.h" | 5 #include "net/spdy/chromium/spdy_read_queue.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cstddef> | 8 #include <cstddef> |
9 #include <memory> | 9 #include <memory> |
10 #include <utility> | 10 #include <utility> |
11 | 11 |
12 #include "base/bind.h" | 12 #include "base/bind.h" |
13 #include "base/memory/ptr_util.h" | 13 #include "base/memory/ptr_util.h" |
14 #include "base/stl_util.h" | 14 #include "base/stl_util.h" |
| 15 #include "net/spdy/chromium/spdy_buffer.h" |
15 #include "net/spdy/platform/api/spdy_string.h" | 16 #include "net/spdy/platform/api/spdy_string.h" |
16 #include "net/spdy/spdy_buffer.h" | |
17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
18 | 18 |
19 namespace net { | 19 namespace net { |
20 namespace test { | 20 namespace test { |
21 namespace { | 21 namespace { |
22 | 22 |
23 const char kData[] = "SPDY read queue test data.\0Some more data."; | 23 const char kData[] = "SPDY read queue test data.\0Some more data."; |
24 const size_t kDataSize = arraysize(kData); | 24 const size_t kDataSize = arraysize(kData); |
25 | 25 |
26 // Enqueues |data| onto |queue| in chunks of at most |max_buffer_size| | 26 // Enqueues |data| onto |queue| in chunks of at most |max_buffer_size| |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 | 131 |
132 read_queue.Clear(); | 132 read_queue.Clear(); |
133 | 133 |
134 EXPECT_TRUE(discarded); | 134 EXPECT_TRUE(discarded); |
135 EXPECT_EQ(kDataSize, discarded_bytes); | 135 EXPECT_EQ(kDataSize, discarded_bytes); |
136 EXPECT_TRUE(read_queue.IsEmpty()); | 136 EXPECT_TRUE(read_queue.IsEmpty()); |
137 } | 137 } |
138 | 138 |
139 } // namespace test | 139 } // namespace test |
140 } // namespace net | 140 } // namespace net |
OLD | NEW |