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

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

Issue 2861673004: QUIC - refactor stream creation. Guarded by --quic_reloadable_flag_quic_refactor_stream_creation. (Closed)
Patch Set: Updated patchset dependency 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_session.cc ('k') | net/quic/core/quic_spdy_session.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_session_test.cc
diff --git a/net/quic/core/quic_session_test.cc b/net/quic/core/quic_session_test.cc
index 9dac877787892cfcf981856c9f26d04c69dc405f..a5025626fb99d3bf2a228eb55515006a4c0a4537 100644
--- a/net/quic/core/quic_session_test.cc
+++ b/net/quic/core/quic_session_test.cc
@@ -72,6 +72,10 @@ class TestCryptoStream : public QuicCryptoStream {
session()->OnCryptoHandshakeEvent(QuicSession::HANDSHAKE_CONFIRMED);
}
+ void set_encryption_established(bool value) {
+ encryption_established_ = value;
+ }
+
MOCK_METHOD0(OnCanWrite, void());
};
@@ -159,6 +163,15 @@ class TestSession : public QuicSpdySession {
bool ShouldCreateOutgoingDynamicStream() override { return true; }
+ TestStream* MaybeCreateOutgoingDynamicStream(SpdyPriority priority) override {
+ return static_cast<TestStream*>(
+ QuicSpdySession::MaybeCreateOutgoingDynamicStream(priority));
+ }
+
+ std::unique_ptr<QuicStream> CreateStream(QuicStreamId id) override {
+ return QuicMakeUnique<TestStream>(id, this);
+ }
+
bool IsClosedStream(QuicStreamId id) {
return QuicSession::IsClosedStream(id);
}
@@ -263,6 +276,9 @@ class QuicSessionTestBase : public QuicTestWithParam<QuicVersion> {
"EFFlEYHsBQ98rXImL8ySDycdLEFvBPdtctPmWCfTxwmoSMLHU2SCVDhbqMWU5b0yr"
"JBCScs_ejbKaqBDoB7ZGxTvqlrB__2ZmnHHjCr8RgMRtKNtIeuZAo ";
connection_->AdvanceTime(QuicTime::Delta::FromSeconds(1));
+ if (FLAGS_quic_reloadable_flag_quic_refactor_stream_creation) {
+ session_.GetMutableCryptoStream()->set_encryption_established(true);
+ }
}
void CheckClosedStreams() {
« no previous file with comments | « net/quic/core/quic_session.cc ('k') | net/quic/core/quic_spdy_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698