| 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 <ostream> | 7 #include <ostream> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <tuple> | 9 #include <tuple> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 SpdySettingsIR data; | 538 SpdySettingsIR data; |
| 539 // Respect supported settings frames SETTINGS_ENABLE_PUSH. | 539 // Respect supported settings frames SETTINGS_ENABLE_PUSH. |
| 540 data.AddSetting(SETTINGS_ENABLE_PUSH, true, true, 0); | 540 data.AddSetting(SETTINGS_ENABLE_PUSH, true, true, 0); |
| 541 SpdySerializedFrame frame(framer_->SerializeFrame(data)); | 541 SpdySerializedFrame frame(framer_->SerializeFrame(data)); |
| 542 stream_frame_.data_buffer = frame.data(); | 542 stream_frame_.data_buffer = frame.data(); |
| 543 stream_frame_.data_length = frame.size(); | 543 stream_frame_.data_length = frame.size(); |
| 544 if (perspective() == Perspective::IS_CLIENT) { | 544 if (perspective() == Perspective::IS_CLIENT) { |
| 545 EXPECT_CALL( | 545 EXPECT_CALL( |
| 546 *connection_, | 546 *connection_, |
| 547 CloseConnection(QUIC_INVALID_HEADERS_STREAM_DATA, | 547 CloseConnection(QUIC_INVALID_HEADERS_STREAM_DATA, |
| 548 "Unsupported field of HTTP/2 SETTINGS frame: 9", _)); | 548 "Unsupported field of HTTP/2 SETTINGS frame: 2", _)); |
| 549 } | 549 } |
| 550 headers_stream_->OnStreamFrame(stream_frame_); | 550 headers_stream_->OnStreamFrame(stream_frame_); |
| 551 EXPECT_EQ( | 551 EXPECT_EQ( |
| 552 session_.server_push_enabled(), | 552 session_.server_push_enabled(), |
| 553 (perspective() == Perspective::IS_CLIENT && version() > QUIC_VERSION_34)); | 553 (perspective() == Perspective::IS_CLIENT && version() > QUIC_VERSION_34)); |
| 554 } | 554 } |
| 555 | 555 |
| 556 TEST_P(QuicHeadersStreamTest, EmptyHeaderHOLBlockedTime) { | 556 TEST_P(QuicHeadersStreamTest, EmptyHeaderHOLBlockedTime) { |
| 557 EXPECT_CALL(session_, OnHeadersHeadOfLineBlocking(_)).Times(0); | 557 EXPECT_CALL(session_, OnHeadersHeadOfLineBlocking(_)).Times(0); |
| 558 testing::InSequence seq; | 558 testing::InSequence seq; |
| (...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1047 consumed_data = headers_stream_->WritevStreamData( | 1047 consumed_data = headers_stream_->WritevStreamData( |
| 1048 id, MakeIOVector(data, &iov), offset, fin, nullptr); | 1048 id, MakeIOVector(data, &iov), offset, fin, nullptr); |
| 1049 | 1049 |
| 1050 EXPECT_EQ(consumed_data.bytes_consumed, 0u); | 1050 EXPECT_EQ(consumed_data.bytes_consumed, 0u); |
| 1051 EXPECT_EQ(consumed_data.fin_consumed, false); | 1051 EXPECT_EQ(consumed_data.fin_consumed, false); |
| 1052 } | 1052 } |
| 1053 | 1053 |
| 1054 } // namespace | 1054 } // namespace |
| 1055 } // namespace test | 1055 } // namespace test |
| 1056 } // namespace net | 1056 } // namespace net |
| OLD | NEW |