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_connection.h" | 5 #include "net/quic/quic_connection.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
10 #include "net/base/net_errors.h" | 10 #include "net/base/net_errors.h" |
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
605 QuicPacketHeader revived_header() const { | 605 QuicPacketHeader revived_header() const { |
606 return revived_header_; | 606 return revived_header_; |
607 } | 607 } |
608 | 608 |
609 private: | 609 private: |
610 QuicPacketHeader revived_header_; | 610 QuicPacketHeader revived_header_; |
611 }; | 611 }; |
612 | 612 |
613 class MockPacketWriterFactory : public QuicConnection::PacketWriterFactory { | 613 class MockPacketWriterFactory : public QuicConnection::PacketWriterFactory { |
614 public: | 614 public: |
615 MockPacketWriterFactory(QuicPacketWriter* writer) { | 615 explicit MockPacketWriterFactory(QuicPacketWriter* writer) { |
616 ON_CALL(*this, Create(_)).WillByDefault(Return(writer)); | 616 ON_CALL(*this, Create(_)).WillByDefault(Return(writer)); |
617 } | 617 } |
618 ~MockPacketWriterFactory() override {} | 618 ~MockPacketWriterFactory() override {} |
619 | 619 |
620 MOCK_CONST_METHOD1(Create, QuicPacketWriter*(QuicConnection* connection)); | 620 MOCK_CONST_METHOD1(Create, QuicPacketWriter*(QuicConnection* connection)); |
621 }; | 621 }; |
622 | 622 |
623 class QuicConnectionTest : public ::testing::TestWithParam<QuicVersion> { | 623 class QuicConnectionTest : public ::testing::TestWithParam<QuicVersion> { |
624 protected: | 624 protected: |
625 QuicConnectionTest() | 625 QuicConnectionTest() |
(...skipping 3629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4255 QuicBlockedFrame blocked; | 4255 QuicBlockedFrame blocked; |
4256 blocked.stream_id = 3; | 4256 blocked.stream_id = 3; |
4257 EXPECT_CALL(visitor_, OnBlockedFrames(_)); | 4257 EXPECT_CALL(visitor_, OnBlockedFrames(_)); |
4258 ProcessFramePacket(QuicFrame(&blocked)); | 4258 ProcessFramePacket(QuicFrame(&blocked)); |
4259 EXPECT_TRUE(ack_alarm->IsSet()); | 4259 EXPECT_TRUE(ack_alarm->IsSet()); |
4260 } | 4260 } |
4261 | 4261 |
4262 } // namespace | 4262 } // namespace |
4263 } // namespace test | 4263 } // namespace test |
4264 } // namespace net | 4264 } // namespace net |
OLD | NEW |