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/spdy/spdy_session.h" | 5 #include "net/spdy/spdy_session.h" |
6 | 6 |
7 #include "net/base/host_cache.h" | 7 #include "net/base/host_cache.h" |
8 #include "net/base/ip_endpoint.h" | 8 #include "net/base/ip_endpoint.h" |
9 #include "net/base/net_log_unittest.h" | 9 #include "net/base/net_log_unittest.h" |
10 #include "net/spdy/spdy_io_buffer.h" | 10 #include "net/spdy/spdy_io_buffer.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 | 56 |
57 virtual void OnDataSent(int length) { | 57 virtual void OnDataSent(int length) { |
58 } | 58 } |
59 | 59 |
60 virtual void OnClose(int status) { | 60 virtual void OnClose(int status) { |
61 CompletionCallback callback = callback_; | 61 CompletionCallback callback = callback_; |
62 callback_.Reset(); | 62 callback_.Reset(); |
63 callback.Run(OK); | 63 callback.Run(OK); |
64 } | 64 } |
65 | 65 |
66 virtual void set_chunk_callback(net::ChunkCallback *) {} | |
67 | |
68 private: | 66 private: |
69 CompletionCallback callback_; | 67 CompletionCallback callback_; |
70 }; | 68 }; |
71 | 69 |
72 // Test the SpdyIOBuffer class. | 70 // Test the SpdyIOBuffer class. |
73 TEST_F(SpdySessionSpdy3Test, SpdyIOBuffer) { | 71 TEST_F(SpdySessionSpdy3Test, SpdyIOBuffer) { |
74 std::priority_queue<SpdyIOBuffer> queue_; | 72 std::priority_queue<SpdyIOBuffer> queue_; |
75 const size_t kQueueSize = 100; | 73 const size_t kQueueSize = 100; |
76 | 74 |
77 // Insert items with random priority and increasing buffer size | 75 // Insert items with random priority and increasing buffer size |
(...skipping 1288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1366 EXPECT_EQ(3u, spdy_stream2->stream_id()); | 1364 EXPECT_EQ(3u, spdy_stream2->stream_id()); |
1367 | 1365 |
1368 spdy_stream1->Cancel(); | 1366 spdy_stream1->Cancel(); |
1369 spdy_stream1 = NULL; | 1367 spdy_stream1 = NULL; |
1370 | 1368 |
1371 spdy_stream2->Cancel(); | 1369 spdy_stream2->Cancel(); |
1372 spdy_stream2 = NULL; | 1370 spdy_stream2 = NULL; |
1373 } | 1371 } |
1374 | 1372 |
1375 } // namespace net | 1373 } // namespace net |
OLD | NEW |