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

Unified Diff: net/quic/test_tools/quic_test_utils.h

Issue 2854833005: QUIC - stream id refactor for tests. (Closed)
Patch Set: fix test failures detected by swarming test bots Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/test_tools/quic_spdy_session_peer.cc ('k') | net/quic/test_tools/quic_test_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/test_tools/quic_test_utils.h
diff --git a/net/quic/test_tools/quic_test_utils.h b/net/quic/test_tools/quic_test_utils.h
index cbb63b8e2a6fb8e2fb6598f10034f11c794091ac..bb7423c8967213abfbf0fc5e9983417da572857e 100644
--- a/net/quic/test_tools/quic_test_utils.h
+++ b/net/quic/test_tools/quic_test_utils.h
@@ -48,11 +48,6 @@ static const uint32_t kInitialStreamFlowControlWindowForTest =
1024 * 1024; // 1 MB
static const uint32_t kInitialSessionFlowControlWindowForTest =
1536 * 1024; // 1.5 MB
-// Data stream IDs start at 5: the crypto stream is 1, headers stream is 3.
-static const QuicStreamId kClientDataStreamId1 = 5;
-static const QuicStreamId kClientDataStreamId2 = 7;
-static const QuicStreamId kClientDataStreamId3 = 9;
-static const QuicStreamId kServerDataStreamId1 = 4;
// Returns the test peer IP address.
QuicIpAddress TestPeerIPAddress();
@@ -948,10 +943,6 @@ void CreateServerSessionForTest(
PacketSavingConnection** server_connection,
TestQuicSpdyServerSession** server_session);
-// Helper to generate client side stream ids, generalizes
-// kClientDataStreamId1 etc. above.
-QuicStreamId QuicClientDataStreamId(int i);
-
// Verifies that the relative error of |actual| with respect to |expected| is
// no more than |margin|.
@@ -990,6 +981,12 @@ inline QuicIOVector MakeIOVector(QuicStringPiece str, struct iovec* iov) {
return quic_iov;
}
+// Utilities that will adapt stream ids when http stream pairs are
+// enabled.
+QuicStreamId NextStreamId(QuicVersion version);
+QuicStreamId GetNthClientInitiatedStreamId(QuicVersion version, int n);
+QuicStreamId GetNthServerInitiatedStreamId(QuicVersion version, int n);
+
} // namespace test
} // namespace net
« no previous file with comments | « net/quic/test_tools/quic_spdy_session_peer.cc ('k') | net/quic/test_tools/quic_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698