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

Unified Diff: net/quic/quic_crypto_server_stream_test.cc

Issue 1009543004: Create a Perspective enum to use instead of a bool is_server to improve (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added NET_EXPORT_PRIVATE to fix compiler error Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_crypto_server_stream.cc ('k') | net/quic/quic_crypto_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_crypto_server_stream_test.cc
diff --git a/net/quic/quic_crypto_server_stream_test.cc b/net/quic/quic_crypto_server_stream_test.cc
index 2b885fa8b3fdb69ff9d94db2263276658572e863..5667261013460efe1e277e4d52498d6e6b05b1c8 100644
--- a/net/quic/quic_crypto_server_stream_test.cc
+++ b/net/quic/quic_crypto_server_stream_test.cc
@@ -56,7 +56,7 @@ const uint16 kServerPort = 80;
class QuicCryptoServerStreamTest : public ::testing::TestWithParam<bool> {
public:
QuicCryptoServerStreamTest()
- : connection_(new PacketSavingConnection(/*is_server=*/true)),
+ : connection_(new PacketSavingConnection(Perspective::IS_SERVER)),
session_(connection_, DefaultQuicConfig()),
crypto_config_(QuicCryptoServerConfig::TESTING,
QuicRandom::GetInstance()),
@@ -134,9 +134,9 @@ TEST_P(QuicCryptoServerStreamTest, ConnectedAfterCHLO) {
TEST_P(QuicCryptoServerStreamTest, ZeroRTT) {
PacketSavingConnection* client_conn =
- new PacketSavingConnection(/*is_server=*/false);
+ new PacketSavingConnection(Perspective::IS_CLIENT);
PacketSavingConnection* server_conn =
- new PacketSavingConnection(/*is_server=*/true);
+ new PacketSavingConnection(Perspective::IS_SERVER);
client_conn->AdvanceTime(QuicTime::Delta::FromSeconds(100000));
server_conn->AdvanceTime(QuicTime::Delta::FromSeconds(100000));
@@ -168,8 +168,8 @@ TEST_P(QuicCryptoServerStreamTest, ZeroRTT) {
// Now do another handshake, hopefully in 0-RTT.
LOG(INFO) << "Resetting for 0-RTT handshake attempt";
- client_conn = new PacketSavingConnection(/*is_server=*/false);
- server_conn = new PacketSavingConnection(/*is_server=*/true);
+ client_conn = new PacketSavingConnection(Perspective::IS_CLIENT);
+ server_conn = new PacketSavingConnection(Perspective::IS_SERVER);
// We need to advance time past the strike-server window so that it's
// authoritative in this time span.
client_conn->AdvanceTime(QuicTime::Delta::FromSeconds(102000));
« no previous file with comments | « net/quic/quic_crypto_server_stream.cc ('k') | net/quic/quic_crypto_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698