OLD | NEW |
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 Loading... |
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 |
OLD | NEW |