OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "net/tools/quic/quic_client_session.h" | 5 #include "net/tools/quic/quic_client_session.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "net/base/ip_endpoint.h" | 9 #include "net/base/ip_endpoint.h" |
10 #include "net/quic/crypto/aes_128_gcm_12_encrypter.h" | 10 #include "net/quic/crypto/aes_128_gcm_12_encrypter.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 }; | 62 }; |
63 | 63 |
64 INSTANTIATE_TEST_CASE_P(Tests, ToolsQuicClientSessionTest, | 64 INSTANTIATE_TEST_CASE_P(Tests, ToolsQuicClientSessionTest, |
65 ::testing::ValuesIn(QuicSupportedVersions())); | 65 ::testing::ValuesIn(QuicSupportedVersions())); |
66 | 66 |
67 TEST_P(ToolsQuicClientSessionTest, CryptoConnect) { | 67 TEST_P(ToolsQuicClientSessionTest, CryptoConnect) { |
68 CompleteCryptoHandshake(); | 68 CompleteCryptoHandshake(); |
69 } | 69 } |
70 | 70 |
71 TEST_P(ToolsQuicClientSessionTest, MaxNumStreams) { | 71 TEST_P(ToolsQuicClientSessionTest, MaxNumStreams) { |
72 session_->config()->set_max_streams_per_connection(1, 1); | 72 session_->config()->SetMaxStreamsPerConnection(1, 1); |
73 // FLAGS_max_streams_per_connection = 1; | 73 // FLAGS_max_streams_per_connection = 1; |
74 // Initialize crypto before the client session will create a stream. | 74 // Initialize crypto before the client session will create a stream. |
75 CompleteCryptoHandshake(); | 75 CompleteCryptoHandshake(); |
76 | 76 |
77 QuicSpdyClientStream* stream = | 77 QuicSpdyClientStream* stream = |
78 session_->CreateOutgoingDataStream(); | 78 session_->CreateOutgoingDataStream(); |
79 ASSERT_TRUE(stream); | 79 ASSERT_TRUE(stream); |
80 EXPECT_FALSE(session_->CreateOutgoingDataStream()); | 80 EXPECT_FALSE(session_->CreateOutgoingDataStream()); |
81 | 81 |
82 // Close a stream and ensure I can now open a new one. | 82 // Close a stream and ensure I can now open a new one. |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 // Close connection shouldn't be called. | 144 // Close connection shouldn't be called. |
145 EXPECT_CALL(*connection_, SendConnectionCloseWithDetails(_, _)).Times(0); | 145 EXPECT_CALL(*connection_, SendConnectionCloseWithDetails(_, _)).Times(0); |
146 session_->connection()->ProcessUdpPacket(client_address, server_address, | 146 session_->connection()->ProcessUdpPacket(client_address, server_address, |
147 valid_packet); | 147 valid_packet); |
148 } | 148 } |
149 | 149 |
150 } // namespace | 150 } // namespace |
151 } // namespace test | 151 } // namespace test |
152 } // namespace tools | 152 } // namespace tools |
153 } // namespace net | 153 } // namespace net |
OLD | NEW |