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

Side by Side Diff: net/tools/quic/quic_simple_server_test.cc

Issue 2512123004: Remove QuicUtils::AsChars by casting directly. No behavior change. (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « net/tools/quic/quic_server_test.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_simple_server.h" 5 #include "net/tools/quic/quic_simple_server.h"
6 6
7 #include "net/quic/core/crypto/quic_random.h" 7 #include "net/quic/core/crypto/quic_random.h"
8 #include "net/quic/core/quic_crypto_stream.h" 8 #include "net/quic/core/quic_crypto_stream.h"
9 #include "net/quic/core/quic_utils.h" 9 #include "net/quic/core/quic_utils.h"
10 #include "net/quic/test_tools/crypto_test_utils.h" 10 #include "net/quic/test_tools/crypto_test_utils.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 TEST_F(QuicChromeServerDispatchPacketTest, DispatchPacket) { 55 TEST_F(QuicChromeServerDispatchPacketTest, DispatchPacket) {
56 unsigned char valid_packet[] = {// public flags (8 byte connection_id) 56 unsigned char valid_packet[] = {// public flags (8 byte connection_id)
57 0x3C, 57 0x3C,
58 // connection_id 58 // connection_id
59 0x10, 0x32, 0x54, 0x76, 0x98, 0xBA, 0xDC, 59 0x10, 0x32, 0x54, 0x76, 0x98, 0xBA, 0xDC,
60 0xFE, 60 0xFE,
61 // packet sequence number 61 // packet sequence number
62 0xBC, 0x9A, 0x78, 0x56, 0x34, 0x12, 62 0xBC, 0x9A, 0x78, 0x56, 0x34, 0x12,
63 // private flags 63 // private flags
64 0x00}; 64 0x00};
65 QuicReceivedPacket encrypted_valid_packet(QuicUtils::AsChars(valid_packet), 65 QuicReceivedPacket encrypted_valid_packet(
66 arraysize(valid_packet), 66 reinterpret_cast<char*>(valid_packet), arraysize(valid_packet),
67 QuicTime::Zero(), false); 67 QuicTime::Zero(), false);
68 68
69 EXPECT_CALL(dispatcher_, ProcessPacket(_, _, _)).Times(1); 69 EXPECT_CALL(dispatcher_, ProcessPacket(_, _, _)).Times(1);
70 DispatchPacket(encrypted_valid_packet); 70 DispatchPacket(encrypted_valid_packet);
71 } 71 }
72 72
73 } // namespace test 73 } // namespace test
74 } // namespace net 74 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_server_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698