| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 server_id, | 62 server_id, |
| 63 crypto_config, | 63 crypto_config, |
| 64 push_promise_index) {} | 64 push_promise_index) {} |
| 65 | 65 |
| 66 QuicSpdyClientStream* CreateClientStream() override { | 66 QuicSpdyClientStream* CreateClientStream() override { |
| 67 return new MockQuicSpdyClientStream(GetNextOutgoingStreamId(), this); | 67 return new MockQuicSpdyClientStream(GetNextOutgoingStreamId(), this); |
| 68 } | 68 } |
| 69 | 69 |
| 70 MockQuicSpdyClientStream* CreateIncomingDynamicStream( | 70 MockQuicSpdyClientStream* CreateIncomingDynamicStream( |
| 71 QuicStreamId id) override { | 71 QuicStreamId id) override { |
| 72 return new MockQuicSpdyClientStream(id, this); | 72 MockQuicSpdyClientStream* stream = new MockQuicSpdyClientStream(id, this); |
| 73 ActivateStream(stream); |
| 74 return stream; |
| 73 } | 75 } |
| 74 }; | 76 }; |
| 75 | 77 |
| 76 class QuicClientSessionTest : public ::testing::TestWithParam<QuicVersion> { | 78 class QuicClientSessionTest : public ::testing::TestWithParam<QuicVersion> { |
| 77 protected: | 79 protected: |
| 78 QuicClientSessionTest() | 80 QuicClientSessionTest() |
| 79 : crypto_config_(CryptoTestUtils::ProofVerifierForTesting()), | 81 : crypto_config_(CryptoTestUtils::ProofVerifierForTesting()), |
| 80 promised_stream_id_(kServerDataStreamId1), | 82 promised_stream_id_(kServerDataStreamId1), |
| 81 associated_stream_id_(kClientDataStreamId1) { | 83 associated_stream_id_(kClientDataStreamId1) { |
| 82 Initialize(); | 84 Initialize(); |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 512 QuicClientPromisedInfo* promised = | 514 QuicClientPromisedInfo* promised = |
| 513 session_->GetPromisedById(promised_stream_id_); | 515 session_->GetPromisedById(promised_stream_id_); |
| 514 EXPECT_NE(promised, nullptr); | 516 EXPECT_NE(promised, nullptr); |
| 515 EXPECT_NE(session_->GetPromisedByUrl(promise_url_), nullptr); | 517 EXPECT_NE(session_->GetPromisedByUrl(promise_url_), nullptr); |
| 516 EXPECT_EQ(session_->GetPromisedStream(promised_stream_id_), nullptr); | 518 EXPECT_EQ(session_->GetPromisedStream(promised_stream_id_), nullptr); |
| 517 } | 519 } |
| 518 | 520 |
| 519 } // namespace | 521 } // namespace |
| 520 } // namespace test | 522 } // namespace test |
| 521 } // namespace net | 523 } // namespace net |
| OLD | NEW |