| 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 "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
| 9 #include "net/quic/quic_utils.h" | 9 #include "net/quic/quic_utils.h" |
| 10 #include "net/quic/spdy_utils.h" | 10 #include "net/quic/spdy_utils.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 | 35 |
| 36 namespace { | 36 namespace { |
| 37 | 37 |
| 38 class MockQuicClientSession : public QuicClientSession { | 38 class MockQuicClientSession : public QuicClientSession { |
| 39 public: | 39 public: |
| 40 explicit MockQuicClientSession(QuicConnection* connection, | 40 explicit MockQuicClientSession(QuicConnection* connection, |
| 41 QuicClientPushPromiseIndex* push_promise_index) | 41 QuicClientPushPromiseIndex* push_promise_index) |
| 42 : QuicClientSession( | 42 : QuicClientSession( |
| 43 DefaultQuicConfig(), | 43 DefaultQuicConfig(), |
| 44 connection, | 44 connection, |
| 45 QuicServerId("example.com", 80, PRIVACY_MODE_DISABLED), | 45 QuicServerId("example.com", 443, PRIVACY_MODE_DISABLED), |
| 46 &crypto_config_, | 46 &crypto_config_, |
| 47 push_promise_index), | 47 push_promise_index), |
| 48 crypto_config_(CryptoTestUtils::ProofVerifierForTesting()) {} | 48 crypto_config_(CryptoTestUtils::ProofVerifierForTesting()) {} |
| 49 ~MockQuicClientSession() override {} | 49 ~MockQuicClientSession() override {} |
| 50 | 50 |
| 51 MOCK_METHOD1(CloseStream, void(QuicStreamId stream_id)); | 51 MOCK_METHOD1(CloseStream, void(QuicStreamId stream_id)); |
| 52 | 52 |
| 53 private: | 53 private: |
| 54 QuicCryptoClientConfig crypto_config_; | 54 QuicCryptoClientConfig crypto_config_; |
| 55 | 55 |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 // Now send the body, which should close the stream as the FIN has been | 161 // Now send the body, which should close the stream as the FIN has been |
| 162 // received, as well as all data. | 162 // received, as well as all data. |
| 163 EXPECT_CALL(session_, CloseStream(stream_->id())); | 163 EXPECT_CALL(session_, CloseStream(stream_->id())); |
| 164 stream_->OnStreamFrame( | 164 stream_->OnStreamFrame( |
| 165 QuicStreamFrame(stream_->id(), /*fin=*/false, /*offset=*/0, body_)); | 165 QuicStreamFrame(stream_->id(), /*fin=*/false, /*offset=*/0, body_)); |
| 166 } | 166 } |
| 167 | 167 |
| 168 } // namespace | 168 } // namespace |
| 169 } // namespace test | 169 } // namespace test |
| 170 } // namespace net | 170 } // namespace net |
| OLD | NEW |