Fix cached JPEG test

This test didn't really check anything useful as the end result would be
the same if the second JPEG failed to render.

Fix this by clearing the canvas between the images, so we can tell if
the second image actually rendered or not.
This commit is contained in:
Pierre Ossman 2023-05-15 12:55:04 +02:00
parent c2d6a06d6d
commit 91307951d3
1 changed files with 2 additions and 0 deletions

View File

@ -246,6 +246,8 @@ describe('JPEG Decoder', function () {
testDecodeRect(decoder, 0, 0, 4, 4, data1, display, 24);
display.fillRect(0, 0, 4, 4, [128, 128, 128, 255]);
let data2 = [
// JPEG data
0xff, 0xd8, 0xff, 0xe0, 0x00, 0x10, 0x4a, 0x46,