Lines Matching refs:session_

111       : session_(session),
116 session_->MarkWriteBlocked(stream_id_, kSomeMiddlePriority);
120 QuicSession* const session_;
192 session_(connection_) {
193 session_.config()->SetInitialFlowControlWindowToSend(
195 session_.config()->SetInitialStreamFlowControlWindowToSend(
197 session_.config()->SetInitialSessionFlowControlWindowToSend(
231 EXPECT_FALSE(session_.IsClosedStream(i)) << " stream id: " << i;
233 EXPECT_TRUE(session_.IsClosedStream(i)) << " stream id: " << i;
239 session_.CloseStream(id);
246 TestSession session_;
255 EXPECT_EQ(IPEndPoint(Loopback4(), kTestPort), session_.peer_address());
259 EXPECT_FALSE(session_.IsCryptoHandshakeConfirmed());
261 session_.GetCryptoStream()->OnHandshakeMessage(message);
262 EXPECT_TRUE(session_.IsCryptoHandshakeConfirmed());
268 EXPECT_FALSE(session_.IsClosedStream(i)) << "stream id: " << i;
273 ASSERT_TRUE(session_.GetIncomingDataStream(7) != NULL);
275 EXPECT_FALSE(session_.IsClosedStream(3));
276 EXPECT_FALSE(session_.IsClosedStream(5));
277 ASSERT_TRUE(session_.GetIncomingDataStream(5) != NULL);
278 ASSERT_TRUE(session_.GetIncomingDataStream(3) != NULL);
282 TestStream* stream2 = session_.CreateOutgoingDataStream();
284 TestStream* stream4 = session_.CreateOutgoingDataStream();
297 QuicDataStream* stream1 = session_.GetIncomingDataStream(stream_id1);
299 QuicDataStream* stream2 = session_.GetIncomingDataStream(stream_id2);
307 QuicDataStream* stream3 = session_.GetIncomingDataStream(stream_id2 + 4);
317 session_.GetIncomingDataStream(stream_id);
319 session_.GetIncomingDataStream(stream_id + kMaxStreamIdDelta + 2);
323 QuicHeadersStream* stream = QuicSessionPeer::GetHeadersStream(&session_);
340 TestStream* stream2 = session_.CreateOutgoingDataStream();
347 session_.MarkWriteBlocked(kClosedStreamId, kSomeMiddlePriority),
355 TestStream* stream2 = session_.CreateOutgoingDataStream();
360 session_.MarkWriteBlocked(stream2->id(), kDifferentPriority),
366 TestStream* stream2 = session_.CreateOutgoingDataStream();
367 TestStream* stream4 = session_.CreateOutgoingDataStream();
368 TestStream* stream6 = session_.CreateOutgoingDataStream();
370 session_.MarkWriteBlocked(stream2->id(), kSomeMiddlePriority);
371 session_.MarkWriteBlocked(stream6->id(), kSomeMiddlePriority);
372 session_.MarkWriteBlocked(stream4->id(), kSomeMiddlePriority);
375 StreamBlocker stream2_blocker(&session_, stream2->id());
381 session_.OnCanWrite();
382 EXPECT_TRUE(session_.WillingAndAbleToWrite());
388 QuicConnectionPeer::SetSendAlgorithm(session_.connection(), send_algorithm);
390 TestStream* stream2 = session_.CreateOutgoingDataStream();
391 TestStream* stream4 = session_.CreateOutgoingDataStream();
392 TestStream* stream6 = session_.CreateOutgoingDataStream();
394 session_.MarkWriteBlocked(stream2->id(), kSomeMiddlePriority);
395 session_.MarkWriteBlocked(stream6->id(), kSomeMiddlePriority);
396 session_.MarkWriteBlocked(stream4->id(), kSomeMiddlePriority);
404 &session_, &TestSession::SendStreamData, stream2->id()))));
407 &session_, &TestSession::SendStreamData, stream4->id()))));
410 &session_, &TestSession::SendStreamData, stream6->id()))));
416 QuicConnectionPeer::GetWriter(session_.connection()));
420 session_.OnCanWrite();
421 EXPECT_FALSE(session_.WillingAndAbleToWrite());
429 QuicConnectionPeer::SetSendAlgorithm(session_.connection(), send_algorithm);
431 TestStream* stream2 = session_.CreateOutgoingDataStream();
432 TestStream* stream4 = session_.CreateOutgoingDataStream();
433 TestStream* stream6 = session_.CreateOutgoingDataStream();
435 session_.MarkWriteBlocked(stream2->id(), kSomeMiddlePriority);
436 session_.MarkWriteBlocked(stream6->id(), kSomeMiddlePriority);
437 session_.MarkWriteBlocked(stream4->id(), kSomeMiddlePriority);
439 StreamBlocker stream2_blocker(&session_, stream2->id());
450 session_.OnCanWrite();
451 EXPECT_TRUE(session_.WillingAndAbleToWrite());
456 session_.OnCanWrite();
457 EXPECT_TRUE(session_.WillingAndAbleToWrite());
464 session_.OnCanWrite();
465 EXPECT_FALSE(session_.WillingAndAbleToWrite());
469 EXPECT_FALSE(session_.HasPendingHandshake()); // Default value.
472 TestStream* stream2 = session_.CreateOutgoingDataStream();
473 StreamBlocker stream2_blocker(&session_, stream2->id());
475 EXPECT_FALSE(session_.HasPendingHandshake());
477 TestStream* stream3 = session_.CreateOutgoingDataStream();
478 StreamBlocker stream3_blocker(&session_, stream3->id());
480 EXPECT_FALSE(session_.HasPendingHandshake());
483 session_.MarkWriteBlocked(kCryptoStreamId, kHighestPriority);
484 EXPECT_TRUE(session_.HasPendingHandshake());
486 TestStream* stream4 = session_.CreateOutgoingDataStream();
487 StreamBlocker stream4_blocker(&session_, stream4->id());
489 EXPECT_TRUE(session_.HasPendingHandshake());
498 TestCryptoStream* crypto_stream = session_.GetCryptoStream();
509 session_.OnCanWrite();
510 EXPECT_TRUE(session_.WillingAndAbleToWrite());
511 EXPECT_FALSE(session_.HasPendingHandshake()); // Crypto stream wrote.
515 TestStream* stream2 = session_.CreateOutgoingDataStream();
516 TestStream* stream4 = session_.CreateOutgoingDataStream();
517 TestStream* stream6 = session_.CreateOutgoingDataStream();
519 session_.MarkWriteBlocked(stream2->id(), kSomeMiddlePriority);
520 session_.MarkWriteBlocked(stream6->id(), kSomeMiddlePriority);
521 session_.MarkWriteBlocked(stream4->id(), kSomeMiddlePriority);
527 session_.OnCanWrite();
528 EXPECT_FALSE(session_.WillingAndAbleToWrite());
537 QuicFlowControllerPeer::SetSendWindowOffset(session_.flow_controller(), 0);
538 EXPECT_TRUE(session_.flow_controller()->IsBlocked());
542 session_.MarkWriteBlocked(kCryptoStreamId, kHighestPriority);
543 session_.MarkWriteBlocked(kHeadersStreamId, kHighestPriority);
547 TestStream* stream = session_.CreateOutgoingDataStream();
548 session_.MarkWriteBlocked(stream->id(), kSomeMiddlePriority);
553 TestCryptoStream* crypto_stream = session_.GetCryptoStream();
555 TestHeadersStream* headers_stream = new TestHeadersStream(&session_);
556 QuicSessionPeer::SetHeadersStream(&session_, headers_stream);
559 session_.OnCanWrite();
560 EXPECT_FALSE(session_.WillingAndAbleToWrite());
566 session_.SendGoAway(QUIC_PEER_GOING_AWAY, "Going Away.");
567 EXPECT_TRUE(session_.goaway_sent());
571 EXPECT_TRUE(session_.GetIncomingDataStream(3u));
577 session_.SendGoAway(QUIC_PEER_GOING_AWAY, "Going Away.");
578 EXPECT_TRUE(session_.goaway_sent());
579 session_.SendGoAway(QUIC_PEER_GOING_AWAY, "Going Away.");
587 session_.GetCryptoStream()->OnHandshakeMessage(msg);
597 session_.OnStreamFrames(frames);
598 EXPECT_EQ(1u, session_.GetNumOpenStreams());
601 session_.OnRstStream(rst1);
602 EXPECT_EQ(0u, session_.GetNumOpenStreams());
616 session_.OnStreamFrames(frames);
617 EXPECT_EQ(1u, session_.GetNumOpenStreams());
625 session_.OnRstStream(rst1);
631 session_.OnRstStream(rst2);
643 session_.set_writev_consumes_all_data(true);
646 TestStream* stream2 = session_.CreateOutgoingDataStream();
658 session_.GetCryptoStream()->OnHandshakeMessage(msg);
670 session_.set_writev_consumes_all_data(true);
671 TestCryptoStream* crypto_stream = session_.GetCryptoStream();
674 QuicSessionPeer::GetHeadersStream(&session_);
687 EXPECT_FALSE(session_.HasDataToWrite());
696 session_.GetCryptoStream()->OnHandshakeMessage(msg);
708 session_.set_writev_consumes_all_data(true);
709 TestCryptoStream* crypto_stream = session_.GetCryptoStream();
712 QuicSessionPeer::GetHeadersStream(&session_);
726 EXPECT_FALSE(session_.HasDataToWrite());
732 session_.GetCryptoStream()->OnHandshakeMessage(msg);
748 QuicConfigPeer::SetReceivedInitialFlowControlWindow(session_.config(),
753 session_.OnConfigNegotiated();
764 QuicConfigPeer::SetReceivedInitialStreamFlowControlWindow(session_.config(),
769 session_.OnConfigNegotiated();
780 QuicConfigPeer::SetReceivedInitialSessionFlowControlWindow(session_.config(),
785 session_.OnConfigNegotiated();
797 TestStream* stream = session_.CreateOutgoingDataStream();
811 session_.OnRstStream(rst_frame);
812 session_.PostProcessAfterData();
813 EXPECT_EQ(kByteOffset, session_.flow_controller()->bytes_consumed());
826 TestStream* stream = session_.CreateOutgoingDataStream();
833 session_.OnStreamFrames(frames);
834 session_.PostProcessAfterData();
856 EXPECT_EQ(kByteOffset, session_.flow_controller()->bytes_consumed());
873 session_.flow_controller()->UpdateHighestReceivedOffset(
875 session_.flow_controller()->AddBytesConsumed(kInitialConnectionBytesConsumed);
878 TestStream* stream = session_.CreateOutgoingDataStream();
890 session_.OnStreamFrames(frames);
895 session_.flow_controller()->bytes_consumed());
898 session_.flow_controller()->highest_received_byte_offset());
915 session_.flow_controller()->UpdateHighestReceivedOffset(
917 session_.flow_controller()->AddBytesConsumed(kInitialConnectionBytesConsumed);
920 TestStream* stream = session_.CreateOutgoingDataStream();
929 session_.OnRstStream(rst_frame);
932 session_.flow_controller()->bytes_consumed());
934 session_.flow_controller()->highest_received_byte_offset());
950 TestStream* stream = session_.CreateOutgoingDataStream();
955 session_.OnStreamFrames(frames);
960 session_.OnRstStream(rst_frame);
972 TestStream* stream = session_.CreateOutgoingDataStream();
974 EXPECT_TRUE(session_.flow_controller()->IsEnabled());
978 session_.OnSuccessfulVersionNegotiation(QUIC_VERSION_18);
979 EXPECT_FALSE(session_.flow_controller()->IsEnabled());
983 session_.OnSuccessfulVersionNegotiation(QUIC_VERSION_16);
984 EXPECT_FALSE(session_.flow_controller()->IsEnabled());
997 QuicSessionPeer::GetHeadersStream(&session_);
1007 session_.OnWindowUpdateFrames(frames);
1024 QuicSessionPeer::SetMaxOpenStreams(&session_, kMaxStreams);
1034 session_.OnStreamFrames(frames);
1035 EXPECT_EQ(1u, session_.GetNumOpenStreams());
1036 session_.CloseStream(i);
1041 session_.PostProcessAfterData();