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/quic/quic_client_session.h" | 5 #include "net/quic/quic_client_session.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/rand_util.h" | 9 #include "base/rand_util.h" |
10 #include "net/base/capturing_net_log.h" | 10 #include "net/base/capturing_net_log.h" |
11 #include "net/base/test_completion_callback.h" | 11 #include "net/base/test_completion_callback.h" |
12 #include "net/quic/crypto/aes_128_gcm_12_encrypter.h" | 12 #include "net/quic/crypto/aes_128_gcm_12_encrypter.h" |
13 #include "net/quic/crypto/crypto_protocol.h" | 13 #include "net/quic/crypto/crypto_protocol.h" |
14 #include "net/quic/crypto/quic_decrypter.h" | 14 #include "net/quic/crypto/quic_decrypter.h" |
15 #include "net/quic/crypto/quic_encrypter.h" | 15 #include "net/quic/crypto/quic_encrypter.h" |
16 #include "net/quic/crypto/quic_server_info.h" | 16 #include "net/quic/crypto/quic_server_info.h" |
17 #include "net/quic/quic_default_packet_writer.h" | 17 #include "net/quic/quic_default_packet_writer.h" |
18 #include "net/quic/test_tools/crypto_test_utils.h" | 18 #include "net/quic/test_tools/crypto_test_utils.h" |
19 #include "net/quic/test_tools/quic_client_session_peer.h" | 19 #include "net/quic/test_tools/quic_client_session_peer.h" |
20 #include "net/quic/test_tools/quic_test_utils.h" | 20 #include "net/quic/test_tools/quic_test_utils.h" |
21 #include "net/quic/test_tools/simple_quic_framer.h" | 21 #include "net/quic/test_tools/simple_quic_framer.h" |
22 #include "net/socket/socket_test_util.h" | 22 #include "net/socket/socket_test_util.h" |
23 #include "net/udp/datagram_client_socket.h" | 23 #include "net/udp/datagram_client_socket.h" |
24 | 24 |
25 using net::test::kInitialFlowControlWindowForTest; | |
26 using testing::_; | 25 using testing::_; |
27 | 26 |
28 namespace net { | 27 namespace net { |
29 namespace test { | 28 namespace test { |
30 namespace { | 29 namespace { |
31 | 30 |
32 const char kServerHostname[] = "www.example.com"; | 31 const char kServerHostname[] = "www.example.com"; |
33 const uint16 kServerPort = 80; | 32 const uint16 kServerPort = 80; |
34 | 33 |
35 class TestPacketWriter : public QuicDefaultPacketWriter { | 34 class TestPacketWriter : public QuicDefaultPacketWriter { |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 | 162 |
164 // After receiving a GoAway, I should no longer be able to create outgoing | 163 // After receiving a GoAway, I should no longer be able to create outgoing |
165 // streams. | 164 // streams. |
166 session_.OnGoAway(QuicGoAwayFrame(QUIC_PEER_GOING_AWAY, 1u, "Going away.")); | 165 session_.OnGoAway(QuicGoAwayFrame(QUIC_PEER_GOING_AWAY, 1u, "Going away.")); |
167 EXPECT_EQ(NULL, session_.CreateOutgoingDataStream()); | 166 EXPECT_EQ(NULL, session_.CreateOutgoingDataStream()); |
168 } | 167 } |
169 | 168 |
170 } // namespace | 169 } // namespace |
171 } // namespace test | 170 } // namespace test |
172 } // namespace net | 171 } // namespace net |
OLD | NEW |