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

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

Issue 1499153002: Use the kClientDataStreamId1 constant instead of hardcoded "5" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@108754149
Patch Set: Created 5 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_flags.h" 10 #include "net/quic/quic_flags.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 96
97 headers_string_ = 97 headers_string_ =
98 net::SpdyUtils::SerializeUncompressedHeaders(request_headers); 98 net::SpdyUtils::SerializeUncompressedHeaders(request_headers);
99 99
100 // New streams rely on having the peer's flow control receive window 100 // New streams rely on having the peer's flow control receive window
101 // negotiated in the config. 101 // negotiated in the config.
102 session_.config()->SetInitialStreamFlowControlWindowToSend( 102 session_.config()->SetInitialStreamFlowControlWindowToSend(
103 kInitialStreamFlowControlWindowForTest); 103 kInitialStreamFlowControlWindowForTest);
104 session_.config()->SetInitialSessionFlowControlWindowToSend( 104 session_.config()->SetInitialSessionFlowControlWindowToSend(
105 kInitialSessionFlowControlWindowForTest); 105 kInitialSessionFlowControlWindowForTest);
106 stream_ = new QuicSpdyServerStreamPeer(5, &session_); 106 stream_ = new QuicSpdyServerStreamPeer(::net::test::kClientDataStreamId1,
107 &session_);
107 // Register stream_ in dynamic_stream_map_ and pass ownership to session_. 108 // Register stream_ in dynamic_stream_map_ and pass ownership to session_.
108 session_.ActivateStream(stream_); 109 session_.ActivateStream(stream_);
109 110
110 QuicInMemoryCachePeer::ResetForTests(); 111 QuicInMemoryCachePeer::ResetForTests();
111 } 112 }
112 113
113 ~QuicSpdyServerStreamTest() override { 114 ~QuicSpdyServerStreamTest() override {
114 QuicInMemoryCachePeer::ResetForTests(); 115 QuicInMemoryCachePeer::ResetForTests();
115 } 116 }
116 117
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 StringPiece data(arr, arraysize(arr)); 439 StringPiece data(arr, arraysize(arr));
439 QuicStreamFrame frame(stream_->id(), true, 0, data); 440 QuicStreamFrame frame(stream_->id(), true, 0, data);
440 // Verify that we don't crash when we get a invalid headers in stream frame. 441 // Verify that we don't crash when we get a invalid headers in stream frame.
441 stream_->OnStreamFrame(frame); 442 stream_->OnStreamFrame(frame);
442 } 443 }
443 444
444 } // namespace 445 } // namespace
445 } // namespace test 446 } // namespace test
446 } // namespace tools 447 } // namespace tools
447 } // namespace net 448 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698