Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Side by Side Diff: net/quic/chromium/bidirectional_stream_quic_impl_unittest.cc

Issue 2409273002: QuicChromiumClientStream handle Read() after trailers are received but not yet delivered (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/quic/chromium/bidirectional_stream_quic_impl.h" 5 #include "net/quic/chromium/bidirectional_stream_quic_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 1694 matching lines...) Expand 10 before | Expand all | Expand 10 after
1705 EXPECT_EQ(1, delegate->on_data_read_count()); 1705 EXPECT_EQ(1, delegate->on_data_read_count());
1706 EXPECT_EQ(0, delegate->on_data_sent_count()); 1706 EXPECT_EQ(0, delegate->on_data_sent_count());
1707 } 1707 }
1708 1708
1709 TEST_P(BidirectionalStreamQuicImplTest, DeleteStreamDuringOnTrailersReceived) { 1709 TEST_P(BidirectionalStreamQuicImplTest, DeleteStreamDuringOnTrailersReceived) {
1710 SetRequest("GET", "/", DEFAULT_PRIORITY); 1710 SetRequest("GET", "/", DEFAULT_PRIORITY);
1711 size_t spdy_request_headers_frame_length; 1711 size_t spdy_request_headers_frame_length;
1712 AddWrite(ConstructRequestHeadersPacket(1, kFin, DEFAULT_PRIORITY, 1712 AddWrite(ConstructRequestHeadersPacket(1, kFin, DEFAULT_PRIORITY,
1713 &spdy_request_headers_frame_length)); 1713 &spdy_request_headers_frame_length));
1714 AddWrite(ConstructClientAckPacket(2, 3, 1)); // Ack the data packet 1714 AddWrite(ConstructClientAckPacket(2, 3, 1)); // Ack the data packet
1715 AddWrite(ConstructClientAckAndRstStreamPacket(3, 4, 4, 1));
1715 1716
1716 Initialize(); 1717 Initialize();
1717 1718
1718 BidirectionalStreamRequestInfo request; 1719 BidirectionalStreamRequestInfo request;
1719 request.method = "GET"; 1720 request.method = "GET";
1720 request.url = GURL("http://www.google.com/"); 1721 request.url = GURL("http://www.google.com/");
1721 request.end_stream_on_headers = true; 1722 request.end_stream_on_headers = true;
1722 request.priority = DEFAULT_PRIORITY; 1723 request.priority = DEFAULT_PRIORITY;
1723 1724
1724 scoped_refptr<IOBuffer> read_buffer(new IOBuffer(kReadBufferSize)); 1725 scoped_refptr<IOBuffer> read_buffer(new IOBuffer(kReadBufferSize));
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
1769 1770
1770 base::RunLoop().RunUntilIdle(); 1771 base::RunLoop().RunUntilIdle();
1771 1772
1772 EXPECT_EQ(1, delegate->on_data_read_count()); 1773 EXPECT_EQ(1, delegate->on_data_read_count());
1773 EXPECT_EQ(0, delegate->on_data_sent_count()); 1774 EXPECT_EQ(0, delegate->on_data_sent_count());
1774 } 1775 }
1775 1776
1776 } // namespace test 1777 } // namespace test
1777 1778
1778 } // namespace net 1779 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/chromium/bidirectional_stream_quic_impl.cc ('k') | net/quic/chromium/quic_chromium_client_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698