| 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 "net/quic/quic_utils.h" | 7 #include "net/quic/quic_utils.h" |
| 8 #include "net/quic/spdy_utils.h" | 8 #include "net/quic/spdy_utils.h" |
| 9 #include "net/quic/test_tools/quic_connection_peer.h" | 9 #include "net/quic/test_tools/quic_connection_peer.h" |
| 10 #include "net/quic/test_tools/quic_spdy_session_peer.h" | 10 #include "net/quic/test_tools/quic_spdy_session_peer.h" |
| 11 #include "net/quic/test_tools/quic_test_utils.h" | 11 #include "net/quic/test_tools/quic_test_utils.h" |
| 12 #include "net/quic/test_tools/reliable_quic_stream_peer.h" | 12 #include "net/quic/test_tools/reliable_quic_stream_peer.h" |
| 13 #include "net/spdy/spdy_protocol.h" | 13 #include "net/spdy/spdy_protocol.h" |
| 14 #include "net/spdy/spdy_test_utils.h" |
| 14 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 15 | 16 |
| 16 using base::StringPiece; | 17 using base::StringPiece; |
| 17 using std::ostream; | 18 using std::ostream; |
| 18 using std::string; | 19 using std::string; |
| 19 using std::vector; | 20 using std::vector; |
| 20 using testing::Invoke; | 21 using testing::Invoke; |
| 21 using testing::StrictMock; | 22 using testing::StrictMock; |
| 22 using testing::WithArgs; | 23 using testing::WithArgs; |
| 23 using testing::_; | 24 using testing::_; |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 CheckHeaders(); | 191 CheckHeaders(); |
| 191 saved_data_.clear(); | 192 saved_data_.clear(); |
| 192 } | 193 } |
| 193 | 194 |
| 194 void CheckHeaders() { | 195 void CheckHeaders() { |
| 195 SpdyHeaderBlock headers; | 196 SpdyHeaderBlock headers; |
| 196 EXPECT_EQ(saved_header_data_.length(), | 197 EXPECT_EQ(saved_header_data_.length(), |
| 197 framer_.ParseHeaderBlockInBuffer(saved_header_data_.data(), | 198 framer_.ParseHeaderBlockInBuffer(saved_header_data_.data(), |
| 198 saved_header_data_.length(), | 199 saved_header_data_.length(), |
| 199 &headers)); | 200 &headers)); |
| 200 EXPECT_EQ(headers_, headers); | 201 EXPECT_TRUE(CompareSpdyHeaderBlocks(headers_, headers)); |
| 201 saved_header_data_.clear(); | 202 saved_header_data_.clear(); |
| 202 } | 203 } |
| 203 | 204 |
| 204 Perspective perspective() { return GetParam().perspective; } | 205 Perspective perspective() { return GetParam().perspective; } |
| 205 | 206 |
| 206 QuicVersion version() { return GetParam().version; } | 207 QuicVersion version() { return GetParam().version; } |
| 207 | 208 |
| 208 QuicVersionVector GetVersion() { | 209 QuicVersionVector GetVersion() { |
| 209 QuicVersionVector versions; | 210 QuicVersionVector versions; |
| 210 versions.push_back(version()); | 211 versions.push_back(version()); |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 } | 423 } |
| 423 | 424 |
| 424 TEST_P(QuicHeadersStreamTest, NoConnectionLevelFlowControl) { | 425 TEST_P(QuicHeadersStreamTest, NoConnectionLevelFlowControl) { |
| 425 EXPECT_FALSE(ReliableQuicStreamPeer::StreamContributesToConnectionFlowControl( | 426 EXPECT_FALSE(ReliableQuicStreamPeer::StreamContributesToConnectionFlowControl( |
| 426 headers_stream_)); | 427 headers_stream_)); |
| 427 } | 428 } |
| 428 | 429 |
| 429 } // namespace | 430 } // namespace |
| 430 } // namespace test | 431 } // namespace test |
| 431 } // namespace net | 432 } // namespace net |
| OLD | NEW |