| Index: net/quic/bidirectional_stream_quic_impl_unittest.cc
|
| diff --git a/net/quic/bidirectional_stream_quic_impl_unittest.cc b/net/quic/bidirectional_stream_quic_impl_unittest.cc
|
| index 825af4b39ffe560c4b6e4d86ea2da344f03ffd1e..da32a74041a76b7b0627e8704f30f81eb8d13173 100644
|
| --- a/net/quic/bidirectional_stream_quic_impl_unittest.cc
|
| +++ b/net/quic/bidirectional_stream_quic_impl_unittest.cc
|
| @@ -75,7 +75,7 @@ class TestDelegateBase : public BidirectionalStreamImpl::Delegate {
|
| on_data_read_count_(0),
|
| on_data_sent_count_(0),
|
| not_expect_callback_(false),
|
| - disable_auto_flush_(false) {
|
| + delay_headers_until_next_send_data_(false) {
|
| loop_.reset(new base::RunLoop);
|
| }
|
|
|
| @@ -130,8 +130,8 @@ class TestDelegateBase : public BidirectionalStreamImpl::Delegate {
|
| const BoundNetLog& net_log,
|
| const base::WeakPtr<QuicChromiumClientSession> session) {
|
| stream_job_.reset(new BidirectionalStreamQuicImpl(session));
|
| - stream_job_->Start(request_info, net_log, disable_auto_flush_, this,
|
| - nullptr);
|
| + stream_job_->Start(request_info, net_log,
|
| + delay_headers_until_next_send_data_, this, nullptr);
|
| }
|
|
|
| void SendData(const scoped_refptr<IOBuffer>& data,
|
| @@ -179,7 +179,9 @@ class TestDelegateBase : public BidirectionalStreamImpl::Delegate {
|
|
|
| int64_t GetTotalSentBytes() const { return stream_job_->GetTotalSentBytes(); }
|
|
|
| - void DisableAutoFlush() { disable_auto_flush_ = true; }
|
| + void DelayHeadersUntilNextSendData() {
|
| + delay_headers_until_next_send_data_ = true;
|
| + }
|
|
|
| // Const getters for internal states.
|
| const std::string& data_received() const { return data_received_; }
|
| @@ -212,7 +214,7 @@ class TestDelegateBase : public BidirectionalStreamImpl::Delegate {
|
| // calling into |stream_|.
|
| bool not_expect_callback_;
|
| CompletionCallback callback_;
|
| - bool disable_auto_flush_;
|
| + bool delay_headers_until_next_send_data_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(TestDelegateBase);
|
| };
|
| @@ -705,7 +707,7 @@ TEST_P(BidirectionalStreamQuicImplTest, CoalesceSmallBuffers) {
|
| scoped_refptr<IOBuffer> read_buffer(new IOBuffer(kReadBufferSize));
|
| std::unique_ptr<TestDelegateBase> delegate(
|
| new TestDelegateBase(read_buffer.get(), kReadBufferSize));
|
| - delegate->DisableAutoFlush();
|
| + delegate->DelayHeadersUntilNextSendData();
|
| delegate->Start(&request, net_log().bound(), session()->GetWeakPtr());
|
| delegate->WaitUntilNextCallback(); // OnStreamReady
|
|
|
|
|