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

Side by Side Diff: net/tools/quic/end_to_end_test.cc

Issue 1784903003: Remove FEC from send path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@114770052
Patch Set: Restore accidentally removed OnRttChanged call Created 4 years, 9 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 unified diff | Download patch
OLDNEW
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 <stddef.h> 5 #include <stddef.h>
6 #include <sys/epoll.h> 6 #include <sys/epoll.h>
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after
966 server_thread_->Pause(); 966 server_thread_->Pause();
967 EXPECT_TRUE(server_config_.HasReceivedConnectionOptions()); 967 EXPECT_TRUE(server_config_.HasReceivedConnectionOptions());
968 EXPECT_TRUE( 968 EXPECT_TRUE(
969 ContainsQuicTag(server_config_.ReceivedConnectionOptions(), kTBBR)); 969 ContainsQuicTag(server_config_.ReceivedConnectionOptions(), kTBBR));
970 EXPECT_TRUE( 970 EXPECT_TRUE(
971 ContainsQuicTag(server_config_.ReceivedConnectionOptions(), kIW10)); 971 ContainsQuicTag(server_config_.ReceivedConnectionOptions(), kIW10));
972 EXPECT_TRUE( 972 EXPECT_TRUE(
973 ContainsQuicTag(server_config_.ReceivedConnectionOptions(), kPRST)); 973 ContainsQuicTag(server_config_.ReceivedConnectionOptions(), kPRST));
974 } 974 }
975 975
976 TEST_P(EndToEndTest, CorrectlyConfiguredFec) {
977 ASSERT_TRUE(Initialize());
978 client_->client()->WaitForCryptoHandshakeConfirmed();
979 server_thread_->WaitForCryptoHandshakeConfirmed();
980
981 FecPolicy expected_policy = FEC_PROTECT_OPTIONAL;
982
983 // Verify that server's FEC configuration is correct.
984 server_thread_->Pause();
985 QuicDispatcher* dispatcher =
986 QuicServerPeer::GetDispatcher(server_thread_->server());
987 ASSERT_EQ(1u, dispatcher->session_map().size());
988 QuicSpdySession* session = dispatcher->session_map().begin()->second;
989 EXPECT_EQ(expected_policy,
990 QuicSpdySessionPeer::GetHeadersStream(session)->fec_policy());
991 server_thread_->Resume();
992
993 // Verify that client's FEC configuration is correct.
994 EXPECT_EQ(expected_policy,
995 QuicSpdySessionPeer::GetHeadersStream(client_->client()->session())
996 ->fec_policy());
997 EXPECT_EQ(expected_policy, client_->GetOrCreateStream()->fec_policy());
998 }
999
1000 TEST_P(EndToEndTest, LargePostSmallBandwidthLargeBuffer) { 976 TEST_P(EndToEndTest, LargePostSmallBandwidthLargeBuffer) {
1001 ASSERT_TRUE(Initialize()); 977 ASSERT_TRUE(Initialize());
1002 SetPacketSendDelay(QuicTime::Delta::FromMicroseconds(1)); 978 SetPacketSendDelay(QuicTime::Delta::FromMicroseconds(1));
1003 // 256KB per second with a 256KB buffer from server to client. Wireless 979 // 256KB per second with a 256KB buffer from server to client. Wireless
1004 // clients commonly have larger buffers, but our max CWND is 200. 980 // clients commonly have larger buffers, but our max CWND is 200.
1005 server_writer_->set_max_bandwidth_and_buffer_size( 981 server_writer_->set_max_bandwidth_and_buffer_size(
1006 QuicBandwidth::FromBytesPerSecond(256 * 1024), 256 * 1024); 982 QuicBandwidth::FromBytesPerSecond(256 * 1024), 256 * 1024);
1007 983
1008 client_->client()->WaitForCryptoHandshakeConfirmed(); 984 client_->client()->WaitForCryptoHandshakeConfirmed();
1009 985
(...skipping 1394 matching lines...) Expand 10 before | Expand all | Expand 10 after
2404 // sending requests for them. 2380 // sending requests for them.
2405 EXPECT_EQ(1u, client_->num_requests()); 2381 EXPECT_EQ(1u, client_->num_requests());
2406 // Including response to original request, 12 responses in total were 2382 // Including response to original request, 12 responses in total were
2407 // recieved. 2383 // recieved.
2408 EXPECT_EQ(12u, client_->num_responses()); 2384 EXPECT_EQ(12u, client_->num_responses());
2409 } 2385 }
2410 2386
2411 } // namespace 2387 } // namespace
2412 } // namespace test 2388 } // namespace test
2413 } // namespace net 2389 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/test_tools/reliable_quic_stream_peer.cc ('k') | net/tools/quic/quic_client_session_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698