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

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

Issue 2850573002: Landing Recent QUIC changes until 3:35 PM, Apr 26, 2017 UTC-4 (Closed)
Patch Set: Remove Disconnect from ~QuicTestClient Created 3 years, 8 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/tools/quic/quic_dispatcher.cc ('k') | net/tools/quic/quic_time_wait_list_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_dispatcher_test.cc
diff --git a/net/tools/quic/quic_dispatcher_test.cc b/net/tools/quic/quic_dispatcher_test.cc
index 2b582dded4d61840e76574d9d59224b42d101126..d4bb849ae76589c74b683a40ea9b79f3c2378b97 100644
--- a/net/tools/quic/quic_dispatcher_test.cc
+++ b/net/tools/quic/quic_dispatcher_test.cc
@@ -428,7 +428,6 @@ TEST_F(QuicDispatcherTest, TimeWaitListManager) {
packet.public_header.connection_id = connection_id;
packet.public_header.reset_flag = true;
packet.public_header.version_flag = false;
- packet.rejected_packet_number = 19191;
packet.nonce_proof = 132232;
std::unique_ptr<QuicEncryptedPacket> encrypted(
QuicFramer::BuildPublicResetPacket(packet));
@@ -450,8 +449,7 @@ TEST_F(QuicDispatcherTest, TimeWaitListManager) {
// Dispatcher forwards subsequent packets for this connection_id to the time
// wait list manager.
- EXPECT_CALL(*time_wait_list_manager_,
- ProcessPacket(_, _, connection_id, _, _))
+ EXPECT_CALL(*time_wait_list_manager_, ProcessPacket(_, _, connection_id))
.Times(1);
EXPECT_CALL(*time_wait_list_manager_, AddConnectionIdToTimeWait(_, _, _, _))
.Times(0);
@@ -466,8 +464,7 @@ TEST_F(QuicDispatcherTest, NoVersionPacketToTimeWaitListManager) {
// Dispatcher forwards all packets for this connection_id to the time wait
// list manager.
EXPECT_CALL(*dispatcher_, CreateQuicSession(_, _)).Times(0);
- EXPECT_CALL(*time_wait_list_manager_,
- ProcessPacket(_, _, connection_id, _, _))
+ EXPECT_CALL(*time_wait_list_manager_, ProcessPacket(_, _, connection_id))
.Times(1);
EXPECT_CALL(*time_wait_list_manager_, AddConnectionIdToTimeWait(_, _, _, _))
.Times(1);
@@ -482,7 +479,7 @@ TEST_F(QuicDispatcherTest, ProcessPacketWithZeroPort) {
// dispatcher_ should drop this packet.
EXPECT_CALL(*dispatcher_, CreateQuicSession(1, client_address)).Times(0);
- EXPECT_CALL(*time_wait_list_manager_, ProcessPacket(_, _, _, _, _)).Times(0);
+ EXPECT_CALL(*time_wait_list_manager_, ProcessPacket(_, _, _)).Times(0);
EXPECT_CALL(*time_wait_list_manager_, AddConnectionIdToTimeWait(_, _, _, _))
.Times(0);
ProcessPacket(client_address, 1, true, SerializeCHLO());
@@ -519,8 +516,7 @@ TEST_F(QuicDispatcherTest, TooBigSeqNoPacketToTimeWaitListManager) {
// Dispatcher forwards this packet for this connection_id to the time wait
// list manager.
EXPECT_CALL(*dispatcher_, CreateQuicSession(_, _)).Times(0);
- EXPECT_CALL(*time_wait_list_manager_,
- ProcessPacket(_, _, connection_id, _, _))
+ EXPECT_CALL(*time_wait_list_manager_, ProcessPacket(_, _, connection_id))
.Times(1);
EXPECT_CALL(*time_wait_list_manager_, AddConnectionIdToTimeWait(_, _, _, _))
.Times(1);
@@ -535,7 +531,7 @@ TEST_F(QuicDispatcherTest, SupportedVersionsChangeInFlight) {
static_assert(arraysize(kSupportedQuicVersions) == 5u,
"Supported versions out of sync");
FLAGS_quic_reloadable_flag_quic_enable_version_38 = true;
- FLAGS_quic_enable_version_39 = true;
+ FLAGS_quic_reloadable_flag_quic_enable_version_39 = true;
QuicSocketAddress client_address(QuicIpAddress::Loopback4(), 1);
server_address_ = QuicSocketAddress(QuicIpAddress::Any4(), 5);
QuicConnectionId connection_id = 1;
@@ -575,7 +571,7 @@ TEST_F(QuicDispatcherTest, SupportedVersionsChangeInFlight) {
PACKET_6BYTE_PACKET_NUMBER, 1);
// Turn off version 39.
- FLAGS_quic_enable_version_39 = false;
+ FLAGS_quic_reloadable_flag_quic_enable_version_39 = false;
++connection_id;
EXPECT_CALL(*dispatcher_, CreateQuicSession(connection_id, client_address))
.Times(0);
@@ -584,7 +580,7 @@ TEST_F(QuicDispatcherTest, SupportedVersionsChangeInFlight) {
PACKET_6BYTE_PACKET_NUMBER, 1);
// Turn on version 39.
- FLAGS_quic_enable_version_39 = true;
+ FLAGS_quic_reloadable_flag_quic_enable_version_39 = true;
++connection_id;
EXPECT_CALL(*dispatcher_, CreateQuicSession(connection_id, client_address))
.WillOnce(testing::Return(CreateSession(
@@ -753,8 +749,7 @@ TEST_P(QuicDispatcherStatelessRejectTest, ParameterizedBasicTest) {
time_wait_list_manager_->IsConnectionIdInTimeWait(connection_id));
if (ExpectStatelessReject()) {
// The second packet will be processed on the time-wait list.
- EXPECT_CALL(*time_wait_list_manager_,
- ProcessPacket(_, _, connection_id, _, _))
+ EXPECT_CALL(*time_wait_list_manager_, ProcessPacket(_, _, connection_id))
.Times(1);
} else {
// The second packet will trigger a packet-validation
@@ -865,8 +860,7 @@ TEST_F(QuicDispatcherTestStrayPacketConnectionId,
QuicConnectionId connection_id = 1;
// Dispatcher drops this packet.
EXPECT_CALL(*dispatcher_, CreateQuicSession(_, _)).Times(0);
- EXPECT_CALL(*time_wait_list_manager_,
- ProcessPacket(_, _, connection_id, _, _))
+ EXPECT_CALL(*time_wait_list_manager_, ProcessPacket(_, _, connection_id))
.Times(0);
EXPECT_CALL(*time_wait_list_manager_, AddConnectionIdToTimeWait(_, _, _, _))
.Times(0);
@@ -1351,7 +1345,7 @@ TEST_P(BufferedPacketStoreTest, ReceiveCHLOAfterExpiration) {
// New arrived CHLO will be dropped because this connection is in time wait
// list.
ASSERT_TRUE(time_wait_list_manager_->IsConnectionIdInTimeWait(conn_id));
- EXPECT_CALL(*time_wait_list_manager_, ProcessPacket(_, _, conn_id, _, _));
+ EXPECT_CALL(*time_wait_list_manager_, ProcessPacket(_, _, conn_id));
ProcessPacket(client_address, conn_id, true, SerializeFullCHLO());
}
@@ -1709,13 +1703,13 @@ TEST_F(AsyncGetProofTest, BasicReject) {
EXPECT_CALL(*time_wait_list_manager_,
AddConnectionIdToTimeWait(conn_id, _, true, _));
EXPECT_CALL(*time_wait_list_manager_,
- ProcessPacket(_, client_addr_, conn_id, _, _));
+ ProcessPacket(_, client_addr_, conn_id));
EXPECT_CALL(check, Call(2));
EXPECT_CALL(*dispatcher_, CreateQuicSession(conn_id, client_addr_))
.Times(0);
EXPECT_CALL(*time_wait_list_manager_,
- ProcessPacket(_, client_addr_, conn_id, _, _));
+ ProcessPacket(_, client_addr_, conn_id));
}
// Send a CHLO that the StatelessRejector will reject.
@@ -1831,11 +1825,11 @@ TEST_F(AsyncGetProofTest, MultipleReject) {
EXPECT_CALL(*time_wait_list_manager_,
AddConnectionIdToTimeWait(conn_id_2, _, true, _));
EXPECT_CALL(*time_wait_list_manager_,
- ProcessPacket(_, client_addr_, conn_id_2, _, _));
+ ProcessPacket(_, client_addr_, conn_id_2));
EXPECT_CALL(check, Call(2));
EXPECT_CALL(*time_wait_list_manager_,
- ProcessPacket(_, client_addr_, conn_id_2, _, _));
+ ProcessPacket(_, client_addr_, conn_id_2));
EXPECT_CALL(check, Call(3));
EXPECT_CALL(*dispatcher_,
@@ -1845,7 +1839,7 @@ TEST_F(AsyncGetProofTest, MultipleReject) {
EXPECT_CALL(*time_wait_list_manager_,
AddConnectionIdToTimeWait(conn_id_1, _, true, _));
EXPECT_CALL(*time_wait_list_manager_,
- ProcessPacket(_, client_addr_, conn_id_1, _, _));
+ ProcessPacket(_, client_addr_, conn_id_1));
}
// Send a CHLO that the StatelessRejector will reject.
@@ -1904,7 +1898,7 @@ TEST_F(AsyncGetProofTest, MultipleIdenticalReject) {
EXPECT_CALL(*time_wait_list_manager_,
AddConnectionIdToTimeWait(conn_id_1, _, true, _));
EXPECT_CALL(*time_wait_list_manager_,
- ProcessPacket(_, client_addr_, conn_id_1, _, _));
+ ProcessPacket(_, client_addr_, conn_id_1));
}
// Send a CHLO that the StatelessRejector will reject.
@@ -1944,7 +1938,7 @@ TEST_F(AsyncGetProofTest, BufferTimeout) {
EXPECT_CALL(check, Call(2));
EXPECT_CALL(*time_wait_list_manager_,
- ProcessPacket(_, client_addr_, conn_id, _, _));
+ ProcessPacket(_, client_addr_, conn_id));
EXPECT_CALL(*dispatcher_, CreateQuicSession(conn_id, client_addr_))
.Times(0);
}
« no previous file with comments | « net/tools/quic/quic_dispatcher.cc ('k') | net/tools/quic/quic_time_wait_list_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698