Chromium Code Reviews| Index: net/http/bidirectional_stream_unittest.cc |
| diff --git a/net/http/bidirectional_stream_unittest.cc b/net/http/bidirectional_stream_unittest.cc |
| index 9fa41cf62a693e7c8fefe236761cbe22cf2461eb..1c7ada674844d59939e46d03f021fac97fe2de84 100644 |
| --- a/net/http/bidirectional_stream_unittest.cc |
| +++ b/net/http/bidirectional_stream_unittest.cc |
| @@ -58,12 +58,15 @@ class TestDelegateBase : public BidirectionalStream::Delegate { |
| on_data_sent_count_(0), |
| do_not_start_read_(false), |
| run_until_completion_(false), |
| - not_expect_callback_(false), |
| - disable_auto_flush_(false) {} |
| + not_expect_callback_(false) {} |
| ~TestDelegateBase() override {} |
| - void OnStreamReady() override { |
| + void OnStreamReady(bool request_headers_sent) override { |
| + // Request headers should always be sent in H2's case, because the |
| + // functionality to combine header frame with data frames is not |
| + // implemented. |
| + EXPECT_TRUE(request_headers_sent); |
| if (callback_.is_null()) |
| return; |
| callback_.Run(OK); |
| @@ -111,12 +114,11 @@ class TestDelegateBase : public BidirectionalStream::Delegate { |
| loop_->Quit(); |
| } |
| - void DisableAutoFlush() { disable_auto_flush_ = true; } |
| - |
| void Start(std::unique_ptr<BidirectionalStreamRequestInfo> request_info, |
| HttpNetworkSession* session) { |
| stream_.reset(new BidirectionalStream(std::move(request_info), session, |
| - false, this, std::move(timer_))); |
| + /*ignored*/ true, this, |
|
mef
2016/06/01 21:33:21
if it is /*ignored*/, why does it have to change t
xunjieli
2016/06/01 22:27:16
Done.
|
| + std::move(timer_))); |
| if (run_until_completion_) |
| loop_->Run(); |
| } |
| @@ -126,7 +128,7 @@ class TestDelegateBase : public BidirectionalStream::Delegate { |
| const CompletionCallback& cb) { |
| callback_ = cb; |
| stream_.reset(new BidirectionalStream(std::move(request_info), session, |
| - disable_auto_flush_, this, |
| + /*ignored*/ true, this, |
| std::move(timer_))); |
| if (run_until_completion_) |
| loop_->Run(); |
| @@ -222,7 +224,6 @@ class TestDelegateBase : public BidirectionalStream::Delegate { |
| // This is to ensure that delegate callback is not invoked synchronously when |
| // calling into |stream_|. |
| bool not_expect_callback_; |
| - bool disable_auto_flush_; |
| CompletionCallback callback_; |
| DISALLOW_COPY_AND_ASSIGN(TestDelegateBase); |
| @@ -759,7 +760,6 @@ TEST_F(BidirectionalStreamTest, TestCoalesceSmallDataBuffers) { |
| std::unique_ptr<TestDelegateBase> delegate(new TestDelegateBase( |
| read_buffer.get(), kReadBufferSize, base::WrapUnique(timer))); |
| delegate->set_do_not_start_read(true); |
| - delegate->DisableAutoFlush(); |
| TestCompletionCallback callback; |
| delegate->Start(std::move(request_info), http_session_.get(), |
| callback.callback()); |