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" |
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
620 | 620 |
621 for (int stream_num = 9; stream_num >= 0; --stream_num) { | 621 for (int stream_num = 9; stream_num >= 0; --stream_num) { |
622 DVLOG(1) << "OnStreamFrame for stream " << stream_num << " offset " | 622 DVLOG(1) << "OnStreamFrame for stream " << stream_num << " offset " |
623 << stream_frames[stream_num].offset; | 623 << stream_frames[stream_num].offset; |
624 headers_stream_->OnStreamFrame(stream_frames[stream_num]); | 624 headers_stream_->OnStreamFrame(stream_frames[stream_num]); |
625 connection_->AdvanceTime(QuicTime::Delta::FromMilliseconds(1)); | 625 connection_->AdvanceTime(QuicTime::Delta::FromMilliseconds(1)); |
626 } | 626 } |
627 } | 627 } |
628 | 628 |
629 TEST_P(QuicHeadersStreamTest, ProcessLargeRawData) { | 629 TEST_P(QuicHeadersStreamTest, ProcessLargeRawData) { |
| 630 headers_stream_->set_max_uncompressed_header_bytes(256 * 1024); |
630 // We want to create a frame that is more than the SPDY Framer's max control | 631 // We want to create a frame that is more than the SPDY Framer's max control |
631 // frame size, which is 16K, but less than the HPACK decoders max decode | 632 // frame size, which is 16K, but less than the HPACK decoders max decode |
632 // buffer size, which is 32K. | 633 // buffer size, which is 32K. |
633 headers_["key0"] = string(1 << 13, '.'); | 634 headers_["key0"] = string(1 << 13, '.'); |
634 headers_["key1"] = string(1 << 13, '.'); | 635 headers_["key1"] = string(1 << 13, '.'); |
635 headers_["key2"] = string(1 << 13, '.'); | 636 headers_["key2"] = string(1 << 13, '.'); |
636 for (QuicStreamId stream_id = kClientDataStreamId1; | 637 for (QuicStreamId stream_id = kClientDataStreamId1; |
637 stream_id < kClientDataStreamId3; stream_id += 2) { | 638 stream_id < kClientDataStreamId3; stream_id += 2) { |
638 for (bool fin : {false, true}) { | 639 for (bool fin : {false, true}) { |
639 for (SpdyPriority priority = 0; priority < 7; ++priority) { | 640 for (SpdyPriority priority = 0; priority < 7; ++priority) { |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
988 } | 989 } |
989 saved_data_.clear(); | 990 saved_data_.clear(); |
990 saved_payloads_.clear(); | 991 saved_payloads_.clear(); |
991 } | 992 } |
992 } | 993 } |
993 } | 994 } |
994 | 995 |
995 } // namespace | 996 } // namespace |
996 } // namespace test | 997 } // namespace test |
997 } // namespace net | 998 } // namespace net |
OLD | NEW |