| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/tools/quic/quic_spdy_server_stream.h" | 5 #include "net/tools/quic/quic_spdy_server_stream.h" |
| 6 | 6 |
| 7 #include "base/strings/string_number_conversions.h" | 7 #include "base/strings/string_number_conversions.h" |
| 8 #include "base/strings/string_piece.h" | 8 #include "base/strings/string_piece.h" |
| 9 #include "net/quic/quic_connection.h" | 9 #include "net/quic/quic_connection.h" |
| 10 #include "net/quic/quic_protocol.h" | 10 #include "net/quic/quic_protocol.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 kInitialStreamFlowControlWindowForTest); | 90 kInitialStreamFlowControlWindowForTest); |
| 91 session_.config()->SetInitialSessionFlowControlWindowToSend( | 91 session_.config()->SetInitialSessionFlowControlWindowToSend( |
| 92 kInitialSessionFlowControlWindowForTest); | 92 kInitialSessionFlowControlWindowForTest); |
| 93 stream_.reset(new QuicSpdyServerStreamPeer(3, &session_)); | 93 stream_.reset(new QuicSpdyServerStreamPeer(3, &session_)); |
| 94 } | 94 } |
| 95 | 95 |
| 96 static void SetUpTestCase() { | 96 static void SetUpTestCase() { |
| 97 QuicInMemoryCachePeer::ResetForTests(); | 97 QuicInMemoryCachePeer::ResetForTests(); |
| 98 } | 98 } |
| 99 | 99 |
| 100 virtual void SetUp() OVERRIDE { | 100 virtual void SetUp() override { |
| 101 QuicInMemoryCache* cache = QuicInMemoryCache::GetInstance(); | 101 QuicInMemoryCache* cache = QuicInMemoryCache::GetInstance(); |
| 102 | 102 |
| 103 BalsaHeaders request_headers, response_headers; | 103 BalsaHeaders request_headers, response_headers; |
| 104 StringPiece body("Yum"); | 104 StringPiece body("Yum"); |
| 105 request_headers.SetRequestFirstlineFromStringPieces( | 105 request_headers.SetRequestFirstlineFromStringPieces( |
| 106 "GET", | 106 "GET", |
| 107 "https://www.google.com/foo", | 107 "https://www.google.com/foo", |
| 108 "HTTP/1.1"); | 108 "HTTP/1.1"); |
| 109 response_headers.SetRequestFirstlineFromStringPieces("HTTP/1.1", | 109 response_headers.SetRequestFirstlineFromStringPieces("HTTP/1.1", |
| 110 "200", | 110 "200", |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 StringPiece data(arr, arraysize(arr)); | 264 StringPiece data(arr, arraysize(arr)); |
| 265 QuicStreamFrame frame(stream_->id(), true, 0, MakeIOVector(data)); | 265 QuicStreamFrame frame(stream_->id(), true, 0, MakeIOVector(data)); |
| 266 // Verify that we don't crash when we get a invalid headers in stream frame. | 266 // Verify that we don't crash when we get a invalid headers in stream frame. |
| 267 stream_->OnStreamFrame(frame); | 267 stream_->OnStreamFrame(frame); |
| 268 } | 268 } |
| 269 | 269 |
| 270 } // namespace | 270 } // namespace |
| 271 } // namespace test | 271 } // namespace test |
| 272 } // namespace tools | 272 } // namespace tools |
| 273 } // namespace net | 273 } // namespace net |
| OLD | NEW |