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

Unified Diff: net/quic/quic_session_test.cc

Issue 102313005: Remove the is_server argument from the QuicSession constructor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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_session.cc ('k') | net/quic/quic_stream_sequencer_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_session_test.cc
diff --git a/net/quic/quic_session_test.cc b/net/quic/quic_session_test.cc
index 6523a3552fbbdc4ca519d478d9ac12484a917ebd..ecbafb5c6a2ac8fd55d6b6c29e6e54be36b422cf 100644
--- a/net/quic/quic_session_test.cc
+++ b/net/quic/quic_session_test.cc
@@ -90,8 +90,8 @@ class StreamBlocker {
class TestSession : public QuicSession {
public:
- TestSession(QuicConnection* connection, bool is_server)
- : QuicSession(connection, DefaultQuicConfig(), is_server),
+ explicit TestSession(QuicConnection* connection)
+ : QuicSession(connection, DefaultQuicConfig()),
crypto_stream_(this) {
}
@@ -123,8 +123,8 @@ class TestSession : public QuicSession {
class QuicSessionTest : public ::testing::Test {
protected:
QuicSessionTest()
- : connection_(new MockConnection(false)),
- session_(connection_, true) {
+ : connection_(new MockConnection(true)),
+ session_(connection_) {
headers_[":host"] = "www.google.com";
headers_[":path"] = "/index.hml";
headers_[":scheme"] = "http";
@@ -246,6 +246,7 @@ TEST_F(QuicSessionTest, DecompressionError) {
ReliableQuicStream* stream = session_.GetIncomingReliableStream(3);
EXPECT_CALL(*connection_, SendConnectionClose(QUIC_DECOMPRESSION_FAILURE));
const char data[] =
+ "\0\0\0\0" // priority
"\1\0\0\0" // headers id
"\0\0\0\4" // length
"abcd"; // invalid compressed data
@@ -394,7 +395,7 @@ TEST_F(QuicSessionTest, IncreasedTimeoutAfterCryptoHandshake) {
TEST_F(QuicSessionTest, ZombieStream) {
StrictMock<MockConnection>* connection =
new StrictMock<MockConnection>(false);
- TestSession session(connection, /*is_server=*/ false);
+ TestSession session(connection);
TestStream* stream3 = session.CreateOutgoingDataStream();
EXPECT_EQ(3u, stream3->id());
@@ -434,7 +435,7 @@ TEST_F(QuicSessionTest, ZombieStream) {
TEST_F(QuicSessionTest, ZombieStreamConnectionClose) {
StrictMock<MockConnection>* connection =
new StrictMock<MockConnection>(false);
- TestSession session(connection, /*is_server=*/ false);
+ TestSession session(connection);
TestStream* stream3 = session.CreateOutgoingDataStream();
EXPECT_EQ(3u, stream3->id());
« no previous file with comments | « net/quic/quic_session.cc ('k') | net/quic/quic_stream_sequencer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698