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

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

Issue 2823223003: Rename QuicSession::GetCryptoStream() to GetMutableCryptoStream(). Add a const GetCryptoStream(). M… (Closed)
Patch Set: Created 3 years, 8 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
Index: net/quic/core/quic_crypto_client_stream_test.cc
diff --git a/net/quic/core/quic_crypto_client_stream_test.cc b/net/quic/core/quic_crypto_client_stream_test.cc
index d69c7c96d80e57448aa8f47e657be8b277f44f6b..a73ddc9f640cc617e57207631cc13ad49249b57d 100644
--- a/net/quic/core/quic_crypto_client_stream_test.cc
+++ b/net/quic/core/quic_crypto_client_stream_test.cc
@@ -64,7 +64,9 @@ class QuicCryptoClientStreamTest : public ::testing::Test {
framer.ConstructHandshakeMessage(message_, perspective));
}
- QuicCryptoClientStream* stream() { return session_->GetCryptoStream(); }
+ QuicCryptoClientStream* stream() {
+ return session_->GetMutableCryptoStream();
+ }
MockQuicConnectionHelper server_helper_;
MockQuicConnectionHelper client_helper_;
@@ -372,14 +374,14 @@ class QuicCryptoClientStreamStatelessTest : public ::testing::Test {
}
QuicCryptoServerStream* server_stream() {
- return server_session_->GetCryptoStream();
+ return server_session_->GetMutableCryptoStream();
}
void AdvanceHandshakeWithFakeServer() {
- client_session_->GetCryptoStream()->CryptoConnect();
- crypto_test_utils::AdvanceHandshake(client_connection_,
- client_session_->GetCryptoStream(), 0,
- server_connection_, server_stream(), 0);
+ client_session_->GetMutableCryptoStream()->CryptoConnect();
+ crypto_test_utils::AdvanceHandshake(
+ client_connection_, client_session_->GetMutableCryptoStream(), 0,
+ server_connection_, server_stream(), 0);
}
// Initializes the server_stream_ for stateless rejects.
@@ -432,8 +434,8 @@ TEST_F(QuicCryptoClientStreamStatelessTest, StatelessReject) {
EXPECT_EQ(1, server_stream()->NumHandshakeMessages());
EXPECT_EQ(0, server_stream()->NumHandshakeMessagesWithServerNonces());
- EXPECT_FALSE(client_session_->GetCryptoStream()->encryption_established());
- EXPECT_FALSE(client_session_->GetCryptoStream()->handshake_confirmed());
+ EXPECT_FALSE(client_session_->IsEncryptionEstablished());
+ EXPECT_FALSE(client_session_->IsCryptoHandshakeConfirmed());
// Even though the handshake was not complete, the cached client_state is
// complete, and can be used for a subsequent successful handshake.
EXPECT_TRUE(client_state->IsComplete(QuicWallTime::FromUNIXSeconds(0)));
« no previous file with comments | « net/quic/chromium/quic_chromium_client_stream_test.cc ('k') | net/quic/core/quic_crypto_server_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698