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

Side by Side Diff: net/quic/core/quic_framer_test.cc

Issue 2916033003: Landing Recent QUIC changes until 03:18 AM, May 28, UTC (Closed)
Patch Set: A few more EXPORTs. Created 3 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
« no previous file with comments | « net/quic/core/quic_flags_list.h ('k') | net/quic/core/quic_headers_stream.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "net/quic/core/quic_framer.h" 5 #include "net/quic/core/quic_framer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cstdint> 8 #include <cstdint>
9 #include <map> 9 #include <map>
10 #include <memory> 10 #include <memory>
(...skipping 4745 matching lines...) Expand 10 before | Expand all | Expand 10 after
4756 QuicStreamFrame stream_frame(kStreamId, true, kStreamOffset, 4756 QuicStreamFrame stream_frame(kStreamId, true, kStreamOffset,
4757 QuicStringPiece("hello world!")); 4757 QuicStringPiece("hello world!"));
4758 QuicFrames frames = {QuicFrame(&stream_frame)}; 4758 QuicFrames frames = {QuicFrame(&stream_frame)};
4759 4759
4760 // clang-format off 4760 // clang-format off
4761 unsigned char packet[] = { 4761 unsigned char packet[] = {
4762 // public flags (version, 8 byte connection_id) 4762 // public flags (version, 8 byte connection_id)
4763 static_cast<unsigned char>( 4763 static_cast<unsigned char>(
4764 FLAGS_quic_reloadable_flag_quic_remove_v33_hacks2 ? 0x39 : 0x3D), 4764 FLAGS_quic_reloadable_flag_quic_remove_v33_hacks2 ? 0x39 : 0x3D),
4765 // connection_id 4765 // connection_id
4766 0x10, 0x32, 0x54, 0x76, 0x98, 0xBA, 0xDC, 0xFE, 4766 0x10, 0x32, 0x54, 0x76, 0x98, 0xBA, 0xDC, 0xFE,
4767 // version tag 4767 // version tag
4768 'Q', '0', GetQuicVersionDigitTens(), GetQuicVersionDigitOnes(), 4768 'Q', '0', GetQuicVersionDigitTens(), GetQuicVersionDigitOnes(),
4769 // packet number 4769 // packet number
4770 0xBC, 0x9A, 0x78, 0x56, 0x34, 0x12, 4770 0xBC, 0x9A, 0x78, 0x56, 0x34, 0x12,
4771 4771
4772 // frame type (stream frame with fin and no length) 4772 // frame type (stream frame with fin and no length)
4773 0xDF, 4773 0xDF,
4774 // stream id 4774 // stream id
4775 0x04, 0x03, 0x02, 0x01, 4775 0x04, 0x03, 0x02, 0x01,
4776 // offset 4776 // offset
(...skipping 21 matching lines...) Expand all
4798 0x54, 0x76, 0x10, 0x32, 0xDC, 0xFE, 0x98, 0xBA, 4798 0x54, 0x76, 0x10, 0x32, 0xDC, 0xFE, 0x98, 0xBA,
4799 // data 4799 // data
4800 'h', 'e', 'l', 'l', 'o', ' ', 'w', 'o', 'r', 'l', 'd', '!', 4800 'h', 'e', 'l', 'l', 'o', ' ', 'w', 'o', 'r', 'l', 'd', '!',
4801 }; 4801 };
4802 4802
4803 unsigned char packet39[] = { 4803 unsigned char packet39[] = {
4804 // public flags (version, 8 byte connection_id) 4804 // public flags (version, 8 byte connection_id)
4805 static_cast<unsigned char>( 4805 static_cast<unsigned char>(
4806 FLAGS_quic_reloadable_flag_quic_remove_v33_hacks2 ? 0x39 : 0x3D), 4806 FLAGS_quic_reloadable_flag_quic_remove_v33_hacks2 ? 0x39 : 0x3D),
4807 // connection_id 4807 // connection_id
4808 0x10, 0x32, 0x54, 0x76, 0x98, 0xBA, 0xDC, 0xFE, 4808 0x10, 0x32, 0x54, 0x76, 0x98, 0xBA, 0xDC, 0xFE,
4809 // version tag 4809 // version tag
4810 'Q', '0', GetQuicVersionDigitTens(), GetQuicVersionDigitOnes(), 4810 'Q', '0', GetQuicVersionDigitTens(), GetQuicVersionDigitOnes(),
4811 // packet number 4811 // packet number
4812 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 4812 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC,
4813 4813
4814 // frame type (stream frame with fin and no length) 4814 // frame type (stream frame with fin and no length)
4815 0xDF, 4815 0xDF,
4816 // stream id 4816 // stream id
4817 0x01, 0x02, 0x03, 0x04, 4817 0x01, 0x02, 0x03, 0x04,
4818 // offset 4818 // offset
(...skipping 2435 matching lines...) Expand 10 before | Expand all | Expand 10 after
7254 7254
7255 unsigned char* packets[] = {packet, packet_cid_be, packet39, packet_cid_be39}; 7255 unsigned char* packets[] = {packet, packet_cid_be, packet39, packet_cid_be39};
7256 size_t index = GetPacketIndex(framer_.version(), framer_.perspective()); 7256 size_t index = GetPacketIndex(framer_.version(), framer_.perspective());
7257 7257
7258 QuicFramerFuzzFunc(packets[index], arraysize(packet)); 7258 QuicFramerFuzzFunc(packets[index], arraysize(packet));
7259 } 7259 }
7260 7260
7261 } // namespace 7261 } // namespace
7262 } // namespace test 7262 } // namespace test
7263 } // namespace net 7263 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_flags_list.h ('k') | net/quic/core/quic_headers_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698