diff --git a/Tests/LibGfx/TestImageDecoder.cpp b/Tests/LibGfx/TestImageDecoder.cpp index e25259b5d4..4fbf6ae582 100644 --- a/Tests/LibGfx/TestImageDecoder.cpp +++ b/Tests/LibGfx/TestImageDecoder.cpp @@ -177,6 +177,16 @@ TEST_CASE(test_jpeg_sof2_12bits) expect_single_frame_of_size(*plugin_decoder, { 320, 240 }); } +TEST_CASE(test_jpeg_empty_icc) +{ + auto file = MUST(Core::MappedFile::map(TEST_INPUT("jpg/gradient_empty_icc.jpg"sv))); + EXPECT(Gfx::JPEGImageDecoderPlugin::sniff(file->bytes())); + auto plugin_decoder = MUST(Gfx::JPEGImageDecoderPlugin::create(file->bytes())); + MUST(plugin_decoder->initialize()); + + expect_single_frame_of_size(*plugin_decoder, { 80, 80 }); +} + TEST_CASE(test_pbm) { auto file = MUST(Core::MappedFile::map(TEST_INPUT("pnm/buggie-raw.pbm"sv))); diff --git a/Tests/LibGfx/test-inputs/jpg/gradient_empty_icc.jpg b/Tests/LibGfx/test-inputs/jpg/gradient_empty_icc.jpg new file mode 100644 index 0000000000..14c155fd4c Binary files /dev/null and b/Tests/LibGfx/test-inputs/jpg/gradient_empty_icc.jpg differ