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

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

Issue 848443004: Adds QUIC_VERSION_24 which uses SPDY/4 header compression instead of SPDY/3. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Final_0114
Patch Set: Changes to make version 24 to work with chromium unittests Created 5 years, 11 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_session.cc ('k') | net/quic/test_tools/quic_test_packet_maker.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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 309
310 TEST_P(QuicSessionTest, StreamIdTooLarge) { 310 TEST_P(QuicSessionTest, StreamIdTooLarge) {
311 QuicStreamId stream_id = kClientDataStreamId1; 311 QuicStreamId stream_id = kClientDataStreamId1;
312 session_.GetIncomingDataStream(stream_id); 312 session_.GetIncomingDataStream(stream_id);
313 EXPECT_CALL(*connection_, SendConnectionClose(QUIC_INVALID_STREAM_ID)); 313 EXPECT_CALL(*connection_, SendConnectionClose(QUIC_INVALID_STREAM_ID));
314 session_.GetIncomingDataStream(stream_id + kMaxStreamIdDelta + 2); 314 session_.GetIncomingDataStream(stream_id + kMaxStreamIdDelta + 2);
315 } 315 }
316 316
317 TEST_P(QuicSessionTest, DecompressionError) { 317 TEST_P(QuicSessionTest, DecompressionError) {
318 QuicHeadersStream* stream = QuicSessionPeer::GetHeadersStream(&session_); 318 QuicHeadersStream* stream = QuicSessionPeer::GetHeadersStream(&session_);
319 if (version() > QUIC_VERSION_23) {
320 // This test does not apply to HPACK compression.
321 return;
322 }
319 const unsigned char data[] = { 323 const unsigned char data[] = {
320 0x80, 0x03, 0x00, 0x01, // SPDY/3 SYN_STREAM frame 324 0x80, 0x03, 0x00, 0x01, // SPDY/3 SYN_STREAM frame
321 0x00, 0x00, 0x00, 0x25, // flags/length 325 0x00, 0x00, 0x00, 0x25, // flags/length
322 0x00, 0x00, 0x00, 0x05, // stream id 326 0x00, 0x00, 0x00, 0x05, // stream id
323 0x00, 0x00, 0x00, 0x00, // associated stream id 327 0x00, 0x00, 0x00, 0x00, // associated stream id
324 0x00, 0x00, 328 0x00, 0x00,
325 'a', 'b', 'c', 'd' // invalid compressed data 329 'a', 'b', 'c', 'd' // invalid compressed data
326 }; 330 };
327 EXPECT_CALL(*connection_, SendConnectionCloseWithDetails( 331 EXPECT_CALL(*connection_, SendConnectionCloseWithDetails(
328 QUIC_INVALID_HEADERS_STREAM_DATA, 332 QUIC_INVALID_HEADERS_STREAM_DATA,
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
963 } 967 }
964 968
965 // Called after any new data is received by the session, and triggers the call 969 // Called after any new data is received by the session, and triggers the call
966 // to close the connection. 970 // to close the connection.
967 session_.PostProcessAfterData(); 971 session_.PostProcessAfterData();
968 } 972 }
969 973
970 } // namespace 974 } // namespace
971 } // namespace test 975 } // namespace test
972 } // namespace net 976 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_session.cc ('k') | net/quic/test_tools/quic_test_packet_maker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698