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

Side by Side Diff: net/quic/core/quic_server_session_base_test.cc

Issue 2236973002: Landing Recent QUIC changes until 4AM, Aug 7, 2016 UTC-4 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: flip quic_sequencer_buffer_retire_block_in_time to true Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « net/quic/core/quic_server_session_base.h ('k') | net/quic/core/quic_session.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/core/quic_server_session_base.h" 5 #include "net/quic/core/quic_server_session_base.h"
6 6
7 #include <cstdint> 7 #include <cstdint>
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 QuicServerSessionBase::Helper* helper, 79 QuicServerSessionBase::Helper* helper,
80 const QuicCryptoServerConfig* crypto_config, 80 const QuicCryptoServerConfig* crypto_config,
81 QuicCompressedCertsCache* compressed_certs_cache) 81 QuicCompressedCertsCache* compressed_certs_cache)
82 : QuicServerSessionBase(config, 82 : QuicServerSessionBase(config,
83 connection, 83 connection,
84 visitor, 84 visitor,
85 helper, 85 helper,
86 crypto_config, 86 crypto_config,
87 compressed_certs_cache) {} 87 compressed_certs_cache) {}
88 88
89 ~TestServerSession() override{}; 89 ~TestServerSession() override { delete connection(); };
90 90
91 protected: 91 protected:
92 QuicSpdyStream* CreateIncomingDynamicStream(QuicStreamId id) override { 92 QuicSpdyStream* CreateIncomingDynamicStream(QuicStreamId id) override {
93 if (!ShouldCreateIncomingDynamicStream(id)) { 93 if (!ShouldCreateIncomingDynamicStream(id)) {
94 return nullptr; 94 return nullptr;
95 } 95 }
96 QuicSpdyStream* stream = new QuicSimpleServerStream(id, this); 96 QuicSpdyStream* stream = new QuicSimpleServerStream(id, this);
97 ActivateStream(stream); 97 ActivateStream(stream);
98 return stream; 98 return stream;
99 } 99 }
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 reference.max_bandwidth_estimate_bytes_per_second() && 177 reference.max_bandwidth_estimate_bytes_per_second() &&
178 arg->max_bandwidth_timestamp_seconds() == 178 arg->max_bandwidth_timestamp_seconds() ==
179 reference.max_bandwidth_timestamp_seconds() && 179 reference.max_bandwidth_timestamp_seconds() &&
180 arg->min_rtt_ms() == reference.min_rtt_ms() && 180 arg->min_rtt_ms() == reference.min_rtt_ms() &&
181 arg->previous_connection_state() == 181 arg->previous_connection_state() ==
182 reference.previous_connection_state()); 182 reference.previous_connection_state());
183 } 183 }
184 184
185 INSTANTIATE_TEST_CASE_P(Tests, 185 INSTANTIATE_TEST_CASE_P(Tests,
186 QuicServerSessionBaseTest, 186 QuicServerSessionBaseTest,
187 ::testing::ValuesIn(QuicSupportedVersions())); 187 ::testing::ValuesIn(AllSupportedVersions()));
188 188
189 TEST_P(QuicServerSessionBaseTest, ServerPushDisabledByDefault) { 189 TEST_P(QuicServerSessionBaseTest, ServerPushDisabledByDefault) {
190 // Without the client explicitly sending kSPSH, server push will be disabled 190 // Without the client explicitly sending kSPSH, server push will be disabled
191 // at the server. 191 // at the server.
192 EXPECT_FALSE( 192 EXPECT_FALSE(
193 session_->config()->HasReceivedConnectionOptions() && 193 session_->config()->HasReceivedConnectionOptions() &&
194 ContainsQuicTag(session_->config()->ReceivedConnectionOptions(), kSPSH)); 194 ContainsQuicTag(session_->config()->ReceivedConnectionOptions(), kSPSH));
195 session_->OnConfigNegotiated(); 195 session_->OnConfigNegotiated();
196 EXPECT_FALSE(session_->server_push_enabled()); 196 EXPECT_FALSE(session_->server_push_enabled());
197 } 197 }
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 EXPECT_FALSE( 557 EXPECT_FALSE(
558 QuicServerSessionBasePeer::IsBandwidthResumptionEnabled(session_.get())); 558 QuicServerSessionBasePeer::IsBandwidthResumptionEnabled(session_.get()));
559 session_->OnConfigNegotiated(); 559 session_->OnConfigNegotiated();
560 EXPECT_FALSE( 560 EXPECT_FALSE(
561 QuicServerSessionBasePeer::IsBandwidthResumptionEnabled(session_.get())); 561 QuicServerSessionBasePeer::IsBandwidthResumptionEnabled(session_.get()));
562 } 562 }
563 563
564 } // namespace 564 } // namespace
565 } // namespace test 565 } // namespace test
566 } // namespace net 566 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_server_session_base.h ('k') | net/quic/core/quic_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698