| OLD | NEW |
| 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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 TEST_P(QuicSessionTest, DecompressionError) { | 320 TEST_P(QuicSessionTest, DecompressionError) { |
| 321 QuicHeadersStream* stream = QuicSessionPeer::GetHeadersStream(&session_); | 321 QuicHeadersStream* stream = QuicSessionPeer::GetHeadersStream(&session_); |
| 322 const unsigned char data[] = { | 322 const unsigned char data[] = { |
| 323 0x80, 0x03, 0x00, 0x01, // SPDY/3 SYN_STREAM frame | 323 0x80, 0x03, 0x00, 0x01, // SPDY/3 SYN_STREAM frame |
| 324 0x00, 0x00, 0x00, 0x25, // flags/length | 324 0x00, 0x00, 0x00, 0x25, // flags/length |
| 325 0x00, 0x00, 0x00, 0x05, // stream id | 325 0x00, 0x00, 0x00, 0x05, // stream id |
| 326 0x00, 0x00, 0x00, 0x00, // associated stream id | 326 0x00, 0x00, 0x00, 0x00, // associated stream id |
| 327 0x00, 0x00, | 327 0x00, 0x00, |
| 328 'a', 'b', 'c', 'd' // invalid compressed data | 328 'a', 'b', 'c', 'd' // invalid compressed data |
| 329 }; | 329 }; |
| 330 EXPECT_CALL(*connection_, | 330 EXPECT_CALL(*connection_, SendConnectionCloseWithDetails( |
| 331 SendConnectionCloseWithDetails(QUIC_INVALID_HEADERS_STREAM_DATA, | 331 QUIC_INVALID_HEADERS_STREAM_DATA, |
| 332 "SPDY framing error.")); | 332 "SPDY framing error: DECOMPRESS_FAILURE")); |
| 333 stream->ProcessRawData(reinterpret_cast<const char*>(data), | 333 stream->ProcessRawData(reinterpret_cast<const char*>(data), |
| 334 arraysize(data)); | 334 arraysize(data)); |
| 335 } | 335 } |
| 336 | 336 |
| 337 TEST_P(QuicSessionTest, DebugDFatalIfMarkingClosedStreamWriteBlocked) { | 337 TEST_P(QuicSessionTest, DebugDFatalIfMarkingClosedStreamWriteBlocked) { |
| 338 TestStream* stream2 = session_.CreateOutgoingDataStream(); | 338 TestStream* stream2 = session_.CreateOutgoingDataStream(); |
| 339 // Close the stream. | 339 // Close the stream. |
| 340 stream2->Reset(QUIC_BAD_APPLICATION_PAYLOAD); | 340 stream2->Reset(QUIC_BAD_APPLICATION_PAYLOAD); |
| 341 // TODO(rtenneti): enable when chromium supports EXPECT_DEBUG_DFATAL. | 341 // TODO(rtenneti): enable when chromium supports EXPECT_DEBUG_DFATAL. |
| 342 /* | 342 /* |
| (...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1014 } | 1014 } |
| 1015 | 1015 |
| 1016 // Called after any new data is received by the session, and triggers the call | 1016 // Called after any new data is received by the session, and triggers the call |
| 1017 // to close the connection. | 1017 // to close the connection. |
| 1018 session_.PostProcessAfterData(); | 1018 session_.PostProcessAfterData(); |
| 1019 } | 1019 } |
| 1020 | 1020 |
| 1021 } // namespace | 1021 } // namespace |
| 1022 } // namespace test | 1022 } // namespace test |
| 1023 } // namespace net | 1023 } // namespace net |
| OLD | NEW |