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

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

Issue 2512623002: Add connection option kSMHL indicating supporting SETTINGS_MAX_HEADER_LIST_SIZE. SETTINGS_MAX_HEADE… (Closed)
Patch Set: 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_headers_stream_test.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 17bd3d0c4bb367d5a5da3782377f9efb25f1abdb..14b7d014682dede9a2c36d1792476ec71aac00a5 100644
--- a/net/quic/core/quic_session_test.cc
+++ b/net/quic/core/quic_session_test.cc
@@ -69,6 +69,8 @@ class TestCryptoStream : public QuicCryptoStream {
session()->config()->ProcessPeerHello(msg, CLIENT, &error_details);
EXPECT_EQ(QUIC_NO_ERROR, error);
session()->OnConfigNegotiated();
+ session()->connection()->SetDefaultEncryptionLevel(
+ ENCRYPTION_FORWARD_SECURE);
session()->OnCryptoHandshakeEvent(QuicSession::HANDSHAKE_CONFIRMED);
}
@@ -515,6 +517,12 @@ TEST_P(QuicSessionTestServer, TestBatchedWrites) {
TEST_P(QuicSessionTestServer, OnCanWriteBundlesStreams) {
// Encryption needs to be established before data can be sent.
CryptoHandshakeMessage msg;
+ MockPacketWriter* writer = static_cast<MockPacketWriter*>(
+ QuicConnectionPeer::GetWriter(session_.connection()));
+ if (FLAGS_quic_send_max_header_list_size) {
+ EXPECT_CALL(*writer, WritePacket(_, _, _, _, _))
+ .WillOnce(Return(WriteResult(WRITE_STATUS_OK, 0)));
+ }
session_.GetCryptoStream()->OnHandshakeMessage(msg);
// Drive congestion control manually.
@@ -550,8 +558,6 @@ TEST_P(QuicSessionTestServer, OnCanWriteBundlesStreams) {
// Expect that we only send one packet, the writes from different streams
// should be bundled together.
- MockPacketWriter* writer = static_cast<MockPacketWriter*>(
- QuicConnectionPeer::GetWriter(session_.connection()));
EXPECT_CALL(*writer, WritePacket(_, _, _, _, _))
.WillOnce(Return(WriteResult(WRITE_STATUS_OK, 0)));
EXPECT_CALL(*send_algorithm, OnPacketSent(_, _, _, _, _));
« no previous file with comments | « net/quic/core/quic_headers_stream_test.cc ('k') | net/quic/core/quic_spdy_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698