#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "net/websockets/websocket_deflate_parameters.h"
#include <iterator>
#include <ostream>
#include <string>
#include <vector>
#include "net/websockets/websocket_extension_parser.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace net {
namespace {
void CheckExtension(const WebSocketDeflateParameters& params,
const std::string& name,
const std::string& value) { … }
TEST(WebSocketDeflateParametersTest, Empty) { … }
TEST(WebSocketDeflateParametersTest, ServerContextTakeover) { … }
TEST(WebSocketDeflateParametersTest, ClientContextTakeover) { … }
TEST(WebSocketDeflateParametersTest, ServerMaxWindowBits) { … }
TEST(WebSocketDeflateParametersTest, ClientMaxWindowBitsWithoutValue) { … }
TEST(WebSocketDeflateParametersTest, ClientMaxWindowBitsWithValue) { … }
struct InitializeTestParameter { … };
void PrintTo(const InitializeTestParameter& p, std::ostream* o) { … }
class WebSocketDeflateParametersInitializeTest
: public ::testing::TestWithParam<InitializeTestParameter> { … };
TEST_P(WebSocketDeflateParametersInitializeTest, Initialize) { … }
struct CompatibilityTestParameter { … };
void PrintTo(const CompatibilityTestParameter& p, std::ostream* o) { … }
class WebSocketDeflateParametersCompatibilityTest
: public ::testing::TestWithParam<CompatibilityTestParameter> { … };
TEST_P(WebSocketDeflateParametersCompatibilityTest, CheckCompatiblity) { … }
InitializeTestParameter::Expectation Duplicate(const std::string& name) { … }
InitializeTestParameter::Expectation Invalid(const std::string& name) { … }
std::vector<InitializeTestParameter> InitializeTestParameters() { … }
constexpr CompatibilityTestParameter kCompatibilityTestParameters[] = …;
INSTANTIATE_TEST_SUITE_P(…);
INSTANTIATE_TEST_SUITE_P(…);
}
}