Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(232)

Unified Diff: net/quic/quic_connection_test.cc

Issue 326403006: Enables PacketGenerator's use of PacketCreator's FEC primitives. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/net.gypi ('k') | net/quic/quic_packet_creator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_connection_test.cc
diff --git a/net/quic/quic_connection_test.cc b/net/quic/quic_connection_test.cc
index 6707c4ad1d024ef74b533eba827f41c3bb0384b6..b3b661aae023e629565e280418a90aaf532eee8c 100644
--- a/net/quic/quic_connection_test.cc
+++ b/net/quic/quic_connection_test.cc
@@ -22,6 +22,7 @@
#include "net/quic/test_tools/quic_connection_peer.h"
#include "net/quic/test_tools/quic_framer_peer.h"
#include "net/quic/test_tools/quic_packet_creator_peer.h"
+#include "net/quic/test_tools/quic_packet_generator_peer.h"
#include "net/quic/test_tools/quic_sent_packet_manager_peer.h"
#include "net/quic/test_tools/quic_test_utils.h"
#include "net/quic/test_tools/simple_quic_framer.h"
@@ -1460,7 +1461,8 @@ TEST_P(QuicConnectionTest, FECSending) {
creator->set_max_packet_length(length);
// And send FEC every two packets.
- EXPECT_TRUE(QuicPacketCreatorPeer::SwitchFecProtectionOn(creator, 2));
+ QuicPacketGeneratorPeer::SwitchFecProtectionOn(
+ QuicConnectionPeer::GetPacketGenerator(&connection_), 2);
// Send 4 data packets and 2 FEC packets.
EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(6);
@@ -1482,7 +1484,8 @@ TEST_P(QuicConnectionTest, FECQueueing) {
IN_FEC_GROUP, &payload_length);
creator->set_max_packet_length(length);
// And send FEC every two packets.
- EXPECT_TRUE(QuicPacketCreatorPeer::SwitchFecProtectionOn(creator, 2));
+ QuicPacketGeneratorPeer::SwitchFecProtectionOn(
+ QuicConnectionPeer::GetPacketGenerator(&connection_), 1);
EXPECT_EQ(0u, connection_.NumQueuedPackets());
BlockOnNextWrite();
@@ -1495,8 +1498,8 @@ TEST_P(QuicConnectionTest, FECQueueing) {
}
TEST_P(QuicConnectionTest, AbandonFECFromCongestionWindow) {
- EXPECT_TRUE(QuicPacketCreatorPeer::SwitchFecProtectionOn(
- QuicConnectionPeer::GetPacketCreator(&connection_), 1));
+ QuicPacketGeneratorPeer::SwitchFecProtectionOn(
+ QuicConnectionPeer::GetPacketGenerator(&connection_), 1);
// 1 Data and 1 FEC packet.
EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(2);
@@ -1515,8 +1518,8 @@ TEST_P(QuicConnectionTest, AbandonFECFromCongestionWindow) {
TEST_P(QuicConnectionTest, DontAbandonAckedFEC) {
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
- EXPECT_TRUE(QuicPacketCreatorPeer::SwitchFecProtectionOn(
- QuicConnectionPeer::GetPacketCreator(&connection_), 1));
+ QuicPacketGeneratorPeer::SwitchFecProtectionOn(
+ QuicConnectionPeer::GetPacketGenerator(&connection_), 1);
// 1 Data and 1 FEC packet.
EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(6);
@@ -1543,8 +1546,8 @@ TEST_P(QuicConnectionTest, DontAbandonAckedFEC) {
TEST_P(QuicConnectionTest, AbandonAllFEC) {
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
- EXPECT_TRUE(QuicPacketCreatorPeer::SwitchFecProtectionOn(
- QuicConnectionPeer::GetPacketCreator(&connection_), 1));
+ QuicPacketGeneratorPeer::SwitchFecProtectionOn(
+ QuicConnectionPeer::GetPacketGenerator(&connection_), 1);
// 1 Data and 1 FEC packet.
EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(6);
@@ -1660,8 +1663,8 @@ TEST_P(QuicConnectionTest, FramePackingCryptoThenNonCrypto) {
TEST_P(QuicConnectionTest, FramePackingFEC) {
// Enable fec.
- EXPECT_TRUE(QuicPacketCreatorPeer::SwitchFecProtectionOn(
- QuicConnectionPeer::GetPacketCreator(&connection_), 6));
+ QuicPacketGeneratorPeer::SwitchFecProtectionOn(
+ QuicConnectionPeer::GetPacketGenerator(&connection_), 6);
CongestionBlockWrites();
« no previous file with comments | « net/net.gypi ('k') | net/quic/quic_packet_creator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698