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/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 4631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4642 connection_.SendStreamDataWithString(3, "", 0, !kFin, delegate.get()), | 4642 connection_.SendStreamDataWithString(3, "", 0, !kFin, delegate.get()), |
4643 "Attempt to send empty stream frame"); | 4643 "Attempt to send empty stream frame"); |
4644 } | 4644 } |
4645 | 4645 |
4646 TEST_P(QuicConnectionTest, FecSendPolicyReceivedConnectionOption) { | 4646 TEST_P(QuicConnectionTest, FecSendPolicyReceivedConnectionOption) { |
4647 // Test sending SetReceivedConnectionOptions when FEC send policy is | 4647 // Test sending SetReceivedConnectionOptions when FEC send policy is |
4648 // FEC_ANY_TRIGGER. | 4648 // FEC_ANY_TRIGGER. |
4649 if (GetParam().fec_send_policy == FEC_ALARM_TRIGGER) { | 4649 if (GetParam().fec_send_policy == FEC_ALARM_TRIGGER) { |
4650 return; | 4650 return; |
4651 } | 4651 } |
4652 ValueRestore<bool> old_flag(&FLAGS_quic_send_fec_packet_only_on_fec_alarm, | |
4653 true); | |
4654 connection_.set_perspective(Perspective::IS_SERVER); | 4652 connection_.set_perspective(Perspective::IS_SERVER); |
4655 | 4653 |
4656 // Test ReceivedConnectionOptions. | 4654 // Test ReceivedConnectionOptions. |
4657 EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _)); | 4655 EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _)); |
4658 QuicConfig config; | 4656 QuicConfig config; |
4659 QuicTagVector copt; | 4657 QuicTagVector copt; |
4660 copt.push_back(kFSPA); | 4658 copt.push_back(kFSPA); |
4661 QuicConfigPeer::SetReceivedConnectionOptions(&config, copt); | 4659 QuicConfigPeer::SetReceivedConnectionOptions(&config, copt); |
4662 EXPECT_EQ(FEC_ANY_TRIGGER, generator_->fec_send_policy()); | 4660 EXPECT_EQ(FEC_ANY_TRIGGER, generator_->fec_send_policy()); |
4663 connection_.SetFromConfig(config); | 4661 connection_.SetFromConfig(config); |
4664 EXPECT_EQ(FEC_ALARM_TRIGGER, generator_->fec_send_policy()); | 4662 EXPECT_EQ(FEC_ALARM_TRIGGER, generator_->fec_send_policy()); |
4665 } | 4663 } |
4666 | 4664 |
4667 } // namespace | 4665 } // namespace |
4668 } // namespace test | 4666 } // namespace test |
4669 } // namespace net | 4667 } // namespace net |
OLD | NEW |