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

Side by Side Diff: trunk/src/net/tools/quic/quic_epoll_connection_helper_test.cc

Issue 16374004: Revert 204046 "Land Recent QUIC changes." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « trunk/src/net/tools/quic/quic_dispatcher.cc ('k') | trunk/src/net/tools/quic/quic_server.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "net/tools/quic/quic_epoll_connection_helper.h" 5 #include "net/tools/quic/quic_epoll_connection_helper.h"
6 6
7 #include "net/quic/crypto/crypto_protocol.h" 7 #include "net/quic/crypto/crypto_protocol.h"
8 #include "net/quic/crypto/quic_decrypter.h" 8 #include "net/quic/crypto/quic_decrypter.h"
9 #include "net/quic/crypto/quic_encrypter.h" 9 #include "net/quic/crypto/quic_encrypter.h"
10 #include "net/quic/crypto/quic_random.h" 10 #include "net/quic/crypto/quic_random.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 QuicPacketHeader header_; 117 QuicPacketHeader header_;
118 QuicStreamFrame frame1_; 118 QuicStreamFrame frame1_;
119 }; 119 };
120 120
121 TEST_F(QuicConnectionHelperTest, DISABLED_TestRetransmission) { 121 TEST_F(QuicConnectionHelperTest, DISABLED_TestRetransmission) {
122 //FLAGS_fake_packet_loss_percentage = 100; 122 //FLAGS_fake_packet_loss_percentage = 100;
123 const int64 kDefaultRetransmissionTimeMs = 500; 123 const int64 kDefaultRetransmissionTimeMs = 500;
124 124
125 const char buffer[] = "foo"; 125 const char buffer[] = "foo";
126 const size_t packet_size = 126 const size_t packet_size =
127 GetPacketHeaderSize(PACKET_8BYTE_GUID, kIncludeVersion, 127 GetPacketHeaderSize(
128 PACKET_6BYTE_SEQUENCE_NUMBER, NOT_IN_FEC_GROUP) + 128 PACKET_8BYTE_GUID, kIncludeVersion, NOT_IN_FEC_GROUP) +
129 QuicFramer::GetMinStreamFrameSize() + arraysize(buffer) - 1; 129 QuicFramer::GetMinStreamFrameSize() + arraysize(buffer) - 1;
130 EXPECT_CALL(*send_algorithm_, 130 EXPECT_CALL(*send_algorithm_,
131 SentPacket(_, 1, packet_size, NOT_RETRANSMISSION)); 131 SentPacket(_, 1, packet_size, NOT_RETRANSMISSION));
132 EXPECT_CALL(*send_algorithm_, AbandoningPacket(1, packet_size)); 132 EXPECT_CALL(*send_algorithm_, AbandoningPacket(1, packet_size));
133 connection_.SendStreamData(1, buffer, 0, false); 133 connection_.SendStreamData(1, buffer, 0, false);
134 EXPECT_EQ(1u, helper_->header()->packet_sequence_number); 134 EXPECT_EQ(1u, helper_->header()->packet_sequence_number);
135 EXPECT_CALL(*send_algorithm_, 135 EXPECT_CALL(*send_algorithm_,
136 SentPacket(_, 2, packet_size, IS_RETRANSMISSION)); 136 SentPacket(_, 2, packet_size, IS_RETRANSMISSION));
137 epoll_server_.AdvanceByAndCallCallbacks(kDefaultRetransmissionTimeMs * 1000); 137 epoll_server_.AdvanceByAndCallCallbacks(kDefaultRetransmissionTimeMs * 1000);
138 138
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 testing::Return(QuicTime::Delta::Zero())); 194 testing::Return(QuicTime::Delta::Zero()));
195 EXPECT_CALL(visitor_, OnCanWrite()).WillOnce(testing::Return(true)); 195 EXPECT_CALL(visitor_, OnCanWrite()).WillOnce(testing::Return(true));
196 epoll_server_.AdvanceByAndCallCallbacks(1); 196 epoll_server_.AdvanceByAndCallCallbacks(1);
197 EXPECT_EQ(0u, connection_.NumQueuedPackets()); 197 EXPECT_EQ(0u, connection_.NumQueuedPackets());
198 } 198 }
199 199
200 } // namespace 200 } // namespace
201 } // namespace test 201 } // namespace test
202 } // namespace tools 202 } // namespace tools
203 } // namespace net 203 } // namespace net
OLDNEW
« no previous file with comments | « trunk/src/net/tools/quic/quic_dispatcher.cc ('k') | trunk/src/net/tools/quic/quic_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698