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

Side by Side Diff: net/quic/test_tools/quic_test_utils.cc

Issue 2862563003: Landing Recent QUIC changes until Sat Apr 29 00:22:04 2017 +0000 (Closed)
Patch Set: rebase and fix test bugs detected by swarm bot. 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 unified diff | Download patch
« no previous file with comments | « net/quic/test_tools/quic_test_utils.h ('k') | net/tools/quic/end_to_end_test.cc » ('j') | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/test_tools/quic_test_utils.h" 5 #include "net/quic/test_tools/quic_test_utils.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <memory> 8 #include <memory>
9 9
10 #include "net/quic/core/crypto/crypto_framer.h" 10 #include "net/quic/core/crypto/crypto_framer.h"
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after
829 helper, alarm_factory, Perspective::IS_SERVER, supported_versions); 829 helper, alarm_factory, Perspective::IS_SERVER, supported_versions);
830 *server_session = new TestQuicSpdyServerSession( 830 *server_session = new TestQuicSpdyServerSession(
831 *server_connection, DefaultQuicConfig(), server_crypto_config, 831 *server_connection, DefaultQuicConfig(), server_crypto_config,
832 compressed_certs_cache); 832 compressed_certs_cache);
833 833
834 // We advance the clock initially because the default time is zero and the 834 // We advance the clock initially because the default time is zero and the
835 // strike register worries that we've just overflowed a uint32_t time. 835 // strike register worries that we've just overflowed a uint32_t time.
836 (*server_connection)->AdvanceTime(connection_start_time); 836 (*server_connection)->AdvanceTime(connection_start_time);
837 } 837 }
838 838
839 QuicStreamId QuicClientDataStreamId(int i) { 839 QuicStreamId NextStreamId(QuicVersion version) {
840 return kClientDataStreamId1 + 2 * i; 840 // TODO(ckrasic) - when version for http stream pairs re-lands, this
841 // will be conditional.
842 return 2;
843 }
844
845 QuicStreamId GetNthClientInitiatedStreamId(QuicVersion version, int n) {
846 return 5 + NextStreamId(version) * n;
847 }
848
849 QuicStreamId GetNthServerInitiatedStreamId(QuicVersion version, int n) {
850 return 2 + NextStreamId(version) * n;
841 } 851 }
842 852
843 } // namespace test 853 } // namespace test
844 } // namespace net 854 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/test_tools/quic_test_utils.h ('k') | net/tools/quic/end_to_end_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698