#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "net/spdy/spdy_http_utils.h"
#include <stdint.h>
#include <limits>
#include "base/test/gmock_expected_support.h"
#include "base/test/scoped_feature_list.h"
#include "net/base/features.h"
#include "net/base/ip_endpoint.h"
#include "net/http/http_request_info.h"
#include "net/http/http_response_headers.h"
#include "net/http/http_response_headers_test_util.h"
#include "net/http/http_response_info.h"
#include "net/third_party/quiche/src/quiche/common/http/http_header_block.h"
#include "net/third_party/quiche/src/quiche/http2/test_tools/spdy_test_utils.h"
#include "net/third_party/quiche/src/quiche/spdy/core/spdy_framer.h"
#include "net/third_party/quiche/src/quiche/spdy/core/spdy_protocol.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace net {
namespace {
Values;
class SpdyHttpUtilsTestParam : public testing::TestWithParam<bool> { … };
INSTANTIATE_TEST_SUITE_P(…);
void CheckOrdering(const quiche::HttpHeaderBlock& headers) { … }
TEST(SpdyHttpUtilsTest, ConvertRequestPriorityToSpdy3Priority) { … }
TEST(SpdyHttpUtilsTest, ConvertSpdy3PriorityToRequestPriority) { … }
TEST_P(SpdyHttpUtilsTestParam, CreateSpdyHeadersFromHttpRequestHTTP2) { … }
TEST_P(SpdyHttpUtilsTestParam,
CreateSpdyHeadersFromHttpRequestForExtendedConnect) { … }
TEST_P(SpdyHttpUtilsTestParam, CreateSpdyHeadersWithDefaultPriority) { … }
TEST_P(SpdyHttpUtilsTestParam, CreateSpdyHeadersWithExistingPriority) { … }
TEST(SpdyHttpUtilsTest, CreateSpdyHeadersFromHttpRequestConnectHTTP2) { … }
constexpr auto ToSimpleString = …;
enum class SpdyHeadersToHttpResponseHeadersFeatureConfig { … };
std::string PrintToString(
SpdyHeadersToHttpResponseHeadersFeatureConfig config) { … }
class SpdyHeadersToHttpResponseTest
: public ::testing::TestWithParam<
SpdyHeadersToHttpResponseHeadersFeatureConfig> { … };
TEST_P(SpdyHeadersToHttpResponseTest, SpdyHeadersToHttpResponse) { … }
INSTANTIATE_TEST_SUITE_P(…);
SpdyHeadersToHttpResponseHeadersFunctionPtrType;
class SpdyHeadersToHttpResponseHeadersTest
: public testing::TestWithParam<
SpdyHeadersToHttpResponseHeadersFunctionPtrType> { … };
TEST_P(SpdyHeadersToHttpResponseHeadersTest, NoStatus) { … }
TEST_P(SpdyHeadersToHttpResponseHeadersTest, EmptyStatus) { … }
TEST_P(SpdyHeadersToHttpResponseHeadersTest, Plain200) { … }
TEST_P(SpdyHeadersToHttpResponseHeadersTest, MultipleLocation) { … }
TEST_P(SpdyHeadersToHttpResponseHeadersTest, SpacesAmongValues) { … }
TEST_P(SpdyHeadersToHttpResponseHeadersTest, RepeatedHeader) { … }
TEST_P(SpdyHeadersToHttpResponseHeadersTest, EmptyValue) { … }
TEST_P(SpdyHeadersToHttpResponseHeadersTest, PseudoHeadersAreDropped) { … }
TEST_P(SpdyHeadersToHttpResponseHeadersTest, DoubleEmptyLocationHeader) { … }
TEST_P(SpdyHeadersToHttpResponseHeadersTest,
DifferentLocationHeaderTriggersError) { … }
TEST_P(SpdyHeadersToHttpResponseHeadersTest,
LocationEquivalenceIgnoresSurroundingSpace) { … }
INSTANTIATE_TEST_SUITE_P(…);
}
}