OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/quic/bidirectional_stream_quic_impl.h" | 5 #include "net/quic/bidirectional_stream_quic_impl.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 namespace test { | 44 namespace test { |
45 | 45 |
46 namespace { | 46 namespace { |
47 | 47 |
48 const char kUploadData[] = "Really nifty data!"; | 48 const char kUploadData[] = "Really nifty data!"; |
49 const char kDefaultServerHostName[] = "www.google.com"; | 49 const char kDefaultServerHostName[] = "www.google.com"; |
50 const uint16_t kDefaultServerPort = 80; | 50 const uint16_t kDefaultServerPort = 80; |
51 // Size of the buffer to be allocated for each read. | 51 // Size of the buffer to be allocated for each read. |
52 const size_t kReadBufferSize = 4096; | 52 const size_t kReadBufferSize = 4096; |
53 | 53 |
54 class TestDelegateBase : public BidirectionalStreamJob::Delegate { | 54 class TestDelegateBase : public BidirectionalStreamImpl::Delegate { |
55 public: | 55 public: |
56 TestDelegateBase(IOBuffer* read_buf, int read_buf_len) | 56 TestDelegateBase(IOBuffer* read_buf, int read_buf_len) |
57 : TestDelegateBase(read_buf, | 57 : TestDelegateBase(read_buf, |
58 read_buf_len, | 58 read_buf_len, |
59 make_scoped_ptr(new base::Timer(false, false))) {} | 59 make_scoped_ptr(new base::Timer(false, false))) {} |
60 | 60 |
61 TestDelegateBase(IOBuffer* read_buf, | 61 TestDelegateBase(IOBuffer* read_buf, |
62 int read_buf_len, | 62 int read_buf_len, |
63 scoped_ptr<base::Timer> timer) | 63 scoped_ptr<base::Timer> timer) |
64 : read_buf_(read_buf), | 64 : read_buf_(read_buf), |
(...skipping 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1129 | 1129 |
1130 base::MessageLoop::current()->RunUntilIdle(); | 1130 base::MessageLoop::current()->RunUntilIdle(); |
1131 | 1131 |
1132 EXPECT_EQ(1, delegate->on_data_read_count()); | 1132 EXPECT_EQ(1, delegate->on_data_read_count()); |
1133 EXPECT_EQ(0, delegate->on_data_sent_count()); | 1133 EXPECT_EQ(0, delegate->on_data_sent_count()); |
1134 } | 1134 } |
1135 | 1135 |
1136 } // namespace test | 1136 } // namespace test |
1137 | 1137 |
1138 } // namespace net | 1138 } // namespace net |
OLD | NEW |