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

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

Issue 902243003: Remove FLAGS_quic_allow_silent_close. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Keep_an_instance_of_QuicAckFrame_85351635
Patch Set: Created 5 years, 10 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
« no previous file with comments | « net/quic/quic_connection.cc ('k') | net/quic/quic_flags.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/quic_connection.h" 5 #include "net/quic/quic_connection.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
(...skipping 3138 matching lines...) Expand 10 before | Expand all | Expand 10 after
3149 clock_.AdvanceTime(five_ms); 3149 clock_.AdvanceTime(five_ms);
3150 EXPECT_EQ(default_timeout.Add(five_ms), clock_.ApproximateNow()); 3150 EXPECT_EQ(default_timeout.Add(five_ms), clock_.ApproximateNow());
3151 connection_.GetTimeoutAlarm()->Fire(); 3151 connection_.GetTimeoutAlarm()->Fire();
3152 EXPECT_FALSE(connection_.GetTimeoutAlarm()->IsSet()); 3152 EXPECT_FALSE(connection_.GetTimeoutAlarm()->IsSet());
3153 EXPECT_FALSE(connection_.connected()); 3153 EXPECT_FALSE(connection_.connected());
3154 } 3154 }
3155 3155
3156 TEST_P(QuicConnectionTest, TimeoutAfterSendSilentClose) { 3156 TEST_P(QuicConnectionTest, TimeoutAfterSendSilentClose) {
3157 // Same test as above, but complete a handshake which enables silent close, 3157 // Same test as above, but complete a handshake which enables silent close,
3158 // causing no connection close packet to be sent. 3158 // causing no connection close packet to be sent.
3159 ValueRestore<bool> old_flag(&FLAGS_quic_allow_silent_close, true);
3160 EXPECT_TRUE(connection_.connected()); 3159 EXPECT_TRUE(connection_.connected());
3161 EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _, _)); 3160 EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _, _));
3162 QuicConfig config; 3161 QuicConfig config;
3163 3162
3164 // Create a handshake message that also enables silent close. 3163 // Create a handshake message that also enables silent close.
3165 CryptoHandshakeMessage msg; 3164 CryptoHandshakeMessage msg;
3166 string error_details; 3165 string error_details;
3167 QuicConfig client_config; 3166 QuicConfig client_config;
3168 client_config.SetInitialStreamFlowControlWindowToSend( 3167 client_config.SetInitialStreamFlowControlWindowToSend(
3169 kInitialStreamFlowControlWindowForTest); 3168 kInitialStreamFlowControlWindowForTest);
(...skipping 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after
4421 // Regression test for b/18594622 4420 // Regression test for b/18594622
4422 scoped_refptr<MockAckNotifierDelegate> delegate(new MockAckNotifierDelegate); 4421 scoped_refptr<MockAckNotifierDelegate> delegate(new MockAckNotifierDelegate);
4423 EXPECT_DFATAL( 4422 EXPECT_DFATAL(
4424 connection_.SendStreamDataWithString(3, "", 0, !kFin, delegate.get()), 4423 connection_.SendStreamDataWithString(3, "", 0, !kFin, delegate.get()),
4425 "Attempt to send empty stream frame"); 4424 "Attempt to send empty stream frame");
4426 } 4425 }
4427 4426
4428 } // namespace 4427 } // namespace
4429 } // namespace test 4428 } // namespace test
4430 } // namespace net 4429 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_connection.cc ('k') | net/quic/quic_flags.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698