chromium/third_party/blink/renderer/platform/image-decoders/bmp/bmp_image_decoder_test.cc

// Copyright 2015 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/image-decoders/bmp/bmp_image_decoder.h"

#include <memory>
#include <string>
#include <tuple>

#include "base/strings/stringprintf.h"
#include "build/build_config.h"
#include "build/buildflag.h"
#include "build/chromecast_buildflags.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/platform/image-decoders/image_decoder_base_test.h"
#include "third_party/blink/renderer/platform/image-decoders/image_decoder_test_helpers.h"
#include "third_party/blink/renderer/platform/image-decoders/png/png_image_decoder.h"
#include "third_party/blink/renderer/platform/wtf/shared_buffer.h"
#include "third_party/skia/include/core/SkAlphaType.h"

#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \
    (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS))
// GN deps checking doesn't understand #if guards, so we need to use nogncheck
// here: https://gn.googlesource.com/gn/+/main/docs/reference.md#nogncheck
#include "ui/base/test/skia_gold_matching_algorithm.h"  // nogncheck
#include "ui/base/test/skia_gold_pixel_diff.h"          // nogncheck
#endif

namespace blink {

namespace {

std::unique_ptr<ImageDecoder> CreateBMPDecoder() {}

}  // anonymous namespace

TEST(BMPImageDecoderTest, isSizeAvailable) {}

TEST(BMPImageDecoderTest, parseAndDecode) {}

// Test if a BMP decoder returns a proper error while decoding an empty image.
TEST(BMPImageDecoderTest, emptyImage) {}

TEST(BMPImageDecoderTest, int32MinHeight) {}

// Verify that decoding this image does not crash.
TEST(BMPImageDecoderTest, crbug752898) {}

// Verify that decoding this image does not crash.
TEST(BMPImageDecoderTest, invalidBitmapOffset) {}

// Verify that decoding an image with an unnecessary EOF marker does not crash.
TEST(BMPImageDecoderTest, allowEOFWhenPastEndOfImage) {}

BMPSuiteEntry;
class BMPImageDecoderTest : public testing::TestWithParam<BMPSuiteEntry> {};

TEST_P(BMPImageDecoderTest, VerifyBMPSuiteImage) {}

INSTANTIATE_TEST_SUITE_P();

class BMPImageDecoderCorpusTest : public ImageDecoderBaseTest {};

TEST_F(BMPImageDecoderCorpusTest, DecodingFast) {}

#if defined(THREAD_SANITIZER)
// BMPImageDecoderCorpusTest.DecodingSlow always times out under ThreadSanitizer
// v2.
#define MAYBE_DecodingSlow
#else
#define MAYBE_DecodingSlow
#endif
TEST_F(BMPImageDecoderCorpusTest, MAYBE_DecodingSlow) {}

}  // namespace blink