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

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

Issue 2359503003: Landing Recent QUIC changes until 9:58 AM, Sep 17, 2016 UTC (Closed)
Patch Set: Reverted flag flip. Created 4 years, 3 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_server_session_base.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_server_session_base_test.cc
diff --git a/net/quic/core/quic_server_session_base_test.cc b/net/quic/core/quic_server_session_base_test.cc
index d0a6cc50c43266adde9824e3095e057dfc521ad6..77ba4e2cbacc0428c8424706fea91f60425a4056 100644
--- a/net/quic/core/quic_server_session_base_test.cc
+++ b/net/quic/core/quic_server_session_base_test.cc
@@ -162,6 +162,7 @@ class QuicServerSessionBaseTest : public ::testing::TestWithParam<QuicVersion> {
std::unique_ptr<TestServerSession> session_;
std::unique_ptr<CryptoHandshakeMessage> handshake_message_;
QuicConnectionVisitorInterface* visitor_;
+ QuicFlagSaver flags_; // Save/restore all QUIC flag values.
};
// Compares CachedNetworkParameters.
@@ -185,13 +186,18 @@ INSTANTIATE_TEST_CASE_P(Tests,
::testing::ValuesIn(AllSupportedVersions()));
TEST_P(QuicServerSessionBaseTest, ServerPushDisabledByDefault) {
+ FLAGS_quic_enable_server_push_by_default = true;
// Without the client explicitly sending kSPSH, server push will be disabled
- // at the server.
+ // at the server, until version 35 when it is enabled by default.
EXPECT_FALSE(
session_->config()->HasReceivedConnectionOptions() &&
ContainsQuicTag(session_->config()->ReceivedConnectionOptions(), kSPSH));
session_->OnConfigNegotiated();
- EXPECT_FALSE(session_->server_push_enabled());
+ if (GetParam() <= QUIC_VERSION_34) {
+ EXPECT_FALSE(session_->server_push_enabled());
+ } else {
+ EXPECT_TRUE(session_->server_push_enabled());
+ }
}
TEST_P(QuicServerSessionBaseTest, CloseStreamDueToReset) {
@@ -342,7 +348,11 @@ TEST_P(QuicServerSessionBaseTest, MaxAvailableStreams) {
session_.get(), kLimitingStreamId + 4));
}
+// TODO(ckrasic): remove this when
+// FLAGS_quic_enable_server_push_by_default is
+// deprecated.
TEST_P(QuicServerSessionBaseTest, EnableServerPushThroughConnectionOption) {
+ FLAGS_quic_enable_server_push_by_default = false;
// Assume server received server push connection option.
QuicTagVector copt;
copt.push_back(kSPSH);
« no previous file with comments | « net/quic/core/quic_server_session_base.cc ('k') | net/quic/core/quic_spdy_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698