OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/spdy/bidirectional_stream_spdy_impl.h" | 5 #include "net/spdy/bidirectional_stream_spdy_impl.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 delegate->SendData(buf.get(), buf->size(), false); | 353 delegate->SendData(buf.get(), buf->size(), false); |
354 sequenced_data_->Resume(); | 354 sequenced_data_->Resume(); |
355 base::RunLoop().RunUntilIdle(); | 355 base::RunLoop().RunUntilIdle(); |
356 // Cancel the stream. | 356 // Cancel the stream. |
357 delegate->CancelStream(); | 357 delegate->CancelStream(); |
358 sequenced_data_->Resume(); | 358 sequenced_data_->Resume(); |
359 base::RunLoop().RunUntilIdle(); | 359 base::RunLoop().RunUntilIdle(); |
360 | 360 |
361 // Try to send data after Cancel(), should not get called back. | 361 // Try to send data after Cancel(), should not get called back. |
362 delegate->SendData(buf.get(), buf->size(), false); | 362 delegate->SendData(buf.get(), buf->size(), false); |
363 base::MessageLoop::current()->RunUntilIdle(); | 363 base::RunLoop().RunUntilIdle(); |
364 EXPECT_FALSE(delegate->on_failed_called()); | 364 EXPECT_FALSE(delegate->on_failed_called()); |
365 | 365 |
366 EXPECT_EQ("200", delegate->response_headers().find(":status")->second); | 366 EXPECT_EQ("200", delegate->response_headers().find(":status")->second); |
367 EXPECT_EQ(0, delegate->on_data_read_count()); | 367 EXPECT_EQ(0, delegate->on_data_read_count()); |
368 EXPECT_EQ(kProtoHTTP2, delegate->GetProtocol()); | 368 EXPECT_EQ(kProtoHTTP2, delegate->GetProtocol()); |
369 EXPECT_EQ(0, delegate->GetTotalSentBytes()); | 369 EXPECT_EQ(0, delegate->GetTotalSentBytes()); |
370 EXPECT_EQ(0, delegate->GetTotalReceivedBytes()); | 370 EXPECT_EQ(0, delegate->GetTotalReceivedBytes()); |
371 } | 371 } |
372 | 372 |
373 } // namespace net | 373 } // namespace net |
OLD | NEW |