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

Side by Side Diff: net/quic/core/quic_connection_test.cc

Issue 2449593003: deprecate FLAGS_graceful_emsgsize_on_mtu_probe (Closed)
Patch Set: Updated patchset dependency Created 4 years, 1 month 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
« no previous file with comments | « net/quic/core/quic_connection.cc ('k') | net/quic/core/quic_flags_list.h » ('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/quic/core/quic_connection.h" 5 #include "net/quic/core/quic_connection.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <memory> 8 #include <memory>
9 #include <ostream> 9 #include <ostream>
10 #include <utility> 10 #include <utility>
(...skipping 3167 matching lines...) Expand 10 before | Expand all | Expand 10 after
3178 SendStreamDataToPeer(3, ".", i, /*fin=*/false, nullptr); 3178 SendStreamDataToPeer(3, ".", i, /*fin=*/false, nullptr);
3179 ASSERT_FALSE(connection_.GetMtuDiscoveryAlarm()->IsSet()); 3179 ASSERT_FALSE(connection_.GetMtuDiscoveryAlarm()->IsSet());
3180 } 3180 }
3181 3181
3182 EXPECT_EQ(1u, connection_.mtu_probe_count()); 3182 EXPECT_EQ(1u, connection_.mtu_probe_count());
3183 } 3183 }
3184 3184
3185 // Tests whether MTU discovery works when the writer returns an error despite 3185 // Tests whether MTU discovery works when the writer returns an error despite
3186 // advertising higher packet length. 3186 // advertising higher packet length.
3187 TEST_P(QuicConnectionTest, MtuDiscoveryWriterFailed) { 3187 TEST_P(QuicConnectionTest, MtuDiscoveryWriterFailed) {
3188 FLAGS_graceful_emsgsize_on_mtu_probe = true;
3189 EXPECT_TRUE(connection_.connected()); 3188 EXPECT_TRUE(connection_.connected());
3190 3189
3191 const QuicByteCount mtu_limit = kMtuDiscoveryTargetPacketSizeHigh - 1; 3190 const QuicByteCount mtu_limit = kMtuDiscoveryTargetPacketSizeHigh - 1;
3192 const QuicByteCount initial_mtu = connection_.max_packet_length(); 3191 const QuicByteCount initial_mtu = connection_.max_packet_length();
3193 EXPECT_LT(initial_mtu, mtu_limit); 3192 EXPECT_LT(initial_mtu, mtu_limit);
3194 writer_->set_max_packet_size(mtu_limit); 3193 writer_->set_max_packet_size(mtu_limit);
3195 connection_.EnablePathMtuDiscovery(send_algorithm_); 3194 connection_.EnablePathMtuDiscovery(send_algorithm_);
3196 3195
3197 // Send enough packets so that the next one triggers path MTU discovery. 3196 // Send enough packets so that the next one triggers path MTU discovery.
3198 for (QuicPacketCount i = 0; i < kPacketsBetweenMtuProbesBase - 1; i++) { 3197 for (QuicPacketCount i = 0; i < kPacketsBetweenMtuProbesBase - 1; i++) {
(...skipping 2080 matching lines...) Expand 10 before | Expand all | Expand 10 after
5279 connection_.SendStreamDataWithString(3, "foo", 0, !kFin, nullptr); 5278 connection_.SendStreamDataWithString(3, "foo", 0, !kFin, nullptr);
5280 EXPECT_EQ(1u, writer_->frame_count()); 5279 EXPECT_EQ(1u, writer_->frame_count());
5281 EXPECT_FALSE(writer_->connection_close_frames().empty()); 5280 EXPECT_FALSE(writer_->connection_close_frames().empty());
5282 // Ack frame is not bundled in connection close packet. 5281 // Ack frame is not bundled in connection close packet.
5283 EXPECT_TRUE(writer_->ack_frames().empty()); 5282 EXPECT_TRUE(writer_->ack_frames().empty());
5284 } 5283 }
5285 5284
5286 } // namespace 5285 } // namespace
5287 } // namespace test 5286 } // namespace test
5288 } // namespace net 5287 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_connection.cc ('k') | net/quic/core/quic_flags_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698