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

Unified Diff: net/http2/http2_constants_test_util.h

Issue 2293613002: Add new HTTP/2 and HPACK decoder in net/http2/. (Closed)
Patch Set: Replace LOG(INFO) by VLOG(2) in DecodeBufferTest.SlowDecodeTestStruct so that trybots do not fail. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http2/http2_constants_test.cc ('k') | net/http2/http2_constants_test_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http2/http2_constants_test_util.h
diff --git a/net/http2/http2_constants_test_util.h b/net/http2/http2_constants_test_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..6d20cec9d83143af2b5108f2d160e944f037cbb8
--- /dev/null
+++ b/net/http2/http2_constants_test_util.h
@@ -0,0 +1,40 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef NET_HTTP2_HTTP2_CONSTANTS_TEST_UTIL_H_
+#define NET_HTTP2_HTTP2_CONSTANTS_TEST_UTIL_H_
+
+#include <vector>
+
+#include "net/http2/http2_constants.h"
+
+namespace net {
+namespace test {
+
+// Returns a vector of all supported frame types.
+std::vector<Http2FrameType> AllHttp2FrameTypes();
+
+// Returns a vector of all supported frame flags for the specified
+// frame type. Empty if the type is unknown.
+std::vector<Http2FrameFlag> AllHttp2FrameFlagsForFrameType(Http2FrameType type);
+
+// Returns a vector of all supported RST_STREAM and GOAWAY error codes.
+std::vector<Http2ErrorCode> AllHttp2ErrorCodes();
+
+// Returns a vector of all supported parameters in SETTINGS frames.
+std::vector<Http2SettingsParameter> AllHttp2SettingsParameters();
+
+// Returns a mask of flags supported for the specified frame type. Returns
+// zero for unknown frame types.
+uint8_t KnownFlagsMaskForFrameType(Http2FrameType type);
+
+// Returns a mask of flag bits known to be invalid for the frame type.
+// For unknown frame types, the mask is zero; i.e., we don't know that any
+// are invalid.
+uint8_t InvalidFlagMaskForFrameType(Http2FrameType type);
+
+} // namespace test
+} // namespace net
+
+#endif // NET_HTTP2_HTTP2_CONSTANTS_TEST_UTIL_H_
« no previous file with comments | « net/http2/http2_constants_test.cc ('k') | net/http2/http2_constants_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698