OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_headers_stream.h" | 5 #include "net/quic/quic_headers_stream.h" |
6 | 6 |
7 #include "base/test/histogram_tester.h" | 7 #include "base/test/histogram_tester.h" |
8 #include "net/quic/quic_utils.h" | 8 #include "net/quic/quic_utils.h" |
9 #include "net/quic/spdy_utils.h" | 9 #include "net/quic/spdy_utils.h" |
10 #include "net/quic/test_tools/quic_connection_peer.h" | 10 #include "net/quic/test_tools/quic_connection_peer.h" |
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 EXPECT_CALL(*connection_, | 472 EXPECT_CALL(*connection_, |
473 SendConnectionCloseWithDetails(QUIC_INVALID_HEADERS_STREAM_DATA, | 473 SendConnectionCloseWithDetails(QUIC_INVALID_HEADERS_STREAM_DATA, |
474 "SPDY DATA frame received.")) | 474 "SPDY DATA frame received.")) |
475 .WillOnce(InvokeWithoutArgs(this, | 475 .WillOnce(InvokeWithoutArgs(this, |
476 &QuicHeadersStreamTest::CloseConnection)); | 476 &QuicHeadersStreamTest::CloseConnection)); |
477 stream_frame_.data = StringPiece(frame->data(), frame->size()); | 477 stream_frame_.data = StringPiece(frame->data(), frame->size()); |
478 headers_stream_->OnStreamFrame(stream_frame_); | 478 headers_stream_->OnStreamFrame(stream_frame_); |
479 } | 479 } |
480 | 480 |
481 TEST_P(QuicHeadersStreamTest, ProcessSpdyRstStreamFrame) { | 481 TEST_P(QuicHeadersStreamTest, ProcessSpdyRstStreamFrame) { |
482 SpdyRstStreamIR data(2, RST_STREAM_PROTOCOL_ERROR, ""); | 482 SpdyRstStreamIR data(2, RST_STREAM_PROTOCOL_ERROR); |
483 scoped_ptr<SpdySerializedFrame> frame(framer_.SerializeFrame(data)); | 483 scoped_ptr<SpdySerializedFrame> frame(framer_.SerializeFrame(data)); |
484 EXPECT_CALL(*connection_, | 484 EXPECT_CALL(*connection_, |
485 SendConnectionCloseWithDetails( | 485 SendConnectionCloseWithDetails( |
486 QUIC_INVALID_HEADERS_STREAM_DATA, | 486 QUIC_INVALID_HEADERS_STREAM_DATA, |
487 "SPDY RST_STREAM frame received.")) | 487 "SPDY RST_STREAM frame received.")) |
488 .WillOnce(InvokeWithoutArgs(this, | 488 .WillOnce(InvokeWithoutArgs(this, |
489 &QuicHeadersStreamTest::CloseConnection)); | 489 &QuicHeadersStreamTest::CloseConnection)); |
490 stream_frame_.data = StringPiece(frame->data(), frame->size()); | 490 stream_frame_.data = StringPiece(frame->data(), frame->size()); |
491 headers_stream_->OnStreamFrame(stream_frame_); | 491 headers_stream_->OnStreamFrame(stream_frame_); |
492 } | 492 } |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 } | 543 } |
544 | 544 |
545 TEST_P(QuicHeadersStreamTest, NoConnectionLevelFlowControl) { | 545 TEST_P(QuicHeadersStreamTest, NoConnectionLevelFlowControl) { |
546 EXPECT_FALSE(ReliableQuicStreamPeer::StreamContributesToConnectionFlowControl( | 546 EXPECT_FALSE(ReliableQuicStreamPeer::StreamContributesToConnectionFlowControl( |
547 headers_stream_)); | 547 headers_stream_)); |
548 } | 548 } |
549 | 549 |
550 } // namespace | 550 } // namespace |
551 } // namespace test | 551 } // namespace test |
552 } // namespace net | 552 } // namespace net |
OLD | NEW |