chromium/third_party/blink/renderer/platform/graphics/decoding_image_generator_test.cc

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

#include "third_party/blink/renderer/platform/graphics/decoding_image_generator.h"

#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/platform/image-decoders/image_decoder_test_helpers.h"
#include "third_party/blink/renderer/platform/image-decoders/segment_reader.h"

namespace blink {

namespace {

constexpr unsigned kTooShortForSignature =;

scoped_refptr<SegmentReader> CreateSegmentReader(char* reference_data,
                                                 size_t data_length) {}

}  // namespace

class DecodingImageGeneratorTest : public testing::Test {};

TEST_F(DecodingImageGeneratorTest, Create) {}

TEST_F(DecodingImageGeneratorTest, CreateWithNoSize) {}

TEST_F(DecodingImageGeneratorTest, CreateWithNullImageDecoder) {}

// This is a regression test for crbug.com/341812566 and passes if it does not
// crash under ASAN.
TEST_F(DecodingImageGeneratorTest, AdjustedGetPixels) {}

// TODO(wkorman): Test Create with a null ImageFrameGenerator. We'd
// need a way to intercept construction of the instance (and could do
// same for ImageDecoder above to reduce fragility of knowing a short
// signature will produce a null ImageDecoder). Note that it's not
// clear that it's possible to end up with a null ImageFrameGenerator,
// so maybe we can just remove that check from
// DecodingImageGenerator::Create.

}  // namespace blink