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 QUICHE_HTTP2_TEST_TOOLS_HTTP2_CONSTANTS_TEST_UTIL_H_ 6 #define QUICHE_HTTP2_TEST_TOOLS_HTTP2_CONSTANTS_TEST_UTIL_H_ 7 8 #include <cstdint> 9 #include <vector> 10 11 #include "quiche/http2/http2_constants.h" 12 13 namespace http2 { 14 namespace test { 15 16 // Returns a vector of all supported RST_STREAM and GOAWAY error codes. 17 std::vector<Http2ErrorCode> AllHttp2ErrorCodes(); 18 19 // Returns a vector of all supported parameters in SETTINGS frames. 20 std::vector<Http2SettingsParameter> AllHttp2SettingsParameters(); 21 22 // Returns a mask of flags supported for the specified frame type. Returns 23 // zero for unknown frame types. 24 uint8_t KnownFlagsMaskForFrameType(Http2FrameType type); 25 26 // Returns a mask of flag bits known to be invalid for the frame type. 27 // For unknown frame types, the mask is zero; i.e., we don't know that any 28 // are invalid. 29 uint8_t InvalidFlagMaskForFrameType(Http2FrameType type); 30 31 } // namespace test 32 } // namespace http2 33 34 #endif // QUICHE_HTTP2_TEST_TOOLS_HTTP2_CONSTANTS_TEST_UTIL_H_ 35