Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(334)

Side by Side Diff: net/tools/quic/quic_spdy_server_stream_test.cc

Issue 339803004: Introduce QUIC_VERSION_20: allowing endpoints to set different (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 BalsaHeaders request_headers; 78 BalsaHeaders request_headers;
79 request_headers.SetRequestFirstlineFromStringPieces( 79 request_headers.SetRequestFirstlineFromStringPieces(
80 "POST", "https://www.google.com/", "HTTP/1.1"); 80 "POST", "https://www.google.com/", "HTTP/1.1");
81 request_headers.ReplaceOrAppendHeader("content-length", "11"); 81 request_headers.ReplaceOrAppendHeader("content-length", "11");
82 82
83 headers_string_ = SpdyUtils::SerializeRequestHeaders(request_headers); 83 headers_string_ = SpdyUtils::SerializeRequestHeaders(request_headers);
84 84
85 // New streams rely on having the peer's flow control receive window 85 // New streams rely on having the peer's flow control receive window
86 // negotiated in the config. 86 // negotiated in the config.
87 session_.config()->SetInitialFlowControlWindowToSend( 87 session_.config()->SetInitialFlowControlWindowToSend(
88 kInitialFlowControlWindowForTest); 88 kInitialSessionFlowControlWindowForTest);
89 session_.config()->SetInitialStreamFlowControlWindowToSend(
90 kInitialStreamFlowControlWindowForTest);
91 session_.config()->SetInitialSessionFlowControlWindowToSend(
92 kInitialSessionFlowControlWindowForTest);
89 stream_.reset(new QuicSpdyServerStreamPeer(3, &session_)); 93 stream_.reset(new QuicSpdyServerStreamPeer(3, &session_));
90 } 94 }
91 95
92 static void SetUpTestCase() { 96 static void SetUpTestCase() {
93 QuicInMemoryCachePeer::ResetForTests(); 97 QuicInMemoryCachePeer::ResetForTests();
94 } 98 }
95 99
96 virtual void SetUp() OVERRIDE { 100 virtual void SetUp() OVERRIDE {
97 QuicInMemoryCache* cache = QuicInMemoryCache::GetInstance(); 101 QuicInMemoryCache* cache = QuicInMemoryCache::GetInstance();
98 102
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 StringPiece data(arr, arraysize(arr)); 266 StringPiece data(arr, arraysize(arr));
263 QuicStreamFrame frame(stream_->id(), true, 0, MakeIOVector(data)); 267 QuicStreamFrame frame(stream_->id(), true, 0, MakeIOVector(data));
264 // Verify that we don't crash when we get a invalid headers in stream frame. 268 // Verify that we don't crash when we get a invalid headers in stream frame.
265 stream_->OnStreamFrame(frame); 269 stream_->OnStreamFrame(frame);
266 } 270 }
267 271
268 } // namespace 272 } // namespace
269 } // namespace test 273 } // namespace test
270 } // namespace tools 274 } // namespace tools
271 } // namespace net 275 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_spdy_client_stream_test.cc ('k') | net/tools/quic/test_tools/mock_quic_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698