Chromium Code Reviews| Index: net/quic/quic_chromium_client_session_test.cc |
| diff --git a/net/quic/quic_chromium_client_session_test.cc b/net/quic/quic_chromium_client_session_test.cc |
| index e21d2652d88234e14944118c23e17a79ba778b7d..512779a9ae822d03a76b25d7f5605fc6ac1d1f3e 100644 |
| --- a/net/quic/quic_chromium_client_session_test.cc |
| +++ b/net/quic/quic_chromium_client_session_test.cc |
| @@ -22,7 +22,9 @@ |
| #include "net/quic/crypto/quic_decrypter.h" |
| #include "net/quic/crypto/quic_encrypter.h" |
| #include "net/quic/crypto/quic_server_info.h" |
| +#include "net/quic/quic_flags.h" |
| #include "net/quic/quic_packet_reader.h" |
| +#include "net/quic/quic_protocol.h" |
| #include "net/quic/test_tools/crypto_test_utils.h" |
| #include "net/quic/test_tools/quic_chromium_client_session_peer.h" |
| #include "net/quic/test_tools/quic_spdy_session_peer.h" |
| @@ -112,8 +114,6 @@ INSTANTIATE_TEST_CASE_P(Tests, |
| QuicChromiumClientSessionTest, |
| ::testing::ValuesIn(QuicSupportedVersions())); |
| -#if defined(OPENSSL) |
| - |
| TEST_P(QuicChromiumClientSessionTest, CryptoConnect) { |
| CompleteCryptoHandshake(); |
| } |
| @@ -129,8 +129,18 @@ TEST_P(QuicChromiumClientSessionTest, MaxNumStreams) { |
| } |
| EXPECT_FALSE(session_.CreateOutgoingDynamicStream()); |
| + EXPECT_EQ(kDefaultMaxStreamsPerConnection, session_.GetNumOpenStreams()); |
| + |
| // Close a stream and ensure I can now open a new one. |
| - session_.CloseStream(streams[0]->id()); |
| + QuicStreamId stream_id = streams[0]->id(); |
| + session_.CloseStream(stream_id); |
| + |
| + if (FLAGS_quic_count_unfinished_as_open_streams) { |
|
Ryan Hamilton
2015/11/05 05:26:46
Since this flag is true and we have no plans to ma
ramant (doing other things)
2015/11/05 17:36:43
Done.
|
| + EXPECT_FALSE(session_.CreateOutgoingDynamicStream()); |
| + QuicRstStreamFrame rst1(stream_id, QUIC_STREAM_NO_ERROR, 0); |
| + session_.OnRstStream(rst1); |
| + } |
| + EXPECT_EQ(kDefaultMaxStreamsPerConnection - 1, session_.GetNumOpenStreams()); |
| EXPECT_TRUE(session_.CreateOutgoingDynamicStream()); |
| } |
| @@ -152,7 +162,12 @@ TEST_P(QuicChromiumClientSessionTest, MaxNumStreamsViaRequest) { |
| callback.callback())); |
| // Close a stream and ensure I can now open a new one. |
| - session_.CloseStream(streams[0]->id()); |
| + QuicStreamId stream_id = streams[0]->id(); |
| + session_.CloseStream(stream_id); |
| + if (FLAGS_quic_count_unfinished_as_open_streams) { |
| + QuicRstStreamFrame rst1(stream_id, QUIC_STREAM_NO_ERROR, 0); |
| + session_.OnRstStream(rst1); |
| + } |
| ASSERT_TRUE(callback.have_result()); |
| EXPECT_EQ(OK, callback.WaitForResult()); |
| EXPECT_TRUE(stream != nullptr); |
| @@ -258,8 +273,6 @@ TEST_P(QuicChromiumClientSessionTest, ConnectionPooledWithMatchingPin) { |
| EXPECT_TRUE(session_.CanPool("mail.example.org", PRIVACY_MODE_DISABLED)); |
| } |
| -#endif |
| - |
| } // namespace |
| } // namespace test |
| } // namespace net |