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

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

Issue 2325803002: Deprecate FLAGS_quic_never_write_unencrypted_data now that the unit tests all pass. (Closed)
Patch Set: 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_packet_generator_test.cc ('k') | no next file » | 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 522b3ca0e5672035c7f917bec4e300225f959ff5..91901e2737cb8db9556f30099a446b38b984f752 100644
--- a/net/quic/core/quic_session_test.cc
+++ b/net/quic/core/quic_session_test.cc
@@ -12,6 +12,7 @@
#include "base/strings/string_number_conversions.h"
#include "build/build_config.h"
#include "net/quic/core/crypto/crypto_protocol.h"
+#include "net/quic/core/crypto/null_encrypter.h"
#include "net/quic/core/quic_crypto_stream.h"
#include "net/quic/core/quic_flags.h"
#include "net/quic/core/quic_protocol.h"
@@ -117,6 +118,8 @@ class TestSession : public QuicSpdySession {
crypto_stream_(this),
writev_consumes_all_data_(false) {
Initialize();
+ this->connection()->SetEncrypter(ENCRYPTION_FORWARD_SECURE,
+ new NullEncrypter());
}
~TestSession() override { delete connection(); }
@@ -181,6 +184,9 @@ class TestSession : public QuicSpdySession {
QuicConsumedData SendStreamData(ReliableQuicStream* stream) {
struct iovec iov;
+ if (stream->id() != kCryptoStreamId) {
+ this->connection()->SetDefaultEncryptionLevel(ENCRYPTION_FORWARD_SECURE);
+ }
return WritevData(stream, stream->id(), MakeIOVector("not empty", &iov), 0,
true, nullptr);
}
@@ -243,9 +249,6 @@ class QuicSessionTestBase : public ::testing::TestWithParam<QuicVersion> {
"EFFlEYHsBQ98rXImL8ySDycdLEFvBPdtctPmWCfTxwmoSMLHU2SCVDhbqMWU5b0yr"
"JBCScs_ejbKaqBDoB7ZGxTvqlrB__2ZmnHHjCr8RgMRtKNtIeuZAo ";
connection_->AdvanceTime(QuicTime::Delta::FromSeconds(1));
- // TODO(ianswett): Fix QuicSessionTests so they don't attempt to write
- // non-crypto stream data at ENCRYPTION_NONE.
- FLAGS_quic_never_write_unencrypted_data = false;
}
void CheckClosedStreams() {
« no previous file with comments | « net/quic/core/quic_packet_generator_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698