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

Side by Side Diff: net/tools/quic/quic_client_session_test.cc

Issue 1784643006: Deprecate FLAG_quic_block_unencrypted_writes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@115904466
Patch Set: Created 4 years, 9 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/quic_session.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/tools/quic/quic_client_session.h" 5 #include "net/tools/quic/quic_client_session.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "net/base/ip_endpoint.h" 10 #include "net/base/ip_endpoint.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 130
131 INSTANTIATE_TEST_CASE_P(Tests, 131 INSTANTIATE_TEST_CASE_P(Tests,
132 QuicClientSessionTest, 132 QuicClientSessionTest,
133 ::testing::ValuesIn(QuicSupportedVersions())); 133 ::testing::ValuesIn(QuicSupportedVersions()));
134 134
135 TEST_P(QuicClientSessionTest, CryptoConnect) { 135 TEST_P(QuicClientSessionTest, CryptoConnect) {
136 CompleteCryptoHandshake(); 136 CompleteCryptoHandshake();
137 } 137 }
138 138
139 TEST_P(QuicClientSessionTest, NoEncryptionAfterInitialEncryption) { 139 TEST_P(QuicClientSessionTest, NoEncryptionAfterInitialEncryption) {
140 ValueRestore<bool> old_flag(&FLAGS_quic_block_unencrypted_writes, true);
141 // Complete a handshake in order to prime the crypto config for 0-RTT. 140 // Complete a handshake in order to prime the crypto config for 0-RTT.
142 CompleteCryptoHandshake(); 141 CompleteCryptoHandshake();
143 142
144 // Now create a second session using the same crypto config. 143 // Now create a second session using the same crypto config.
145 Initialize(); 144 Initialize();
146 145
147 // Starting the handshake should move immediately to encryption 146 // Starting the handshake should move immediately to encryption
148 // established and will allow streams to be created. 147 // established and will allow streams to be created.
149 session_->CryptoConnect(); 148 session_->CryptoConnect();
150 EXPECT_TRUE(session_->IsEncryptionEstablished()); 149 EXPECT_TRUE(session_->IsEncryptionEstablished());
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 QuicClientPromisedInfo* promised = 491 QuicClientPromisedInfo* promised =
493 session_->GetPromisedById(promised_stream_id_); 492 session_->GetPromisedById(promised_stream_id_);
494 EXPECT_NE(promised, nullptr); 493 EXPECT_NE(promised, nullptr);
495 EXPECT_NE(session_->GetPromisedByUrl(promise_url_), nullptr); 494 EXPECT_NE(session_->GetPromisedByUrl(promise_url_), nullptr);
496 EXPECT_EQ(session_->GetPromisedStream(promised_stream_id_), nullptr); 495 EXPECT_EQ(session_->GetPromisedStream(promised_stream_id_), nullptr);
497 } 496 }
498 497
499 } // namespace 498 } // namespace
500 } // namespace test 499 } // namespace test
501 } // namespace net 500 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_session.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698