#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "net/websockets/websocket_frame_parser.h"
#include <stdint.h>
#include <algorithm>
#include <iterator>
#include <string>
#include <string_view>
#include <vector>
#include "base/containers/span.h"
#include "net/websockets/websocket_frame.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace net {
namespace {
constexpr char kHello[] = …;
constexpr uint64_t kHelloLength = …;
constexpr char kHelloFrame[] = …;
constexpr char kMaskedHelloFrame[] = …;
constexpr uint64_t kMaskedHelloFrameLength = …;
struct FrameHeaderTestCase { … };
constexpr FrameHeaderTestCase kFrameHeaderTests[] = …;
constexpr int kNumFrameHeaderTests = …;
TEST(WebSocketFrameParserTest, DecodeNormalFrame) { … }
TEST(WebSocketFrameParserTest, DecodeMaskedFrame) { … }
TEST(WebSocketFrameParserTest, DecodeManyFrames) { … }
TEST(WebSocketFrameParserTest, DecodePartialFrame) { … }
TEST(WebSocketFrameParserTest, DecodePartialMaskedFrame) { … }
TEST(WebSocketFrameParserTest, DecodeFramesOfVariousLengths) { … }
TEST(WebSocketFrameParserTest, DecodePartialHeader) { … }
TEST(WebSocketFrameParserTest, InvalidLengthEncoding) { … }
TEST(WebSocketFrameParserTest, FrameTypes) { … }
TEST(WebSocketFrameParserTest, FinalBitAndReservedBits) { … }
}
}