chromium/third_party/blink/renderer/core/loader/resource/multipart_image_resource_parser_test.cc

// Copyright 2016 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/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "third_party/blink/renderer/core/loader/resource/multipart_image_resource_parser.h"

#include <stddef.h>
#include <stdint.h>
#include <string.h>

#include "base/numerics/safe_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/platform/loader/fetch/resource_response.h"
#include "third_party/blink/renderer/platform/network/http_names.h"

namespace blink {
namespace multipart_image_resource_parser_test {

String ToString(const Vector<char>& data) {}

class MockClient final : public GarbageCollected<MockClient>,
                         public MultipartImageResourceParser::Client {};

TEST(MultipartResponseTest, SkippableLength) {}

TEST(MultipartResponseTest, FindBoundary) {}

TEST(MultipartResponseTest, NoStartBoundary) {}

TEST(MultipartResponseTest, NoEndBoundary) {}

TEST(MultipartResponseTest, NoStartAndEndBoundary) {}

TEST(MultipartResponseTest, MalformedBoundary) {}

// Used in for tests that break the data in various places.
struct TestChunk {};

void VariousChunkSizesTest(const TestChunk chunks[],
                           int chunks_size,
                           size_t responses,
                           int received_data,
                           const char* completed_data) {}

template <size_t N>
void VariousChunkSizesTest(const TestChunk (&chunks)[N],
                           size_t responses,
                           int received_data,
                           const char* completed_data) {}

TEST(MultipartResponseTest, BreakInBoundary) {}

TEST(MultipartResponseTest, BreakInHeaders) {}

TEST(MultipartResponseTest, BreakInData) {}

TEST(MultipartResponseTest, SmallChunk) {}

TEST(MultipartResponseTest, MultipleBoundaries) {}

TEST(MultipartResponseTest, EatLeadingLF) {}

TEST(MultipartResponseTest, EatLeadingCRLF) {}

}  // namespace multipart_image_resource_parser_test
}  // namespace blink