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/quic/quic_packet_generator.h" | 5 #include "net/quic/quic_packet_generator.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "net/quic/crypto/crypto_protocol.h" | 9 #include "net/quic/crypto/crypto_protocol.h" |
10 #include "net/quic/crypto/null_encrypter.h" | 10 #include "net/quic/crypto/null_encrypter.h" |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 SerializedPacket packet_; | 224 SerializedPacket packet_; |
225 SerializedPacket packet2_; | 225 SerializedPacket packet2_; |
226 SerializedPacket packet3_; | 226 SerializedPacket packet3_; |
227 SerializedPacket packet4_; | 227 SerializedPacket packet4_; |
228 SerializedPacket packet5_; | 228 SerializedPacket packet5_; |
229 | 229 |
230 private: | 230 private: |
231 scoped_ptr<char[]> data_array_; | 231 scoped_ptr<char[]> data_array_; |
232 }; | 232 }; |
233 | 233 |
234 class MockDebugDelegate : public QuicPacketGenerator::DebugDelegateInterface { | 234 class MockDebugDelegate : public QuicPacketGenerator::DebugDelegate { |
235 public: | 235 public: |
236 MOCK_METHOD1(OnFrameAddedToPacket, | 236 MOCK_METHOD1(OnFrameAddedToPacket, |
237 void(const QuicFrame&)); | 237 void(const QuicFrame&)); |
238 }; | 238 }; |
239 | 239 |
240 TEST_F(QuicPacketGeneratorTest, ShouldSendAck_NotWritable) { | 240 TEST_F(QuicPacketGeneratorTest, ShouldSendAck_NotWritable) { |
241 delegate_.SetCanNotWrite(); | 241 delegate_.SetCanNotWrite(); |
242 | 242 |
243 generator_.SetShouldSendAck(false, false); | 243 generator_.SetShouldSendAck(false, false); |
244 EXPECT_TRUE(generator_.HasQueuedFrames()); | 244 EXPECT_TRUE(generator_.HasQueuedFrames()); |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
630 | 630 |
631 // The second should have the remainder of the stream data. | 631 // The second should have the remainder of the stream data. |
632 PacketContents contents2; | 632 PacketContents contents2; |
633 contents2.num_goaway_frames = 1; | 633 contents2.num_goaway_frames = 1; |
634 contents2.num_stream_frames = 1; | 634 contents2.num_stream_frames = 1; |
635 CheckPacketContains(contents2, packet2_); | 635 CheckPacketContains(contents2, packet2_); |
636 } | 636 } |
637 | 637 |
638 } // namespace test | 638 } // namespace test |
639 } // namespace net | 639 } // namespace net |
OLD | NEW |