chromium/net/third_party/quiche/src/quiche/http2/decoder/payload_decoders/settings_payload_decoder_test.cc

// Copyright 2016 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/http2/decoder/payload_decoders/settings_payload_decoder.h"

#include <stddef.h>

#include <vector>

#include "quiche/http2/decoder/http2_frame_decoder_listener.h"
#include "quiche/http2/http2_constants.h"
#include "quiche/http2/test_tools/frame_parts.h"
#include "quiche/http2/test_tools/frame_parts_collector.h"
#include "quiche/http2/test_tools/http2_constants_test_util.h"
#include "quiche/http2/test_tools/http2_frame_builder.h"
#include "quiche/http2/test_tools/http2_random.h"
#include "quiche/http2/test_tools/http2_structures_test_util.h"
#include "quiche/http2/test_tools/payload_decoder_base_test_util.h"
#include "quiche/http2/test_tools/random_decoder_test_base.h"
#include "quiche/common/platform/api/quiche_logging.h"
#include "quiche/common/platform/api/quiche_test.h"

namespace http2 {
namespace test {

class SettingsPayloadDecoderPeer {};

namespace {

struct Listener : public FramePartsCollector {};

class SettingsPayloadDecoderTest
    : public AbstractPayloadDecoderTest<SettingsPayloadDecoder,
                                        SettingsPayloadDecoderPeer, Listener> {};

// Confirm we get an error if the SETTINGS payload is not the correct size
// to hold exactly zero or more whole Http2SettingFields.
TEST_F(SettingsPayloadDecoderTest, SettingsWrongSize) {}

// Confirm we get an error if the SETTINGS ACK payload is not empty.
TEST_F(SettingsPayloadDecoderTest, SettingsAkcWrongSize) {}

// SETTINGS must have stream_id==0, but the payload decoder doesn't check that.
TEST_F(SettingsPayloadDecoderTest, SettingsAck) {}

// Try several values of each known SETTINGS parameter.
TEST_F(SettingsPayloadDecoderTest, OneRealSetting) {}

// Decode a SETTINGS frame with lots of fields.
TEST_F(SettingsPayloadDecoderTest, ManySettings) {}

}  // namespace
}  // namespace test
}  // namespace http2