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

Side by Side Diff: net/http2/decoder/frame_decoder_state_test_util.h

Issue 2554683003: Revert of Add new HTTP/2 and HPACK decoder in net/http2/. (Closed)
Patch Set: Created 4 years 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
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef NET_HTTP2_DECODER_FRAME_DECODER_STATE_TEST_UTIL_H_
6 #define NET_HTTP2_DECODER_FRAME_DECODER_STATE_TEST_UTIL_H_
7
8 #include "net/http2/decoder/frame_decoder_state.h"
9 #include "net/http2/http2_structures.h"
10 #include "net/http2/tools/random_decoder_test.h"
11
12 namespace net {
13 namespace test {
14
15 class FrameDecoderStatePeer {
16 public:
17 // Randomizes (i.e. corrupts) the fields of the FrameDecoderState.
18 // PayloadDecoderBaseTest::StartDecoding calls this before passing the first
19 // decode buffer to the payload decoder, which increases the likelihood of
20 // detecting any use of prior states of the decoder on the decoding of
21 // future payloads.
22 static void Randomize(FrameDecoderState* p, RandomBase* rng);
23
24 // Inject a frame header into the FrameDecoderState.
25 // PayloadDecoderBaseTest::StartDecoding calls this just after calling
26 // Randomize (above), to simulate a full frame decoder having just finished
27 // decoding the common frame header and then calling the appropriate payload
28 // decoder based on the frame type in that frame header.
29 static void set_frame_header(const Http2FrameHeader& header,
30 FrameDecoderState* p);
31 };
32
33 } // namespace test
34 } // namespace net
35
36 #endif // NET_HTTP2_DECODER_FRAME_DECODER_STATE_TEST_UTIL_H_
OLDNEW
« no previous file with comments | « net/http2/decoder/frame_decoder_state.cc ('k') | net/http2/decoder/frame_decoder_state_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698