| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_spdy_client_stream.h" | 5 #include "net/tools/quic/quic_spdy_client_stream.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "net/quic/core/quic_utils.h" | 10 #include "net/quic/core/quic_utils.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 class MockQuicClientSession : public QuicClientSession { | 31 class MockQuicClientSession : public QuicClientSession { |
| 32 public: | 32 public: |
| 33 explicit MockQuicClientSession(QuicConnection* connection, | 33 explicit MockQuicClientSession(QuicConnection* connection, |
| 34 QuicClientPushPromiseIndex* push_promise_index) | 34 QuicClientPushPromiseIndex* push_promise_index) |
| 35 : QuicClientSession( | 35 : QuicClientSession( |
| 36 DefaultQuicConfig(), | 36 DefaultQuicConfig(), |
| 37 connection, | 37 connection, |
| 38 QuicServerId("example.com", 443, PRIVACY_MODE_DISABLED), | 38 QuicServerId("example.com", 443, PRIVACY_MODE_DISABLED), |
| 39 &crypto_config_, | 39 &crypto_config_, |
| 40 push_promise_index), | 40 push_promise_index), |
| 41 crypto_config_(CryptoTestUtils::ProofVerifierForTesting()) {} | 41 crypto_config_(crypto_test_utils::ProofVerifierForTesting()) {} |
| 42 ~MockQuicClientSession() override {} | 42 ~MockQuicClientSession() override {} |
| 43 | 43 |
| 44 MOCK_METHOD1(CloseStream, void(QuicStreamId stream_id)); | 44 MOCK_METHOD1(CloseStream, void(QuicStreamId stream_id)); |
| 45 | 45 |
| 46 private: | 46 private: |
| 47 QuicCryptoClientConfig crypto_config_; | 47 QuicCryptoClientConfig crypto_config_; |
| 48 | 48 |
| 49 DISALLOW_COPY_AND_ASSIGN(MockQuicClientSession); | 49 DISALLOW_COPY_AND_ASSIGN(MockQuicClientSession); |
| 50 }; | 50 }; |
| 51 | 51 |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 // Now send the body, which should close the stream as the FIN has been | 197 // Now send the body, which should close the stream as the FIN has been |
| 198 // received, as well as all data. | 198 // received, as well as all data. |
| 199 EXPECT_CALL(session_, CloseStream(stream_->id())); | 199 EXPECT_CALL(session_, CloseStream(stream_->id())); |
| 200 stream_->OnStreamFrame( | 200 stream_->OnStreamFrame( |
| 201 QuicStreamFrame(stream_->id(), /*fin=*/false, /*offset=*/0, body_)); | 201 QuicStreamFrame(stream_->id(), /*fin=*/false, /*offset=*/0, body_)); |
| 202 } | 202 } |
| 203 | 203 |
| 204 } // namespace | 204 } // namespace |
| 205 } // namespace test | 205 } // namespace test |
| 206 } // namespace net | 206 } // namespace net |
| OLD | NEW |