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/tools/quic/quic_client_session.h" | 5 #include "net/tools/quic/quic_client_session.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "net/base/ip_endpoint.h" | 10 #include "net/base/ip_endpoint.h" |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 std::unique_ptr<TestQuicClientSession> session_; | 134 std::unique_ptr<TestQuicClientSession> session_; |
135 QuicClientPushPromiseIndex push_promise_index_; | 135 QuicClientPushPromiseIndex push_promise_index_; |
136 SpdyHeaderBlock push_promise_; | 136 SpdyHeaderBlock push_promise_; |
137 string promise_url_; | 137 string promise_url_; |
138 QuicStreamId promised_stream_id_; | 138 QuicStreamId promised_stream_id_; |
139 QuicStreamId associated_stream_id_; | 139 QuicStreamId associated_stream_id_; |
140 }; | 140 }; |
141 | 141 |
142 INSTANTIATE_TEST_CASE_P(Tests, | 142 INSTANTIATE_TEST_CASE_P(Tests, |
143 QuicClientSessionTest, | 143 QuicClientSessionTest, |
144 ::testing::ValuesIn(QuicSupportedVersions())); | 144 ::testing::ValuesIn(AllSupportedVersions())); |
145 | 145 |
146 TEST_P(QuicClientSessionTest, CryptoConnect) { | 146 TEST_P(QuicClientSessionTest, CryptoConnect) { |
147 CompleteCryptoHandshake(); | 147 CompleteCryptoHandshake(); |
148 } | 148 } |
149 | 149 |
150 TEST_P(QuicClientSessionTest, NoEncryptionAfterInitialEncryption) { | 150 TEST_P(QuicClientSessionTest, NoEncryptionAfterInitialEncryption) { |
151 // Complete a handshake in order to prime the crypto config for 0-RTT. | 151 // Complete a handshake in order to prime the crypto config for 0-RTT. |
152 CompleteCryptoHandshake(); | 152 CompleteCryptoHandshake(); |
153 | 153 |
154 // Now create a second session using the same crypto config. | 154 // Now create a second session using the same crypto config. |
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 QuicClientPromisedInfo* promised = | 527 QuicClientPromisedInfo* promised = |
528 session_->GetPromisedById(promised_stream_id_); | 528 session_->GetPromisedById(promised_stream_id_); |
529 EXPECT_NE(promised, nullptr); | 529 EXPECT_NE(promised, nullptr); |
530 EXPECT_NE(session_->GetPromisedByUrl(promise_url_), nullptr); | 530 EXPECT_NE(session_->GetPromisedByUrl(promise_url_), nullptr); |
531 EXPECT_EQ(session_->GetPromisedStream(promised_stream_id_), nullptr); | 531 EXPECT_EQ(session_->GetPromisedStream(promised_stream_id_), nullptr); |
532 } | 532 } |
533 | 533 |
534 } // namespace | 534 } // namespace |
535 } // namespace test | 535 } // namespace test |
536 } // namespace net | 536 } // namespace net |
OLD | NEW |