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

Side by Side Diff: net/tools/quic/test_tools/quic_test_utils.h

Issue 339803004: Introduce QUIC_VERSION_20: allowing endpoints to set different (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 // Common utilities for Quic tests 5 // Common utilities for Quic tests
6 6
7 #ifndef NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ 7 #ifndef NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_
8 #define NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ 8 #define NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_
9 9
10 #include <string> 10 #include <string>
11 11
12 #include "base/strings/string_piece.h" 12 #include "base/strings/string_piece.h"
13 #include "net/quic/quic_connection.h" 13 #include "net/quic/quic_connection.h"
14 #include "net/quic/quic_packet_writer.h" 14 #include "net/quic/quic_packet_writer.h"
15 #include "net/quic/quic_session.h" 15 #include "net/quic/quic_session.h"
16 #include "net/spdy/spdy_framer.h" 16 #include "net/spdy/spdy_framer.h"
17 #include "net/tools/quic/quic_server_session.h" 17 #include "net/tools/quic/quic_server_session.h"
18 #include "testing/gmock/include/gmock/gmock.h" 18 #include "testing/gmock/include/gmock/gmock.h"
19 19
20 namespace net { 20 namespace net {
21 21
22 class EpollServer; 22 class EpollServer;
23 class IPEndPoint; 23 class IPEndPoint;
24 24
25 namespace tools { 25 namespace tools {
26 namespace test { 26 namespace test {
27 27
28 static const QuicConnectionId kTestConnectionId = 42; 28 static const QuicConnectionId kTestConnectionId = 42;
29 static const int kTestPort = 123; 29 static const int kTestPort = 123;
30 static const uint32 kInitialFlowControlWindowForTest = 32 * 1024; // 32 KB 30 static const uint32 kInitialStreamFlowControlWindowForTest =
31 32 * 1024; // 32 KB
32 static const uint32 kInitialSessionFlowControlWindowForTest =
33 64 * 1024; // 64 KB
31 34
32 // Testing convenience method to construct a QuicAckFrame with |num_nack_ranges| 35 // Testing convenience method to construct a QuicAckFrame with |num_nack_ranges|
33 // nack ranges of width 1 packet, starting from |least_unacked|. 36 // nack ranges of width 1 packet, starting from |least_unacked|.
34 QuicAckFrame MakeAckFrameWithNackRanges(size_t num_nack_ranges, 37 QuicAckFrame MakeAckFrameWithNackRanges(size_t num_nack_ranges,
35 QuicPacketSequenceNumber least_unacked); 38 QuicPacketSequenceNumber least_unacked);
36 39
37 class MockConnection : public QuicConnection { 40 class MockConnection : public QuicConnection {
38 public: 41 public:
39 // Uses a MockHelper, ConnectionId of 42, and 127.0.0.1:123. 42 // Uses a MockHelper, ConnectionId of 42, and 127.0.0.1:123.
40 explicit MockConnection(bool is_server); 43 explicit MockConnection(bool is_server);
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 virtual ~MockAckNotifierDelegate(); 156 virtual ~MockAckNotifierDelegate();
154 157
155 DISALLOW_COPY_AND_ASSIGN(MockAckNotifierDelegate); 158 DISALLOW_COPY_AND_ASSIGN(MockAckNotifierDelegate);
156 }; 159 };
157 160
158 } // namespace test 161 } // namespace test
159 } // namespace tools 162 } // namespace tools
160 } // namespace net 163 } // namespace net
161 164
162 #endif // NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ 165 #endif // NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « net/tools/quic/test_tools/quic_test_client.cc ('k') | net/tools/quic/test_tools/quic_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698