chromium/net/http/http_chunked_decoder_unittest.cc

// Copyright 2006-2008 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40284755): Remove this and spanify to fix the errors.
#pragma allow_unsafe_buffers
#endif

#include "net/http/http_chunked_decoder.h"

#include <memory>
#include <string>
#include <vector>

#include "base/format_macros.h"
#include "base/strings/stringprintf.h"
#include "net/base/net_errors.h"
#include "net/test/gtest_util.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

IsError;
IsOk;

namespace net {

namespace {

HttpChunkedDecoderTest;

void RunTest(const char* const inputs[],
             size_t num_inputs,
             const char* expected_output,
             bool expected_eof,
             int bytes_after_eof) {}

// Feed the inputs to the decoder, until it returns an error.
void RunTestUntilFailure(const char* const inputs[],
                         size_t num_inputs,
                         size_t fail_index) {}

TEST(HttpChunkedDecoderTest, Basic) {}

TEST(HttpChunkedDecoderTest, OneChunk) {}

TEST(HttpChunkedDecoderTest, Typical) {}

TEST(HttpChunkedDecoderTest, Incremental) {}

// Same as above, but group carriage returns with previous input.
TEST(HttpChunkedDecoderTest, Incremental2) {}

TEST(HttpChunkedDecoderTest, LF_InsteadOf_CRLF) {}

TEST(HttpChunkedDecoderTest, Extensions) {}

TEST(HttpChunkedDecoderTest, Trailers) {}

TEST(HttpChunkedDecoderTest, TrailersUnfinished) {}

TEST(HttpChunkedDecoderTest, InvalidChunkSize_TooBig) {}

TEST(HttpChunkedDecoderTest, InvalidChunkSize_0X) {}

TEST(HttpChunkedDecoderTest, ChunkSize_TrailingSpace) {}

TEST(HttpChunkedDecoderTest, InvalidChunkSize_TrailingTab) {}

TEST(HttpChunkedDecoderTest, InvalidChunkSize_TrailingFormFeed) {}

TEST(HttpChunkedDecoderTest, InvalidChunkSize_TrailingVerticalTab) {}

TEST(HttpChunkedDecoderTest, InvalidChunkSize_TrailingNonHexDigit) {}

TEST(HttpChunkedDecoderTest, InvalidChunkSize_LeadingSpace) {}

TEST(HttpChunkedDecoderTest, InvalidLeadingSeparator) {}

TEST(HttpChunkedDecoderTest, InvalidChunkSize_NoSeparator) {}

TEST(HttpChunkedDecoderTest, InvalidChunkSize_Negative) {}

TEST(HttpChunkedDecoderTest, InvalidChunkSize_Plus) {}

TEST(HttpChunkedDecoderTest, InvalidConsecutiveCRLFs) {}

TEST(HttpChunkedDecoderTest, ReallyBigChunks) {}

TEST(HttpChunkedDecoderTest, ExcessiveChunkLen) {}

TEST(HttpChunkedDecoderTest, ExcessiveChunkLen2) {}

TEST(HttpChunkedDecoderTest, BasicExtraData) {}

TEST(HttpChunkedDecoderTest, IncrementalExtraData) {}

TEST(HttpChunkedDecoderTest, MultipleExtraDataBlocks) {}

// Test when the line with the chunk length is too long.
TEST(HttpChunkedDecoderTest, LongChunkLengthLine) {}

// Test when the extension portion of the line with the chunk length is too
// long.
TEST(HttpChunkedDecoderTest, LongLengthLengthLine) {}

}  // namespace

}  // namespace net