| 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 <ostream> | 7 #include <ostream> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 687 factory_, | 687 factory_, |
| 688 Perspective::IS_CLIENT, | 688 Perspective::IS_CLIENT, |
| 689 version()), | 689 version()), |
| 690 creator_(QuicConnectionPeer::GetPacketCreator(&connection_)), | 690 creator_(QuicConnectionPeer::GetPacketCreator(&connection_)), |
| 691 generator_(QuicConnectionPeer::GetPacketGenerator(&connection_)), | 691 generator_(QuicConnectionPeer::GetPacketGenerator(&connection_)), |
| 692 manager_(QuicConnectionPeer::GetSentPacketManager(&connection_)), | 692 manager_(QuicConnectionPeer::GetSentPacketManager(&connection_)), |
| 693 frame1_(1, false, 0, StringPiece(data1)), | 693 frame1_(1, false, 0, StringPiece(data1)), |
| 694 frame2_(1, false, 3, StringPiece(data2)), | 694 frame2_(1, false, 3, StringPiece(data2)), |
| 695 packet_number_length_(PACKET_6BYTE_PACKET_NUMBER), | 695 packet_number_length_(PACKET_6BYTE_PACKET_NUMBER), |
| 696 connection_id_length_(PACKET_8BYTE_CONNECTION_ID) { | 696 connection_id_length_(PACKET_8BYTE_CONNECTION_ID) { |
| 697 FLAGS_quic_always_log_bugs_for_tests = true; |
| 697 connection_.set_visitor(&visitor_); | 698 connection_.set_visitor(&visitor_); |
| 698 connection_.SetSendAlgorithm(send_algorithm_); | 699 connection_.SetSendAlgorithm(send_algorithm_); |
| 699 connection_.SetLossAlgorithm(loss_algorithm_); | 700 connection_.SetLossAlgorithm(loss_algorithm_); |
| 700 framer_.set_received_entropy_calculator(&entropy_calculator_); | 701 framer_.set_received_entropy_calculator(&entropy_calculator_); |
| 701 generator_->set_fec_send_policy(GetParam().fec_send_policy); | 702 generator_->set_fec_send_policy(GetParam().fec_send_policy); |
| 702 EXPECT_CALL(*send_algorithm_, TimeUntilSend(_, _, _)) | 703 EXPECT_CALL(*send_algorithm_, TimeUntilSend(_, _, _)) |
| 703 .WillRepeatedly(Return(QuicTime::Delta::Zero())); | 704 .WillRepeatedly(Return(QuicTime::Delta::Zero())); |
| 704 EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)) | 705 EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)) |
| 705 .Times(AnyNumber()); | 706 .Times(AnyNumber()); |
| 706 EXPECT_CALL(*send_algorithm_, RetransmissionDelay()) | 707 EXPECT_CALL(*send_algorithm_, RetransmissionDelay()) |
| (...skipping 4859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5566 EXPECT_CALL(visitor_, | 5567 EXPECT_CALL(visitor_, |
| 5567 OnConnectionClosed(QUIC_UNENCRYPTED_STREAM_DATA, false)); | 5568 OnConnectionClosed(QUIC_UNENCRYPTED_STREAM_DATA, false)); |
| 5568 EXPECT_DFATAL(connection_.SendStreamDataWithString(3, "", 0, kFin, nullptr), | 5569 EXPECT_DFATAL(connection_.SendStreamDataWithString(3, "", 0, kFin, nullptr), |
| 5569 "Cannot send stream data without encryption."); | 5570 "Cannot send stream data without encryption."); |
| 5570 EXPECT_FALSE(connection_.connected()); | 5571 EXPECT_FALSE(connection_.connected()); |
| 5571 } | 5572 } |
| 5572 | 5573 |
| 5573 } // namespace | 5574 } // namespace |
| 5574 } // namespace test | 5575 } // namespace test |
| 5575 } // namespace net | 5576 } // namespace net |
| OLD | NEW |