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

Unified Diff: net/quic/core/quic_stream_sequencer_test.cc

Issue 2519333006: Add CHECK's to debug QuicStreamSequencerBuffer in weird state. Add a destruction indicator to detec… (Closed)
Patch Set: using CHECK_GT Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/core/quic_stream_sequencer_buffer_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_stream_sequencer_test.cc
diff --git a/net/quic/core/quic_stream_sequencer_test.cc b/net/quic/core/quic_stream_sequencer_test.cc
index ab6a257ade0f9d685f7135c0be7dac6f9f6b35a1..79db610f46bde66057fdfce4bc7ec2d73cc0afc1 100644
--- a/net/quic/core/quic_stream_sequencer_test.cc
+++ b/net/quic/core/quic_stream_sequencer_test.cc
@@ -659,31 +659,16 @@ TEST_F(QuicStreamSequencerTest, OutOfOrderTimestamps) {
EXPECT_EQ(0u, sequencer_->NumBytesBuffered());
}
-// TODO(danzh): Figure out the way to implement this test case without the use
-// of unsupported StringPiece constructor.
-#if 0
TEST_F(QuicStreamSequencerTest, OnStreamFrameWithNullSource) {
// Pass in a frame with data pointing to null address, expect to close
// connection with error.
- StringPiece source(nullptr, 5u);
+ StringPiece source;
+ source.set(nullptr, 5u);
QuicStreamFrame frame(kClientDataStreamId1, false, 1, source);
EXPECT_CALL(stream_, CloseConnectionWithDetails(
QUIC_STREAM_SEQUENCER_INVALID_STATE, _));
sequencer_->OnStreamFrame(frame);
}
-#endif
-
-TEST_F(QuicStreamSequencerTest, ReadvError) {
- EXPECT_CALL(stream_, OnDataAvailable());
- string source(100, 'a');
- OnFrame(0u, source.data());
- EXPECT_EQ(source.length(), sequencer_->NumBytesBuffered());
- // Pass in a null iovec, expect to tear down connection.
- EXPECT_CALL(stream_, CloseConnectionWithDetails(
- QUIC_STREAM_SEQUENCER_INVALID_STATE, _));
- iovec iov{nullptr, 512};
- sequencer_->Readv(&iov, 1u);
-}
} // namespace
} // namespace test
« no previous file with comments | « net/quic/core/quic_stream_sequencer_buffer_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698