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

Unified Diff: net/tools/quic/end_to_end_test.cc

Issue 335533002: API changes to Write path Session on down for FEC protection. (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/quic/test_tools/quic_test_utils.cc ('k') | net/tools/quic/quic_spdy_server_stream_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/end_to_end_test.cc
diff --git a/net/tools/quic/end_to_end_test.cc b/net/tools/quic/end_to_end_test.cc
index 816f6790bbbcf6a90735221d66c9b578d5f0714f..5676fc1d4eca2ed54cacd31b1cee0c613b9d9a28 100644
--- a/net/tools/quic/end_to_end_test.cc
+++ b/net/tools/quic/end_to_end_test.cc
@@ -24,7 +24,6 @@
#include "net/quic/quic_sent_packet_manager.h"
#include "net/quic/quic_server_id.h"
#include "net/quic/test_tools/quic_connection_peer.h"
-#include "net/quic/test_tools/quic_packet_generator_peer.h"
#include "net/quic/test_tools/quic_session_peer.h"
#include "net/quic/test_tools/quic_test_utils.h"
#include "net/quic/test_tools/reliable_quic_stream_peer.h"
@@ -51,7 +50,6 @@ using base::WaitableEvent;
using net::EpollServer;
using net::test::GenerateBody;
using net::test::QuicConnectionPeer;
-using net::test::QuicPacketGeneratorPeer;
using net::test::QuicSessionPeer;
using net::test::ReliableQuicStreamPeer;
using net::test::kClientDataStreamId1;
@@ -639,6 +637,9 @@ TEST_P(EndToEndTest, DISABLED_LargePostZeroRTTFailure) {
}
TEST_P(EndToEndTest, LargePostFEC) {
+ // TODO(jri): Set FecPolicy to always protect on client_->stream_.
+ // This test currently does not do any FEC protection.
+
// Connect without packet loss to avoid issues with losing handshake packets,
// and then up the packet loss rate (b/10126687).
ASSERT_TRUE(Initialize());
@@ -647,10 +648,10 @@ TEST_P(EndToEndTest, LargePostFEC) {
client_->client()->WaitForCryptoHandshakeConfirmed();
SetPacketLossPercentage(30);
- // Turn on FEC protection.
- QuicPacketGeneratorPeer::SwitchFecProtectionOn(
- QuicConnectionPeer::GetPacketGenerator(
- client_->client()->session()->connection()), 6);
+ // Enable FEC protection.
+ QuicPacketCreator* creator = QuicConnectionPeer::GetPacketCreator(
+ client_->client()->session()->connection());
+ creator->set_max_packets_per_fec_group(6);
string body;
GenerateBody(&body, 10240);
@@ -658,7 +659,6 @@ TEST_P(EndToEndTest, LargePostFEC) {
HTTPMessage request(HttpConstants::HTTP_1_1,
HttpConstants::POST, "/foo");
request.AddBody(body, true);
-
EXPECT_EQ(kFooResponseBody, client_->SendCustomSynchronousRequest(request));
VerifyCleanConnection(true);
}
« no previous file with comments | « net/quic/test_tools/quic_test_utils.cc ('k') | net/tools/quic/quic_spdy_server_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698