// Copyright (c) 2012 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. #include "quiche/common/http/http_header_block.h" #include <memory> #include <string> #include <utility> #include "quiche/http2/test_tools/spdy_test_utils.h" #include "quiche/common/platform/api/quiche_test.h" ElementsAre; namespace quiche { namespace test { class ValueProxyPeer { … }; std::pair<absl::string_view, absl::string_view> Pair(absl::string_view k, absl::string_view v) { … } // This test verifies that HttpHeaderBlock behaves correctly when empty. TEST(HttpHeaderBlockTest, EmptyBlock) { … } TEST(HttpHeaderBlockTest, KeyMemoryReclaimedOnLookup) { … } // This test verifies that headers can be set in a variety of ways. TEST(HttpHeaderBlockTest, AddHeaders) { … } // This test verifies that HttpHeaderBlock can be copied using Clone(). TEST(HttpHeaderBlockTest, CopyBlocks) { … } TEST(HttpHeaderBlockTest, Equality) { … } HttpHeaderBlock ReturnTestHeaderBlock() { … } // Test that certain methods do not crash on moved-from instances. TEST(HttpHeaderBlockTest, MovedFromIsValid) { … } // This test verifies that headers can be appended to no matter how they were // added originally. TEST(HttpHeaderBlockTest, AppendHeaders) { … } TEST(HttpHeaderBlockTest, CompareValueToStringPiece) { … } // This test demonstrates that the HttpHeaderBlock data structure does not // place any limitations on the characters present in the header names. TEST(HttpHeaderBlockTest, UpperCaseNames) { … } namespace { size_t HttpHeaderBlockSize(const HttpHeaderBlock& block) { … } } // namespace // Tests HttpHeaderBlock SizeEstimate(). TEST(HttpHeaderBlockTest, TotalBytesUsed) { … } // The order of header fields is preserved. Note that all pseudo-header fields // must appear before regular header fields, both in HTTP/2 and HTTP/3, see // https://www.rfc-editor.org/rfc/rfc9113.html#name-http-control-data and // https://www.rfc-editor.org/rfc/rfc9114.html#name-http-control-data. It is // the responsibility of the higher layer to add header fields in the correct // order. TEST(HttpHeaderBlockTest, OrderPreserved) { … } TEST(HttpHeaderBlockTest, InsertReturnValue) { … } } // namespace test } // namespace quiche