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

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

Issue 2862563003: Landing Recent QUIC changes until Sat Apr 29 00:22:04 2017 +0000 (Closed)
Patch Set: rebase and fix test bugs detected by swarm bot. Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/core/quic_spdy_stream_test.cc ('k') | net/quic/core/quic_write_blocked_list_test.cc » ('j') | 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 7515b4abbca57cbc33a689c9d13b27fa07350cc5..f65394dc7303009983acce6e32b64f875150c395 100644
--- a/net/quic/core/quic_stream_sequencer_test.cc
+++ b/net/quic/core/quic_stream_sequencer_test.cc
@@ -16,6 +16,7 @@
#include "net/quic/platform/api/quic_string_piece.h"
#include "net/quic/platform/api/quic_test.h"
#include "net/quic/test_tools/mock_clock.h"
+#include "net/quic/test_tools/quic_spdy_session_peer.h"
#include "net/quic/test_tools/quic_stream_sequencer_peer.h"
#include "net/quic/test_tools/quic_test_utils.h"
#include "net/test/gtest_util.h"
@@ -569,13 +570,13 @@ TEST_F(QuicStreamSequencerTest, MarkConsumedWithMissingPacket) {
TEST_F(QuicStreamSequencerTest, DontAcceptOverlappingFrames) {
// The peer should never send us non-identical stream frames which contain
// overlapping byte ranges - if they do, we close the connection.
+ QuicStreamId id =
+ QuicSpdySessionPeer::GetNthClientInitiatedStreamId(session_, 0);
- QuicStreamFrame frame1(kClientDataStreamId1, false, 1,
- QuicStringPiece("hello"));
+ QuicStreamFrame frame1(id, false, 1, QuicStringPiece("hello"));
sequencer_->OnStreamFrame(frame1);
- QuicStreamFrame frame2(kClientDataStreamId1, false, 2,
- QuicStringPiece("hello"));
+ QuicStreamFrame frame2(id, false, 2, QuicStringPiece("hello"));
EXPECT_CALL(stream_,
CloseConnectionWithDetails(QUIC_OVERLAPPING_STREAM_DATA, _))
.Times(1);
@@ -669,7 +670,9 @@ TEST_F(QuicStreamSequencerTest, OnStreamFrameWithNullSource) {
// connection with error.
QuicStringPiece source;
source.set(nullptr, 5u);
- QuicStreamFrame frame(kClientDataStreamId1, false, 1, source);
+ QuicStreamFrame frame(
+ QuicSpdySessionPeer::GetNthClientInitiatedStreamId(session_, 0), false, 1,
+ source);
EXPECT_CALL(stream_, CloseConnectionWithDetails(
QUIC_STREAM_SEQUENCER_INVALID_STATE, _));
sequencer_->OnStreamFrame(frame);
« no previous file with comments | « net/quic/core/quic_spdy_stream_test.cc ('k') | net/quic/core/quic_write_blocked_list_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698