| OLD | NEW |
| (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 #include "net/http2/decoder/frame_decoder_state_test_util.h" | |
| 6 | |
| 7 #include "base/logging.h" | |
| 8 #include "net/http2/decoder/http2_structure_decoder_test_util.h" | |
| 9 #include "net/http2/http2_structures.h" | |
| 10 #include "net/http2/http2_structures_test_util.h" | |
| 11 #include "net/http2/tools/http2_random.h" | |
| 12 #include "net/http2/tools/random_decoder_test.h" | |
| 13 | |
| 14 namespace net { | |
| 15 namespace test { | |
| 16 | |
| 17 // static | |
| 18 void FrameDecoderStatePeer::Randomize(FrameDecoderState* p, RandomBase* rng) { | |
| 19 VLOG(1) << "FrameDecoderStatePeer::Randomize"; | |
| 20 ::net::test::Randomize(&p->frame_header_, rng); | |
| 21 p->remaining_payload_ = rng->Rand32(); | |
| 22 p->remaining_padding_ = rng->Rand32(); | |
| 23 Http2StructureDecoderPeer::Randomize(&p->structure_decoder_, rng); | |
| 24 } | |
| 25 | |
| 26 // static | |
| 27 void FrameDecoderStatePeer::set_frame_header(const Http2FrameHeader& header, | |
| 28 FrameDecoderState* p) { | |
| 29 VLOG(1) << "FrameDecoderStatePeer::set_frame_header " << header; | |
| 30 p->frame_header_ = header; | |
| 31 } | |
| 32 | |
| 33 } // namespace test | |
| 34 } // namespace net | |
| OLD | NEW |