| 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/chromium/quic_chromium_client_stream.h" | 5 #include "net/quic/chromium/quic_chromium_client_stream.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 ON_CALL(*this, WritevData(_, _, _, _, _, _)) | 161 ON_CALL(*this, WritevData(_, _, _, _, _, _)) |
| 162 .WillByDefault(testing::Return(QuicConsumedData(0, false))); | 162 .WillByDefault(testing::Return(QuicConsumedData(0, false))); |
| 163 } | 163 } |
| 164 | 164 |
| 165 MockQuicClientSessionBase::~MockQuicClientSessionBase() {} | 165 MockQuicClientSessionBase::~MockQuicClientSessionBase() {} |
| 166 | 166 |
| 167 class QuicChromiumClientStreamTest | 167 class QuicChromiumClientStreamTest |
| 168 : public ::testing::TestWithParam<QuicVersion> { | 168 : public ::testing::TestWithParam<QuicVersion> { |
| 169 public: | 169 public: |
| 170 QuicChromiumClientStreamTest() | 170 QuicChromiumClientStreamTest() |
| 171 : crypto_config_(CryptoTestUtils::ProofVerifierForTesting()), | 171 : crypto_config_(crypto_test_utils::ProofVerifierForTesting()), |
| 172 session_(new MockQuicConnection(&helper_, | 172 session_(new MockQuicConnection(&helper_, |
| 173 &alarm_factory_, | 173 &alarm_factory_, |
| 174 Perspective::IS_CLIENT, | 174 Perspective::IS_CLIENT, |
| 175 SupportedVersions(GetParam())), | 175 SupportedVersions(GetParam())), |
| 176 &push_promise_index_) { | 176 &push_promise_index_) { |
| 177 stream_ = new QuicChromiumClientStream(kTestStreamId, &session_, | 177 stream_ = new QuicChromiumClientStream(kTestStreamId, &session_, |
| 178 NetLogWithSource()); | 178 NetLogWithSource()); |
| 179 session_.ActivateStream(base::WrapUnique(stream_)); | 179 session_.ActivateStream(base::WrapUnique(stream_)); |
| 180 stream_->SetDelegate(&delegate_); | 180 stream_->SetDelegate(&delegate_); |
| 181 } | 181 } |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 591 stream->SetDelegate(&delegate_); | 591 stream->SetDelegate(&delegate_); |
| 592 ProcessHeadersFull(headers_); | 592 ProcessHeadersFull(headers_); |
| 593 | 593 |
| 594 // Times(2) because OnClose will be called for stream and stream_. | 594 // Times(2) because OnClose will be called for stream and stream_. |
| 595 EXPECT_CALL(delegate_, OnClose()).Times(2); | 595 EXPECT_CALL(delegate_, OnClose()).Times(2); |
| 596 } | 596 } |
| 597 | 597 |
| 598 } // namespace | 598 } // namespace |
| 599 } // namespace test | 599 } // namespace test |
| 600 } // namespace net | 600 } // namespace net |
| OLD | NEW |