| 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/core/quic_headers_stream.h" | 5 #include "net/quic/core/quic_headers_stream.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
| 10 #include "net/quic/core/quic_bug_tracker.h" | 10 #include "net/quic/core/quic_bug_tracker.h" |
| 11 #include "net/quic/core/quic_utils.h" | 11 #include "net/quic/core/quic_utils.h" |
| 12 #include "net/quic/core/spdy_utils.h" | 12 #include "net/quic/core/spdy_utils.h" |
| 13 #include "net/quic/test_tools/quic_connection_peer.h" | 13 #include "net/quic/test_tools/quic_connection_peer.h" |
| 14 #include "net/quic/test_tools/quic_headers_stream_peer.h" | 14 #include "net/quic/test_tools/quic_headers_stream_peer.h" |
| 15 #include "net/quic/test_tools/quic_spdy_session_peer.h" | 15 #include "net/quic/test_tools/quic_spdy_session_peer.h" |
| 16 #include "net/quic/test_tools/quic_stream_peer.h" |
| 16 #include "net/quic/test_tools/quic_test_utils.h" | 17 #include "net/quic/test_tools/quic_test_utils.h" |
| 17 #include "net/quic/test_tools/reliable_quic_stream_peer.h" | |
| 18 #include "net/spdy/spdy_alt_svc_wire_format.h" | 18 #include "net/spdy/spdy_alt_svc_wire_format.h" |
| 19 #include "net/spdy/spdy_flags.h" | 19 #include "net/spdy/spdy_flags.h" |
| 20 #include "net/spdy/spdy_protocol.h" | 20 #include "net/spdy/spdy_protocol.h" |
| 21 #include "net/spdy/spdy_test_utils.h" | 21 #include "net/spdy/spdy_test_utils.h" |
| 22 #include "net/test/gtest_util.h" | 22 #include "net/test/gtest_util.h" |
| 23 #include "testing/gtest/include/gtest/gtest.h" | 23 #include "testing/gtest/include/gtest/gtest.h" |
| 24 | 24 |
| 25 using base::StringPiece; | 25 using base::StringPiece; |
| 26 using std::ostream; | 26 using std::ostream; |
| 27 using std::string; | 27 using std::string; |
| (...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 836 CloseConnection(QUIC_INVALID_HEADERS_STREAM_DATA, | 836 CloseConnection(QUIC_INVALID_HEADERS_STREAM_DATA, |
| 837 "SPDY WINDOW_UPDATE frame received.", _)) | 837 "SPDY WINDOW_UPDATE frame received.", _)) |
| 838 .WillOnce(InvokeWithoutArgs( | 838 .WillOnce(InvokeWithoutArgs( |
| 839 this, &QuicHeadersStreamTest::TearDownLocalConnectionState)); | 839 this, &QuicHeadersStreamTest::TearDownLocalConnectionState)); |
| 840 stream_frame_.data_buffer = frame.data(); | 840 stream_frame_.data_buffer = frame.data(); |
| 841 stream_frame_.data_length = frame.size(); | 841 stream_frame_.data_length = frame.size(); |
| 842 headers_stream_->OnStreamFrame(stream_frame_); | 842 headers_stream_->OnStreamFrame(stream_frame_); |
| 843 } | 843 } |
| 844 | 844 |
| 845 TEST_P(QuicHeadersStreamTest, NoConnectionLevelFlowControl) { | 845 TEST_P(QuicHeadersStreamTest, NoConnectionLevelFlowControl) { |
| 846 EXPECT_FALSE(ReliableQuicStreamPeer::StreamContributesToConnectionFlowControl( | 846 EXPECT_FALSE(QuicStreamPeer::StreamContributesToConnectionFlowControl( |
| 847 headers_stream_)); | 847 headers_stream_)); |
| 848 } | 848 } |
| 849 | 849 |
| 850 TEST_P(QuicHeadersStreamTest, HpackDecoderDebugVisitor) { | 850 TEST_P(QuicHeadersStreamTest, HpackDecoderDebugVisitor) { |
| 851 if (FLAGS_use_nested_spdy_framer_decoder) | 851 if (FLAGS_use_nested_spdy_framer_decoder) |
| 852 return; | 852 return; |
| 853 | 853 |
| 854 StrictMock<MockHpackDebugVisitor>* hpack_decoder_visitor = | 854 StrictMock<MockHpackDebugVisitor>* hpack_decoder_visitor = |
| 855 hpack_decoder_visitor_.get(); | 855 hpack_decoder_visitor_.get(); |
| 856 headers_stream_->SetHpackDecoderDebugVisitor( | 856 headers_stream_->SetHpackDecoderDebugVisitor( |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 989 } | 989 } |
| 990 saved_data_.clear(); | 990 saved_data_.clear(); |
| 991 saved_payloads_.clear(); | 991 saved_payloads_.clear(); |
| 992 } | 992 } |
| 993 } | 993 } |
| 994 } | 994 } |
| 995 | 995 |
| 996 } // namespace | 996 } // namespace |
| 997 } // namespace test | 997 } // namespace test |
| 998 } // namespace net | 998 } // namespace net |
| OLD | NEW |