mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 05:25:32 +03:00
Tests: Add test for webp lossless decoding
This commit is contained in:
parent
c84968dafd
commit
09dd9c4fad
Notes:
sideshowbarker
2024-07-16 21:55:31 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/09dd9c4fad Pull-request: https://github.com/SerenityOS/serenity/pull/18171 Reviewed-by: https://github.com/LucasChollet Reviewed-by: https://github.com/gmta
@ -330,6 +330,22 @@ TEST_CASE(test_webp_extended_lossless)
|
||||
EXPECT(!plugin_decoder->loop_count());
|
||||
|
||||
EXPECT_EQ(plugin_decoder->size(), Gfx::IntSize(417, 223));
|
||||
|
||||
auto frame = MUST(plugin_decoder->frame(0));
|
||||
EXPECT_EQ(frame.image->size(), Gfx::IntSize(417, 223));
|
||||
|
||||
// Check some basic pixels.
|
||||
EXPECT_EQ(frame.image->get_pixel(0, 0), Gfx::Color(0, 0, 0, 0));
|
||||
EXPECT_EQ(frame.image->get_pixel(43, 75), Gfx::Color(255, 0, 0, 255));
|
||||
EXPECT_EQ(frame.image->get_pixel(141, 75), Gfx::Color(0, 255, 0, 255));
|
||||
EXPECT_EQ(frame.image->get_pixel(235, 75), Gfx::Color(0, 0, 255, 255));
|
||||
EXPECT_EQ(frame.image->get_pixel(341, 75), Gfx::Color(0, 0, 0, 128));
|
||||
|
||||
// Check pixels using the color cache.
|
||||
EXPECT_EQ(frame.image->get_pixel(94, 73), Gfx::Color(255, 0, 0, 255));
|
||||
EXPECT_EQ(frame.image->get_pixel(176, 115), Gfx::Color(0, 255, 0, 255));
|
||||
EXPECT_EQ(frame.image->get_pixel(290, 89), Gfx::Color(0, 0, 255, 255));
|
||||
EXPECT_EQ(frame.image->get_pixel(359, 73), Gfx::Color(0, 0, 0, 128));
|
||||
}
|
||||
|
||||
TEST_CASE(test_webp_extended_lossless_animated)
|
||||
|
Loading…
Reference in New Issue
Block a user