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

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

Issue 1519723002: Revert of Close the QUIC connection when non-crypto stream data is written at ENCRYPTION_NONE. Flag protected… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2526
Patch Set: Created 5 years 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_flags.cc ('k') | net/quic/test_tools/mock_crypto_client_stream.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/quic/quic_session.h" 5 #include "net/quic/quic_session.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 "3Rs1UKCuBAF9g8rWNOFbxt8PSNSHFuIhOo2t6bJAVpCsMU5Laa6lewuTMYI8MzdQP" 216 "3Rs1UKCuBAF9g8rWNOFbxt8PSNSHFuIhOo2t6bJAVpCsMU5Laa6lewuTMYI8MzdQP"
217 "ARHKyW-koxuhMZHUnGBJAM1gJODe0cATO_KGoX4pbbFxxJ5IicRxOrWK_5rU3cdy6" 217 "ARHKyW-koxuhMZHUnGBJAM1gJODe0cATO_KGoX4pbbFxxJ5IicRxOrWK_5rU3cdy6"
218 "edlR9FsEdH6iujMcHkbE5l18ehJDwTWmBKBzVD87naobhMMrF6VvnDGxQVGp9Ir_b" 218 "edlR9FsEdH6iujMcHkbE5l18ehJDwTWmBKBzVD87naobhMMrF6VvnDGxQVGp9Ir_b"
219 "Rgj3RWUoPumQVCxtSOBdX0GlJOEcDTNCzQIm9BSfetog_eP_TfYubKudt5eMsXmN6" 219 "Rgj3RWUoPumQVCxtSOBdX0GlJOEcDTNCzQIm9BSfetog_eP_TfYubKudt5eMsXmN6"
220 "QnyXHeGeK2UINUzJ-D30AFcpqYgH9_1BvYSpi7fc7_ydBU8TaD8ZRxvtnzXqj0RfG" 220 "QnyXHeGeK2UINUzJ-D30AFcpqYgH9_1BvYSpi7fc7_ydBU8TaD8ZRxvtnzXqj0RfG"
221 "tuHghmv3aD-uzSYJ75XDdzKdizZ86IG6Fbn1XFhYZM-fbHhm3mVEXnyRW4ZuNOLFk" 221 "tuHghmv3aD-uzSYJ75XDdzKdizZ86IG6Fbn1XFhYZM-fbHhm3mVEXnyRW4ZuNOLFk"
222 "Fas6LMcVC6Q8QLlHYbXBpdNFuGbuZGUnav5C-2I_-46lL0NGg3GewxGKGHvHEfoyn" 222 "Fas6LMcVC6Q8QLlHYbXBpdNFuGbuZGUnav5C-2I_-46lL0NGg3GewxGKGHvHEfoyn"
223 "EFFlEYHsBQ98rXImL8ySDycdLEFvBPdtctPmWCfTxwmoSMLHU2SCVDhbqMWU5b0yr" 223 "EFFlEYHsBQ98rXImL8ySDycdLEFvBPdtctPmWCfTxwmoSMLHU2SCVDhbqMWU5b0yr"
224 "JBCScs_ejbKaqBDoB7ZGxTvqlrB__2ZmnHHjCr8RgMRtKNtIeuZAo "; 224 "JBCScs_ejbKaqBDoB7ZGxTvqlrB__2ZmnHHjCr8RgMRtKNtIeuZAo ";
225 connection_->AdvanceTime(QuicTime::Delta::FromSeconds(1)); 225 connection_->AdvanceTime(QuicTime::Delta::FromSeconds(1));
226 // TODO(ianswett): Fix QuicSessionTests so they don't attempt to write
227 // non-crypto stream data at ENCRYPTION_NONE.
228 FLAGS_quic_never_write_unencrypted_data = false;
229 } 226 }
230 227
231 void CheckClosedStreams() { 228 void CheckClosedStreams() {
232 for (QuicStreamId i = kCryptoStreamId; i < 100; i++) { 229 for (QuicStreamId i = kCryptoStreamId; i < 100; i++) {
233 if (!ContainsKey(closed_streams_, i)) { 230 if (!ContainsKey(closed_streams_, i)) {
234 EXPECT_FALSE(session_.IsClosedStream(i)) << " stream id: " << i; 231 EXPECT_FALSE(session_.IsClosedStream(i)) << " stream id: " << i;
235 } else { 232 } else {
236 EXPECT_TRUE(session_.IsClosedStream(i)) << " stream id: " << i; 233 EXPECT_TRUE(session_.IsClosedStream(i)) << " stream id: " << i;
237 } 234 }
238 } 235 }
(...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after
1029 EXPECT_TRUE(QuicSessionPeer::IsStreamImplicitlyCreated(&session_, 4)); 1026 EXPECT_TRUE(QuicSessionPeer::IsStreamImplicitlyCreated(&session_, 4));
1030 ASSERT_TRUE(session_.GetIncomingDynamicStream(2) != nullptr); 1027 ASSERT_TRUE(session_.GetIncomingDynamicStream(2) != nullptr);
1031 ASSERT_TRUE(session_.GetIncomingDynamicStream(4) != nullptr); 1028 ASSERT_TRUE(session_.GetIncomingDynamicStream(4) != nullptr);
1032 // And 5 should be not implicitly created. 1029 // And 5 should be not implicitly created.
1033 EXPECT_FALSE(QuicSessionPeer::IsStreamImplicitlyCreated(&session_, 5)); 1030 EXPECT_FALSE(QuicSessionPeer::IsStreamImplicitlyCreated(&session_, 5));
1034 } 1031 }
1035 1032
1036 } // namespace 1033 } // namespace
1037 } // namespace test 1034 } // namespace test
1038 } // namespace net 1035 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_flags.cc ('k') | net/quic/test_tools/mock_crypto_client_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698