blob: 2d4a72e71b01ef47e0ed097004006fee9050601c [file] [log] [blame]
QUICHE teama6ef0a62019-03-07 20:34:33 -05001// Copyright (c) 2018 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "net/third_party/quiche/src/quic/core/qpack/qpack_test_utils.h"
6
7#include <limits>
8
9namespace quic {
10namespace test {
11
12FragmentSizeGenerator FragmentModeToFragmentSizeGenerator(
13 FragmentMode fragment_mode) {
14 switch (fragment_mode) {
15 case FragmentMode::kSingleChunk:
16 return []() { return std::numeric_limits<size_t>::max(); };
17 case FragmentMode::kOctetByOctet:
18 return []() { return 1; };
19 }
20}
21
22} // namespace test
23} // namespace quic