From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- image/test/browser/animated.gif | Bin 0 -> 71479 bytes image/test/browser/animated2.gif | Bin 0 -> 66647 bytes image/test/browser/big.png | Bin 0 -> 129497 bytes image/test/browser/browser.toml | 27 + image/test/browser/browser_bug1869938.js | 87 + image/test/browser/browser_bug666317.js | 138 ++ image/test/browser/browser_docshell_type_editor.js | 134 ++ .../browser_docshell_type_editor/chrome.manifest | 1 + .../img/privileged.png | Bin 0 -> 90 bytes image/test/browser/browser_image.js | 261 +++ image/test/browser/browser_mozicon_file.js | 12 + .../browser_mozicon_file_sandbox_headless.js | 13 + ...ser_offscreen_image_in_out_of_process_iframe.js | 164 ++ image/test/browser/browser_sandbox_headless.toml | 6 + image/test/browser/empty.html | 2 + image/test/browser/head.js | 136 ++ image/test/browser/helper1869938.html | 12 + image/test/browser/image.html | 23 + image/test/browser/imageX2.html | 14 + image/test/crashtests/1205923-1.html | 36 + image/test/crashtests/1210745-1.gif | Bin 0 -> 23 bytes image/test/crashtests/1212954-1.svg | 16 + image/test/crashtests/1235605.gif | Bin 0 -> 2360 bytes image/test/crashtests/1241728-1.html | 17 + image/test/crashtests/1241729-1.bmp | Bin 0 -> 548 bytes image/test/crashtests/1241729-1.html | 5 + image/test/crashtests/1242093-1.html | 22 + image/test/crashtests/1242778-1.png | Bin 0 -> 15929 bytes image/test/crashtests/1249576-1.png | Bin 0 -> 1169 bytes image/test/crashtests/1251091-1.html | 51 + image/test/crashtests/1251091-1.png | Bin 0 -> 95370 bytes image/test/crashtests/1253362-1.html | 11 + image/test/crashtests/1262549-1.gif | Bin 0 -> 428 bytes image/test/crashtests/1277397-1.jpg | Bin 0 -> 266 bytes image/test/crashtests/1277397-2.jpg | Bin 0 -> 1407 bytes image/test/crashtests/1355898-1.html | 45 + image/test/crashtests/1375842-1.html | 16 + image/test/crashtests/1413762-1.gif | Bin 0 -> 7866 bytes image/test/crashtests/1443232-1.gif | Bin 0 -> 42434 bytes image/test/crashtests/1443232-1.html | 30 + image/test/crashtests/1509998.gif | Bin 0 -> 92 bytes image/test/crashtests/1526717-1.html | 1 + image/test/crashtests/1526717-1.png | Bin 0 -> 318 bytes image/test/crashtests/1629490-1-iframe.html | 1 + image/test/crashtests/1629490-1.html | 49 + image/test/crashtests/1634839-1-iframe.html | 1 + image/test/crashtests/1634839-1.html | 51 + image/test/crashtests/1634839-2-iframe.html | 1 + image/test/crashtests/1634839-2.html | 51 + image/test/crashtests/1676172-1-iframe.html | 13 + image/test/crashtests/1676172-1.gif | Bin 0 -> 2439 bytes image/test/crashtests/1676172-1.html | 57 + image/test/crashtests/1763581-1-iframe.html | 15 + image/test/crashtests/1763581-1.gif | Bin 0 -> 70793 bytes image/test/crashtests/1763581-1.html | 28 + image/test/crashtests/1763581-1.sjs | 71 + image/test/crashtests/1765871-1.jpg | Bin 0 -> 6872 bytes image/test/crashtests/1814553.avif | Bin 0 -> 803330 bytes image/test/crashtests/1814561.avif | Bin 0 -> 2104 bytes image/test/crashtests/1814677.avif | Bin 0 -> 1607 bytes image/test/crashtests/1814708.avif | Bin 0 -> 1607 bytes image/test/crashtests/1814741.avif | Bin 0 -> 1607 bytes image/test/crashtests/1814774.avif | Bin 0 -> 2104 bytes image/test/crashtests/1817108.avif | Bin 0 -> 2105 bytes image/test/crashtests/1848717-1.avif | Bin 0 -> 301 bytes image/test/crashtests/1852649.webp | Bin 0 -> 1072 bytes image/test/crashtests/1862059-1.html | 15 + image/test/crashtests/1862059-1.svg | 43 + image/test/crashtests/1862059-1.svg^headers^ | 3 + image/test/crashtests/256-height.ico | Bin 0 -> 154 bytes image/test/crashtests/256-width.ico | Bin 0 -> 154 bytes image/test/crashtests/463696.bmp | Bin 0 -> 1272 bytes image/test/crashtests/523528-1.gif | Bin 0 -> 132 bytes image/test/crashtests/523528-2.gif | Bin 0 -> 132 bytes image/test/crashtests/570451.png | Bin 0 -> 114 bytes image/test/crashtests/694165-1.xhtml | 510 ++++++ image/test/crashtests/732319-1.html | 2 + image/test/crashtests/83804-1.gif | Bin 0 -> 37 bytes image/test/crashtests/844403-1.html | 10 + image/test/crashtests/856616.gif | Bin 0 -> 27 bytes image/test/crashtests/89341-1.gif | Bin 0 -> 769 bytes image/test/crashtests/944353.jpg | Bin 0 -> 610965 bytes image/test/crashtests/colormap-range.gif | Bin 0 -> 5657 bytes image/test/crashtests/crashtests.list | 83 + image/test/crashtests/delayedframe.sjs | 44 + image/test/crashtests/delaytest.html | 59 + image/test/crashtests/discardframe.htm | 1 + image/test/crashtests/finite-apng.png | Bin 0 -> 5834 bytes image/test/crashtests/ie.png | Bin 0 -> 466589 bytes .../test/crashtests/invalid-disposal-method-1.gif | Bin 0 -> 167 bytes .../test/crashtests/invalid-disposal-method-2.gif | Bin 0 -> 167 bytes .../test/crashtests/invalid-disposal-method-3.gif | Bin 0 -> 167 bytes image/test/crashtests/invalid-icc-profile.jpg | Bin 0 -> 2568 bytes .../test/crashtests/invalid-size-second-frame.gif | Bin 0 -> 673 bytes image/test/crashtests/invalid-size.gif | Bin 0 -> 329 bytes image/test/crashtests/invalid_ico_height.ico | Bin 0 -> 894 bytes image/test/crashtests/invalid_ico_width.ico | Bin 0 -> 894 bytes image/test/crashtests/multiple-png-hassize.ico | Bin 0 -> 18096 bytes image/test/crashtests/out2.gif | Bin 0 -> 24129 bytes image/test/crashtests/ownerdiscard.html | 48 + image/test/crashtests/rainbow.gif | Bin 0 -> 6171 bytes image/test/crashtests/threeframes-end.gif | Bin 0 -> 16 bytes image/test/crashtests/threeframes-start.gif | Bin 0 -> 92 bytes image/test/crashtests/truncated-second-frame.png | Bin 0 -> 72247 bytes image/test/crashtests/unsized-svg.svg | 1 + image/test/fuzzing/TestDecoders.cpp | 181 +++ image/test/fuzzing/moz.build | 24 + image/test/gtest/Common.cpp | 1072 +++++++++++++ image/test/gtest/Common.h | 600 +++++++ image/test/gtest/TestADAM7InterpolatingFilter.cpp | 595 +++++++ image/test/gtest/TestAnimationFrameBuffer.cpp | 895 +++++++++++ image/test/gtest/TestBlendAnimationFilter.cpp | 450 ++++++ image/test/gtest/TestCopyOnWrite.cpp | 237 +++ image/test/gtest/TestDecodeToSurface.cpp | 173 ++ image/test/gtest/TestDecoders.cpp | 1142 +++++++++++++ image/test/gtest/TestDecodersPerf.cpp | 159 ++ image/test/gtest/TestDeinterlacingFilter.cpp | 636 ++++++++ image/test/gtest/TestDownscalingFilter.cpp | 231 +++ image/test/gtest/TestFrameAnimator.cpp | 130 ++ image/test/gtest/TestLoader.cpp | 118 ++ image/test/gtest/TestMetadata.cpp | 260 +++ image/test/gtest/TestRemoveFrameRectFilter.cpp | 311 ++++ image/test/gtest/TestSourceBuffer.cpp | 822 ++++++++++ image/test/gtest/TestStreamingLexer.cpp | 935 +++++++++++ image/test/gtest/TestSurfaceCache.cpp | 159 ++ image/test/gtest/TestSurfacePipeIntegration.cpp | 349 ++++ image/test/gtest/TestSurfaceSink.cpp | 982 ++++++++++++ image/test/gtest/TestSwizzleFilter.cpp | 120 ++ .../gtest/animated-with-extra-image-sub-blocks.gif | Bin 0 -> 434 bytes image/test/gtest/blend.avif | Bin 0 -> 1989 bytes image/test/gtest/blend.gif | Bin 0 -> 412 bytes image/test/gtest/blend.png | Bin 0 -> 339 bytes image/test/gtest/blend.webp | Bin 0 -> 160 bytes image/test/gtest/bug-1655846.avif | Bin 0 -> 256 bytes image/test/gtest/corrupt-with-bad-bmp-height.ico | Bin 0 -> 41663 bytes image/test/gtest/corrupt-with-bad-bmp-width.ico | Bin 0 -> 41663 bytes image/test/gtest/corrupt-with-bad-ico-bpp.ico | Bin 0 -> 3270 bytes image/test/gtest/corrupt.jpg | Bin 0 -> 2477 bytes image/test/gtest/downscaled.avif | Bin 0 -> 862 bytes image/test/gtest/downscaled.bmp | Bin 0 -> 30138 bytes image/test/gtest/downscaled.gif | Bin 0 -> 223 bytes image/test/gtest/downscaled.ico | Bin 0 -> 41662 bytes image/test/gtest/downscaled.icon | Bin 0 -> 40005 bytes image/test/gtest/downscaled.jpg | Bin 0 -> 6035 bytes image/test/gtest/downscaled.jxl | Bin 0 -> 599 bytes image/test/gtest/downscaled.png | Bin 0 -> 1015 bytes image/test/gtest/downscaled.webp | Bin 0 -> 56 bytes image/test/gtest/exif_resolution.jpg | Bin 0 -> 2018 bytes image/test/gtest/first-frame-green.avif | Bin 0 -> 1001 bytes image/test/gtest/first-frame-green.gif | Bin 0 -> 317 bytes image/test/gtest/first-frame-green.png | Bin 0 -> 364 bytes image/test/gtest/first-frame-green.webp | Bin 0 -> 154 bytes image/test/gtest/first-frame-padding.gif | Bin 0 -> 49 bytes .../gtest/gray-235-10bit-full-range-bt2020.avif | Bin 0 -> 310 bytes .../gtest/gray-235-10bit-full-range-bt601.avif | Bin 0 -> 310 bytes .../gtest/gray-235-10bit-full-range-bt709.avif | Bin 0 -> 310 bytes .../gtest/gray-235-10bit-full-range-grayscale.avif | Bin 0 -> 301 bytes .../gtest/gray-235-10bit-limited-range-bt2020.avif | Bin 0 -> 310 bytes .../gtest/gray-235-10bit-limited-range-bt601.avif | Bin 0 -> 310 bytes .../gtest/gray-235-10bit-limited-range-bt709.avif | Bin 0 -> 310 bytes .../gray-235-10bit-limited-range-grayscale.avif | Bin 0 -> 301 bytes .../gtest/gray-235-12bit-full-range-bt2020.avif | Bin 0 -> 307 bytes .../gtest/gray-235-12bit-full-range-bt601.avif | Bin 0 -> 307 bytes .../gtest/gray-235-12bit-full-range-bt709.avif | Bin 0 -> 307 bytes .../gtest/gray-235-12bit-full-range-grayscale.avif | Bin 0 -> 301 bytes .../gtest/gray-235-12bit-limited-range-bt2020.avif | Bin 0 -> 307 bytes .../gtest/gray-235-12bit-limited-range-bt601.avif | Bin 0 -> 307 bytes .../gtest/gray-235-12bit-limited-range-bt709.avif | Bin 0 -> 307 bytes .../gray-235-12bit-limited-range-grayscale.avif | Bin 0 -> 301 bytes .../gtest/gray-235-8bit-full-range-bt2020.avif | Bin 0 -> 309 bytes .../test/gtest/gray-235-8bit-full-range-bt601.avif | Bin 0 -> 309 bytes .../test/gtest/gray-235-8bit-full-range-bt709.avif | Bin 0 -> 309 bytes .../gtest/gray-235-8bit-full-range-grayscale.avif | Bin 0 -> 300 bytes .../gtest/gray-235-8bit-limited-range-bt2020.avif | Bin 0 -> 309 bytes .../gtest/gray-235-8bit-limited-range-bt601.avif | Bin 0 -> 309 bytes .../gtest/gray-235-8bit-limited-range-bt709.avif | Bin 0 -> 309 bytes .../gray-235-8bit-limited-range-grayscale.avif | Bin 0 -> 300 bytes image/test/gtest/green-1x1-truncated.gif | Bin 0 -> 53 bytes image/test/gtest/green-large-bmp.ico | Bin 0 -> 270398 bytes image/test/gtest/green-large-png.ico | Bin 0 -> 341 bytes image/test/gtest/green-multiple-sizes.ico | Bin 0 -> 14144 bytes image/test/gtest/green.avif | Bin 0 -> 321 bytes image/test/gtest/green.bmp | Bin 0 -> 30138 bytes image/test/gtest/green.gif | Bin 0 -> 156 bytes image/test/gtest/green.icc_srgb.webp | Bin 0 -> 3092 bytes image/test/gtest/green.ico | Bin 0 -> 41662 bytes image/test/gtest/green.icon | Bin 0 -> 40004 bytes image/test/gtest/green.jpg | Bin 0 -> 361 bytes image/test/gtest/green.jxl | Bin 0 -> 33 bytes image/test/gtest/green.png | Bin 0 -> 255 bytes image/test/gtest/green.webp | Bin 0 -> 42 bytes .../gtest/hdlr-nonzero-reserved-bug-1727033.avif | Bin 0 -> 294 bytes image/test/gtest/invalid-truncated-metadata.bmp | Bin 0 -> 54 bytes image/test/gtest/large.avif | Bin 0 -> 81500 bytes image/test/gtest/large.jxl | Bin 0 -> 315715 bytes image/test/gtest/large.webp | Bin 0 -> 168686 bytes image/test/gtest/moz.build | 156 ++ image/test/gtest/multilayer.avif | Bin 0 -> 64613 bytes image/test/gtest/no-frame-delay.gif | Bin 0 -> 317 bytes image/test/gtest/perf_cmyk.jpg | Bin 0 -> 18960 bytes image/test/gtest/perf_gray.jpg | Bin 0 -> 4479 bytes image/test/gtest/perf_gray.png | Bin 0 -> 4472 bytes image/test/gtest/perf_gray_alpha.png | Bin 0 -> 6847 bytes image/test/gtest/perf_srgb.gif | Bin 0 -> 1743 bytes image/test/gtest/perf_srgb.png | Bin 0 -> 2993 bytes image/test/gtest/perf_srgb_alpha.png | Bin 0 -> 3203 bytes image/test/gtest/perf_srgb_alpha_lossless.webp | Bin 0 -> 3134 bytes image/test/gtest/perf_srgb_alpha_lossy.webp | Bin 0 -> 5014 bytes image/test/gtest/perf_srgb_lossless.webp | Bin 0 -> 3134 bytes image/test/gtest/perf_srgb_lossy.webp | Bin 0 -> 4948 bytes image/test/gtest/perf_ycbcr.jpg | Bin 0 -> 15049 bytes image/test/gtest/rle4.bmp | Bin 0 -> 3686 bytes image/test/gtest/rle8.bmp | Bin 0 -> 1288 bytes image/test/gtest/stackcheck.avif | Bin 0 -> 194817 bytes .../transparent-green-50pct-10bit-yuv420.avif | Bin 0 -> 556 bytes .../transparent-green-50pct-10bit-yuv422.avif | Bin 0 -> 551 bytes .../transparent-green-50pct-10bit-yuv444.avif | Bin 0 -> 556 bytes .../transparent-green-50pct-12bit-yuv420.avif | Bin 0 -> 556 bytes .../transparent-green-50pct-12bit-yuv422.avif | Bin 0 -> 557 bytes .../transparent-green-50pct-12bit-yuv444.avif | Bin 0 -> 558 bytes .../gtest/transparent-green-50pct-8bit-yuv420.avif | Bin 0 -> 539 bytes .../gtest/transparent-green-50pct-8bit-yuv422.avif | Bin 0 -> 533 bytes .../gtest/transparent-green-50pct-8bit-yuv444.avif | Bin 0 -> 537 bytes image/test/gtest/transparent-ico-with-and-mask.ico | Bin 0 -> 3262 bytes image/test/gtest/transparent-if-within-ico.bmp | Bin 0 -> 4234 bytes image/test/gtest/transparent-no-alpha-header.webp | Bin 0 -> 120 bytes image/test/gtest/transparent.avif | Bin 0 -> 209480 bytes image/test/gtest/transparent.gif | Bin 0 -> 355 bytes image/test/gtest/transparent.jxl | Bin 0 -> 63244 bytes image/test/gtest/transparent.png | Bin 0 -> 419 bytes image/test/gtest/transparent.webp | Bin 0 -> 120 bytes .../test/gtest/valid-avif-colr-nclx-and-prof.avif | Bin 0 -> 883 bytes image/test/mochitest/12M-pixels-1.png | Bin 0 -> 22467 bytes image/test/mochitest/12M-pixels-2.png | Bin 0 -> 22467 bytes image/test/mochitest/6M-pixels.png | Bin 0 -> 10147 bytes image/test/mochitest/INT32_MIN.bmp | Bin 0 -> 60 bytes image/test/mochitest/animated-avif.avif | Bin 0 -> 1333 bytes image/test/mochitest/animated-gif-finalframe.gif | Bin 0 -> 72 bytes image/test/mochitest/animated-gif.gif | Bin 0 -> 146 bytes image/test/mochitest/animated-gif2.gif | Bin 0 -> 165 bytes .../mochitest/animated-gif_trailing-garbage.gif | Bin 0 -> 4030 bytes image/test/mochitest/animated1.gif | Bin 0 -> 4558 bytes image/test/mochitest/animated1.svg | 12 + image/test/mochitest/animated2.gif | Bin 0 -> 4558 bytes image/test/mochitest/animatedMask.gif | Bin 0 -> 4568 bytes image/test/mochitest/animation.svg | 5 + image/test/mochitest/animationPolling.js | 469 ++++++ image/test/mochitest/bad.jpg | Bin 0 -> 2477 bytes image/test/mochitest/big.png | Bin 0 -> 129497 bytes image/test/mochitest/blue.gif | Bin 0 -> 45 bytes image/test/mochitest/blue.png | Bin 0 -> 2745 bytes image/test/mochitest/bug1132427.gif | Bin 0 -> 634 bytes image/test/mochitest/bug1132427.html | 6 + image/test/mochitest/bug1180105-waiter.sjs | 29 + image/test/mochitest/bug1180105.sjs | 68 + image/test/mochitest/bug1217571-iframe.html | 17 + image/test/mochitest/bug1217571.jpg | Bin 0 -> 2679 bytes image/test/mochitest/bug1319025-ref.png | Bin 0 -> 347 bytes image/test/mochitest/bug1319025.png | Bin 0 -> 422 bytes image/test/mochitest/bug399925.gif | Bin 0 -> 1645 bytes image/test/mochitest/bug415761.ico | Bin 0 -> 766 bytes image/test/mochitest/bug468160.sjs | 5 + image/test/mochitest/bug478398_ONLY.png | Bin 0 -> 14139 bytes image/test/mochitest/bug490949-iframe.html | 7 + image/test/mochitest/bug490949.sjs | 32 + image/test/mochitest/bug496292-1.sjs | 31 + image/test/mochitest/bug496292-2.sjs | 31 + image/test/mochitest/bug496292-iframe-1.html | 7 + image/test/mochitest/bug496292-iframe-2.html | 7 + image/test/mochitest/bug496292-iframe-ref.html | 7 + image/test/mochitest/bug497665-iframe.html | 8 + image/test/mochitest/bug497665.sjs | 33 + image/test/mochitest/bug552605.sjs | 12 + image/test/mochitest/bug657191.sjs | 26 + image/test/mochitest/bug671906-iframe.html | 7 + image/test/mochitest/bug671906.sjs | 34 + image/test/mochitest/bug733553-informant.sjs | 13 + image/test/mochitest/bug733553.sjs | 104 ++ image/test/mochitest/bug767779.sjs | 56 + image/test/mochitest/bug89419-iframe.html | 7 + image/test/mochitest/bug89419.sjs | 12 + image/test/mochitest/bug900200-ref.png | Bin 0 -> 660 bytes image/test/mochitest/bug900200.png | Bin 0 -> 840 bytes image/test/mochitest/child.html | 22 + image/test/mochitest/chrome.toml | 6 + image/test/mochitest/clear.avif | Bin 0 -> 1975 bytes image/test/mochitest/clear.gif | Bin 0 -> 321 bytes image/test/mochitest/clear.png | Bin 0 -> 622 bytes image/test/mochitest/clear.webp | Bin 0 -> 202 bytes image/test/mochitest/clear2-results.gif | Bin 0 -> 177 bytes image/test/mochitest/clear2.gif | Bin 0 -> 219 bytes image/test/mochitest/clear2.webp | Bin 0 -> 228 bytes image/test/mochitest/damon.jpg | Bin 0 -> 2679 bytes image/test/mochitest/error-early.png | 1 + image/test/mochitest/filter-final.svg | 9 + image/test/mochitest/filter.svg | 9 + image/test/mochitest/finite-apng.png | Bin 0 -> 5834 bytes image/test/mochitest/first-frame-padding.gif | Bin 0 -> 49 bytes image/test/mochitest/green-background.html | 30 + image/test/mochitest/green.png | Bin 0 -> 255 bytes image/test/mochitest/grey.png | Bin 0 -> 256 bytes image/test/mochitest/ico-bmp-opaque.ico | Bin 0 -> 1094 bytes image/test/mochitest/ico-bmp-transparent.ico | Bin 0 -> 4286 bytes image/test/mochitest/iframe.html | 5 + image/test/mochitest/imgutils.js | 137 ++ image/test/mochitest/infinite-apng.png | Bin 0 -> 1169 bytes image/test/mochitest/infinite.avif | Bin 0 -> 2311 bytes image/test/mochitest/infinite.webp | Bin 0 -> 3742 bytes image/test/mochitest/invalid.jpg | 1 + image/test/mochitest/keep.gif | Bin 0 -> 321 bytes image/test/mochitest/keep.png | Bin 0 -> 622 bytes image/test/mochitest/keep.webp | Bin 0 -> 152 bytes image/test/mochitest/lime-anim-100x100-2.svg | 6 + image/test/mochitest/lime-anim-100x100.svg | 7 + image/test/mochitest/lime-css-anim-100x100.svg | 19 + image/test/mochitest/lime100x100.svg | 4 + image/test/mochitest/mochitest.toml | 258 +++ image/test/mochitest/mq_dynamic_svg_ref.html | 38 + image/test/mochitest/mq_dynamic_svg_test.html | 61 + image/test/mochitest/opaque.bmp | Bin 0 -> 1086 bytes image/test/mochitest/over.png | Bin 0 -> 525 bytes image/test/mochitest/purple.gif | Bin 0 -> 86 bytes image/test/mochitest/rainbow.gif | Bin 0 -> 1572 bytes image/test/mochitest/red.gif | Bin 0 -> 43 bytes image/test/mochitest/red.png | Bin 0 -> 82 bytes image/test/mochitest/ref-iframe.html | 6 + image/test/mochitest/restore-previous.gif | Bin 0 -> 457 bytes image/test/mochitest/restore-previous.png | Bin 0 -> 622 bytes image/test/mochitest/rillybad.jpg | Bin 0 -> 11142 bytes image/test/mochitest/schrep.png | Bin 0 -> 38767 bytes image/test/mochitest/shaver.png | Bin 0 -> 52045 bytes image/test/mochitest/short_header.gif | Bin 0 -> 1488 bytes image/test/mochitest/source.png | Bin 0 -> 525 bytes image/test/mochitest/test_animSVGImage.html | 124 ++ image/test/mochitest/test_animSVGImage2.html | 124 ++ image/test/mochitest/test_animated_css_image.html | 223 +++ image/test/mochitest/test_animated_gif.html | 50 + image/test/mochitest/test_animation.html | 45 + image/test/mochitest/test_animation2.html | 49 + image/test/mochitest/test_animation_operators.html | 167 ++ .../test/mochitest/test_background_image_anim.html | 44 + image/test/mochitest/test_bug1132427.html | 94 ++ image/test/mochitest/test_bug1180105.html | 46 + image/test/mochitest/test_bug1217571.html | 43 + image/test/mochitest/test_bug1325080.html | 37 + image/test/mochitest/test_bug399925.html | 102 ++ image/test/mochitest/test_bug415761.html | 117 ++ image/test/mochitest/test_bug435296.html | 85 + image/test/mochitest/test_bug466586.html | 58 + image/test/mochitest/test_bug468160.html | 29 + image/test/mochitest/test_bug478398.html | 87 + image/test/mochitest/test_bug490949.html | 112 ++ image/test/mochitest/test_bug496292.html | 130 ++ image/test/mochitest/test_bug497665.html | 88 + image/test/mochitest/test_bug552605-1.html | 56 + image/test/mochitest/test_bug552605-2.html | 53 + image/test/mochitest/test_bug553982.html | 39 + image/test/mochitest/test_bug601470.html | 45 + image/test/mochitest/test_bug614392.html | 42 + image/test/mochitest/test_bug657191.html | 34 + image/test/mochitest/test_bug671906.html | 71 + image/test/mochitest/test_bug733553.html | 92 ++ image/test/mochitest/test_bug767779.html | 44 + image/test/mochitest/test_bug865919.html | 53 + image/test/mochitest/test_bug89419-1.html | 68 + image/test/mochitest/test_bug89419-2.html | 70 + image/test/mochitest/test_bullet_animation.html | 59 + .../mochitest/test_canvas_frame_animation.html | 24 + image/test/mochitest/test_changeOfSource.html | 62 + image/test/mochitest/test_changeOfSource2.html | 47 + .../test/mochitest/test_discardAnimatedImage.html | 217 +++ .../test_discardFinishedAnimatedImage.html | 144 ++ .../mochitest/test_discardFramesAnimatedImage.html | 268 ++++ image/test/mochitest/test_drawDiscardedImage.html | 85 + image/test/mochitest/test_error_events.html | 67 + image/test/mochitest/test_has_transparency.html | 169 ++ .../mochitest/test_image_cache_notification.html | 47 + .../mochitest/test_image_crossorigin_data_url.html | 28 + image/test/mochitest/test_mq_dynamic_svg.html | 49 + image/test/mochitest/test_net_failedtoprocess.html | 51 + image/test/mochitest/test_removal_ondecode.html | 160 ++ image/test/mochitest/test_removal_onload.html | 142 ++ image/test/mochitest/test_short_gif_header.html | 35 + image/test/mochitest/test_staticClone.html | 41 + image/test/mochitest/test_svg_animatedGIF.html | 53 + .../test/mochitest/test_svg_filter_animation.html | 42 + .../mochitest/test_synchronized_animation.html | 128 ++ image/test/mochitest/test_undisplayed_iframe.html | 47 + image/test/mochitest/test_webcam.html | 68 + image/test/mochitest/test_xultree_animation.xhtml | 67 + image/test/mochitest/transparent.gif | Bin 0 -> 355 bytes image/test/mochitest/transparent.png | Bin 0 -> 419 bytes image/test/mochitest/webcam-simulacrum.sjs | 51 + image/test/reftest/ImageDocument.css | 16 + image/test/reftest/apng/bug411852-1-ref.html | 6 + image/test/reftest/apng/bug411852-1-ref.png | Bin 0 -> 164 bytes image/test/reftest/apng/bug411852-1.png | Bin 0 -> 606 bytes image/test/reftest/apng/bug546272-ref.html | 6 + image/test/reftest/apng/bug546272-ref.png | Bin 0 -> 712 bytes image/test/reftest/apng/bug546272.png | Bin 0 -> 1391 bytes image/test/reftest/apng/delaytest.html | 58 + image/test/reftest/apng/reftest.list | 6 + image/test/reftest/avif/1-normal.avif | Bin 0 -> 370 bytes .../test/reftest/avif/2-flipped-horizontally.avif | Bin 0 -> 352 bytes image/test/reftest/avif/3-rotated-180deg.avif | Bin 0 -> 367 bytes image/test/reftest/avif/4-flipped-vertically.avif | Bin 0 -> 359 bytes ...5-rotated-90deg-CCW-and-flipped-vertically.avif | Bin 0 -> 368 bytes image/test/reftest/avif/6-rotated-90deg-CCW.avif | Bin 0 -> 354 bytes .../7-rotated-90deg-CW-and-flipped-vertically.avif | Bin 0 -> 361 bytes image/test/reftest/avif/8-rotated-90deg-CW.avif | Bin 0 -> 359 bytes image/test/reftest/avif/img_irot0_imir0.avif | Bin 0 -> 390 bytes image/test/reftest/avif/img_irot0_imir1.avif | Bin 0 -> 390 bytes image/test/reftest/avif/img_irot0_imirN.avif | Bin 0 -> 380 bytes image/test/reftest/avif/img_irot1_imir0.avif | Bin 0 -> 390 bytes image/test/reftest/avif/img_irot1_imir1.avif | Bin 0 -> 390 bytes image/test/reftest/avif/img_irot1_imirN.avif | Bin 0 -> 380 bytes image/test/reftest/avif/img_irot2_imir0.avif | Bin 0 -> 390 bytes image/test/reftest/avif/img_irot2_imir1.avif | Bin 0 -> 390 bytes image/test/reftest/avif/img_irot2_imirN.avif | Bin 0 -> 380 bytes image/test/reftest/avif/img_irot3_imir0.avif | Bin 0 -> 390 bytes image/test/reftest/avif/img_irot3_imir1.avif | Bin 0 -> 390 bytes image/test/reftest/avif/img_irot3_imirN.avif | Bin 0 -> 380 bytes image/test/reftest/avif/img_irotN_imir0.avif | Bin 0 -> 380 bytes image/test/reftest/avif/img_irotN_imir1.avif | Bin 0 -> 380 bytes image/test/reftest/avif/img_irotN_imirN.avif | Bin 0 -> 370 bytes image/test/reftest/avif/reftest.list | 17 + image/test/reftest/bmp/1240629-1.bmp | Bin 0 -> 68 bytes image/test/reftest/bmp/1240629-2.bmp | Bin 0 -> 68 bytes .../reftest/bmp/bmp-1bpp/bmp-not-square-1bpp.bmp | Bin 0 -> 130 bytes .../reftest/bmp/bmp-1bpp/bmp-not-square-1bpp.png | Bin 0 -> 147 bytes .../reftest/bmp/bmp-1bpp/bmp-size-15x15-1bpp.bmp | Bin 0 -> 122 bytes .../reftest/bmp/bmp-1bpp/bmp-size-15x15-1bpp.png | Bin 0 -> 220 bytes .../reftest/bmp/bmp-1bpp/bmp-size-16x16-1bpp.bmp | Bin 0 -> 126 bytes .../reftest/bmp/bmp-1bpp/bmp-size-16x16-1bpp.png | Bin 0 -> 242 bytes .../reftest/bmp/bmp-1bpp/bmp-size-17x17-1bpp.bmp | Bin 0 -> 130 bytes .../reftest/bmp/bmp-1bpp/bmp-size-17x17-1bpp.png | Bin 0 -> 247 bytes .../reftest/bmp/bmp-1bpp/bmp-size-1x1-1bpp.bmp | Bin 0 -> 66 bytes .../reftest/bmp/bmp-1bpp/bmp-size-1x1-1bpp.ico | Bin 0 -> 78 bytes .../reftest/bmp/bmp-1bpp/bmp-size-1x1-1bpp.png | Bin 0 -> 120 bytes .../reftest/bmp/bmp-1bpp/bmp-size-2x2-1bpp.bmp | Bin 0 -> 70 bytes .../reftest/bmp/bmp-1bpp/bmp-size-2x2-1bpp.png | Bin 0 -> 126 bytes .../reftest/bmp/bmp-1bpp/bmp-size-31x31-1bpp.bmp | Bin 0 -> 186 bytes .../reftest/bmp/bmp-1bpp/bmp-size-31x31-1bpp.png | Bin 0 -> 447 bytes .../reftest/bmp/bmp-1bpp/bmp-size-32x32-1bpp.bmp | Bin 0 -> 190 bytes .../reftest/bmp/bmp-1bpp/bmp-size-32x32-1bpp.png | Bin 0 -> 455 bytes .../reftest/bmp/bmp-1bpp/bmp-size-33x33-1bpp.bmp | Bin 0 -> 326 bytes .../reftest/bmp/bmp-1bpp/bmp-size-33x33-1bpp.png | Bin 0 -> 489 bytes .../reftest/bmp/bmp-1bpp/bmp-size-3x3-1bpp.bmp | Bin 0 -> 74 bytes .../reftest/bmp/bmp-1bpp/bmp-size-3x3-1bpp.png | Bin 0 -> 132 bytes .../reftest/bmp/bmp-1bpp/bmp-size-4x4-1bpp.bmp | Bin 0 -> 78 bytes .../reftest/bmp/bmp-1bpp/bmp-size-4x4-1bpp.png | Bin 0 -> 135 bytes .../reftest/bmp/bmp-1bpp/bmp-size-5x5-1bpp.bmp | Bin 0 -> 82 bytes .../reftest/bmp/bmp-1bpp/bmp-size-5x5-1bpp.png | Bin 0 -> 146 bytes .../reftest/bmp/bmp-1bpp/bmp-size-6x6-1bpp.bmp | Bin 0 -> 86 bytes .../reftest/bmp/bmp-1bpp/bmp-size-6x6-1bpp.png | Bin 0 -> 149 bytes .../reftest/bmp/bmp-1bpp/bmp-size-7x7-1bpp.bmp | Bin 0 -> 90 bytes .../reftest/bmp/bmp-1bpp/bmp-size-7x7-1bpp.png | Bin 0 -> 156 bytes .../reftest/bmp/bmp-1bpp/bmp-size-8x8-1bpp.bmp | Bin 0 -> 94 bytes .../reftest/bmp/bmp-1bpp/bmp-size-8x8-1bpp.png | Bin 0 -> 161 bytes .../reftest/bmp/bmp-1bpp/bmp-size-9x9-1bpp.bmp | Bin 0 -> 98 bytes .../reftest/bmp/bmp-1bpp/bmp-size-9x9-1bpp.png | Bin 0 -> 171 bytes .../bmp/bmp-1bpp/os2bmp-size-32x32-1bpp.bmp | Bin 0 -> 160 bytes image/test/reftest/bmp/bmp-1bpp/reftest.list | 21 + .../bmp/bmp-1bpp/top-to-bottom-16x16-1bpp.bmp | Bin 0 -> 126 bytes .../reftest/bmp/bmp-24bpp/bmp-not-square-24bpp.bmp | Bin 0 -> 802 bytes .../reftest/bmp/bmp-24bpp/bmp-not-square-24bpp.png | Bin 0 -> 490 bytes .../reftest/bmp/bmp-24bpp/bmp-size-15x15-24bpp.bmp | Bin 0 -> 774 bytes .../reftest/bmp/bmp-24bpp/bmp-size-15x15-24bpp.png | Bin 0 -> 809 bytes .../reftest/bmp/bmp-24bpp/bmp-size-16x16-24bpp.bmp | Bin 0 -> 822 bytes .../reftest/bmp/bmp-24bpp/bmp-size-16x16-24bpp.png | Bin 0 -> 879 bytes .../reftest/bmp/bmp-24bpp/bmp-size-17x17-24bpp.bmp | Bin 0 -> 938 bytes .../reftest/bmp/bmp-24bpp/bmp-size-17x17-24bpp.png | Bin 0 -> 1000 bytes .../reftest/bmp/bmp-24bpp/bmp-size-1x1-24bpp.bmp | Bin 0 -> 58 bytes .../reftest/bmp/bmp-24bpp/bmp-size-1x1-24bpp.png | Bin 0 -> 70 bytes .../reftest/bmp/bmp-24bpp/bmp-size-2x2-24bpp.bmp | Bin 0 -> 70 bytes .../reftest/bmp/bmp-24bpp/bmp-size-2x2-24bpp.png | Bin 0 -> 83 bytes .../reftest/bmp/bmp-24bpp/bmp-size-31x31-24bpp.bmp | Bin 0 -> 3030 bytes .../reftest/bmp/bmp-24bpp/bmp-size-31x31-24bpp.png | Bin 0 -> 2936 bytes .../reftest/bmp/bmp-24bpp/bmp-size-32x32-24bpp.bmp | Bin 0 -> 3126 bytes .../reftest/bmp/bmp-24bpp/bmp-size-32x32-24bpp.png | Bin 0 -> 3106 bytes .../reftest/bmp/bmp-24bpp/bmp-size-33x33-24bpp.bmp | Bin 0 -> 3354 bytes .../reftest/bmp/bmp-24bpp/bmp-size-33x33-24bpp.png | Bin 0 -> 3303 bytes .../reftest/bmp/bmp-24bpp/bmp-size-3x3-24bpp.bmp | Bin 0 -> 90 bytes .../reftest/bmp/bmp-24bpp/bmp-size-3x3-24bpp.png | Bin 0 -> 107 bytes .../reftest/bmp/bmp-24bpp/bmp-size-4x4-24bpp.bmp | Bin 0 -> 102 bytes .../reftest/bmp/bmp-24bpp/bmp-size-4x4-24bpp.png | Bin 0 -> 136 bytes .../reftest/bmp/bmp-24bpp/bmp-size-5x5-24bpp.bmp | Bin 0 -> 134 bytes .../reftest/bmp/bmp-24bpp/bmp-size-5x5-24bpp.png | Bin 0 -> 173 bytes .../reftest/bmp/bmp-24bpp/bmp-size-6x6-24bpp.bmp | Bin 0 -> 174 bytes .../reftest/bmp/bmp-24bpp/bmp-size-6x6-24bpp.png | Bin 0 -> 218 bytes .../reftest/bmp/bmp-24bpp/bmp-size-7x7-24bpp.bmp | Bin 0 -> 222 bytes .../reftest/bmp/bmp-24bpp/bmp-size-7x7-24bpp.png | Bin 0 -> 271 bytes .../reftest/bmp/bmp-24bpp/bmp-size-8x8-24bpp.bmp | Bin 0 -> 246 bytes .../reftest/bmp/bmp-24bpp/bmp-size-8x8-24bpp.png | Bin 0 -> 313 bytes .../reftest/bmp/bmp-24bpp/bmp-size-9x9-24bpp.bmp | Bin 0 -> 306 bytes .../reftest/bmp/bmp-24bpp/bmp-size-9x9-24bpp.png | Bin 0 -> 368 bytes .../bmp/bmp-24bpp/os2bmp-size-32x32-24bpp.bmp | Bin 0 -> 3098 bytes image/test/reftest/bmp/bmp-24bpp/reftest.list | 21 + .../bmp/bmp-24bpp/top-to-bottom-16x16-24bpp.bmp | Bin 0 -> 822 bytes .../reftest/bmp/bmp-4bpp/bmp-not-square-4bpp.bmp | Bin 0 -> 254 bytes .../reftest/bmp/bmp-4bpp/bmp-not-square-4bpp.png | Bin 0 -> 229 bytes .../reftest/bmp/bmp-4bpp/bmp-size-15x15-4bpp.bmp | Bin 0 -> 238 bytes .../reftest/bmp/bmp-4bpp/bmp-size-15x15-4bpp.png | Bin 0 -> 304 bytes .../reftest/bmp/bmp-4bpp/bmp-size-16x16-4bpp.bmp | Bin 0 -> 246 bytes .../reftest/bmp/bmp-4bpp/bmp-size-16x16-4bpp.png | Bin 0 -> 323 bytes .../reftest/bmp/bmp-4bpp/bmp-size-17x17-4bpp.bmp | Bin 0 -> 322 bytes .../reftest/bmp/bmp-4bpp/bmp-size-17x17-4bpp.png | Bin 0 -> 337 bytes .../reftest/bmp/bmp-4bpp/bmp-size-1x1-4bpp.bmp | Bin 0 -> 122 bytes .../reftest/bmp/bmp-4bpp/bmp-size-1x1-4bpp.png | Bin 0 -> 120 bytes .../reftest/bmp/bmp-4bpp/bmp-size-2x2-4bpp.bmp | Bin 0 -> 126 bytes .../reftest/bmp/bmp-4bpp/bmp-size-2x2-4bpp.png | Bin 0 -> 128 bytes .../reftest/bmp/bmp-4bpp/bmp-size-31x31-4bpp.bmp | Bin 0 -> 614 bytes .../reftest/bmp/bmp-4bpp/bmp-size-31x31-4bpp.png | Bin 0 -> 700 bytes .../reftest/bmp/bmp-4bpp/bmp-size-32x32-4bpp.bmp | Bin 0 -> 630 bytes .../reftest/bmp/bmp-4bpp/bmp-size-32x32-4bpp.png | Bin 0 -> 763 bytes .../reftest/bmp/bmp-4bpp/bmp-size-33x33-4bpp.bmp | Bin 0 -> 778 bytes .../reftest/bmp/bmp-4bpp/bmp-size-33x33-4bpp.png | Bin 0 -> 778 bytes .../reftest/bmp/bmp-4bpp/bmp-size-3x3-4bpp.bmp | Bin 0 -> 130 bytes .../reftest/bmp/bmp-4bpp/bmp-size-3x3-4bpp.png | Bin 0 -> 139 bytes .../reftest/bmp/bmp-4bpp/bmp-size-4x4-4bpp.bmp | Bin 0 -> 134 bytes .../reftest/bmp/bmp-4bpp/bmp-size-4x4-4bpp.png | Bin 0 -> 147 bytes .../reftest/bmp/bmp-4bpp/bmp-size-5x5-4bpp.bmp | Bin 0 -> 138 bytes .../reftest/bmp/bmp-4bpp/bmp-size-5x5-4bpp.png | Bin 0 -> 156 bytes .../reftest/bmp/bmp-4bpp/bmp-size-6x6-4bpp.bmp | Bin 0 -> 142 bytes .../reftest/bmp/bmp-4bpp/bmp-size-6x6-4bpp.png | Bin 0 -> 163 bytes .../reftest/bmp/bmp-4bpp/bmp-size-7x7-4bpp.bmp | Bin 0 -> 146 bytes .../reftest/bmp/bmp-4bpp/bmp-size-7x7-4bpp.png | Bin 0 -> 172 bytes .../reftest/bmp/bmp-4bpp/bmp-size-8x8-4bpp.bmp | Bin 0 -> 150 bytes .../reftest/bmp/bmp-4bpp/bmp-size-8x8-4bpp.png | Bin 0 -> 188 bytes .../reftest/bmp/bmp-4bpp/bmp-size-9x9-4bpp.bmp | Bin 0 -> 190 bytes .../reftest/bmp/bmp-4bpp/bmp-size-9x9-4bpp.png | Bin 0 -> 198 bytes .../bmp/bmp-4bpp/os2bmp-size-32x32-4bpp.bmp | Bin 0 -> 586 bytes image/test/reftest/bmp/bmp-4bpp/reftest.list | 24 + .../reftest/bmp/bmp-4bpp/rle4-delta-320x240.bmp | Bin 0 -> 3686 bytes .../reftest/bmp/bmp-4bpp/rle4-delta-320x240.png | Bin 0 -> 886 bytes .../bmp/bmp-4bpp/top-to-bottom-16x16-4bpp.bmp | Bin 0 -> 246 bytes .../reftest/bmp/bmp-8bpp/bmp-extrapad-8bpp.png | Bin 0 -> 685 bytes .../reftest/bmp/bmp-8bpp/bmp-not-square-8bpp.bmp | Bin 0 -> 1350 bytes .../reftest/bmp/bmp-8bpp/bmp-not-square-8bpp.png | Bin 0 -> 324 bytes .../reftest/bmp/bmp-8bpp/bmp-size-15x15-8bpp.bmp | Bin 0 -> 1318 bytes .../reftest/bmp/bmp-8bpp/bmp-size-15x15-8bpp.png | Bin 0 -> 325 bytes .../reftest/bmp/bmp-8bpp/bmp-size-16x16-8bpp.bmp | Bin 0 -> 1334 bytes .../reftest/bmp/bmp-8bpp/bmp-size-16x16-8bpp.png | Bin 0 -> 338 bytes .../reftest/bmp/bmp-8bpp/bmp-size-17x17-8bpp.bmp | Bin 0 -> 1418 bytes .../reftest/bmp/bmp-8bpp/bmp-size-17x17-8bpp.png | Bin 0 -> 372 bytes .../reftest/bmp/bmp-8bpp/bmp-size-1x1-8bpp.bmp | Bin 0 -> 1082 bytes .../reftest/bmp/bmp-8bpp/bmp-size-1x1-8bpp.png | Bin 0 -> 120 bytes .../reftest/bmp/bmp-8bpp/bmp-size-2x2-8bpp.bmp | Bin 0 -> 1086 bytes .../reftest/bmp/bmp-8bpp/bmp-size-2x2-8bpp.png | Bin 0 -> 131 bytes .../reftest/bmp/bmp-8bpp/bmp-size-31x31-8bpp.bmp | Bin 0 -> 2102 bytes .../reftest/bmp/bmp-8bpp/bmp-size-31x31-8bpp.png | Bin 0 -> 772 bytes .../reftest/bmp/bmp-8bpp/bmp-size-32x32-8bpp.bmp | Bin 0 -> 2102 bytes .../reftest/bmp/bmp-8bpp/bmp-size-32x32-8bpp.png | Bin 0 -> 754 bytes .../reftest/bmp/bmp-8bpp/bmp-size-33x33-8bpp.bmp | Bin 0 -> 2266 bytes .../reftest/bmp/bmp-8bpp/bmp-size-33x33-8bpp.png | Bin 0 -> 833 bytes .../reftest/bmp/bmp-8bpp/bmp-size-3x3-8bpp.bmp | Bin 0 -> 1090 bytes .../reftest/bmp/bmp-8bpp/bmp-size-3x3-8bpp.png | Bin 0 -> 150 bytes .../reftest/bmp/bmp-8bpp/bmp-size-4x4-8bpp.bmp | Bin 0 -> 1094 bytes .../reftest/bmp/bmp-8bpp/bmp-size-4x4-8bpp.png | Bin 0 -> 165 bytes .../reftest/bmp/bmp-8bpp/bmp-size-5x5-8bpp.bmp | Bin 0 -> 1118 bytes .../reftest/bmp/bmp-8bpp/bmp-size-5x5-8bpp.png | Bin 0 -> 169 bytes .../reftest/bmp/bmp-8bpp/bmp-size-6x6-8bpp.bmp | Bin 0 -> 1126 bytes .../reftest/bmp/bmp-8bpp/bmp-size-6x6-8bpp.png | Bin 0 -> 180 bytes .../reftest/bmp/bmp-8bpp/bmp-size-7x7-8bpp.bmp | Bin 0 -> 1134 bytes .../reftest/bmp/bmp-8bpp/bmp-size-7x7-8bpp.png | Bin 0 -> 194 bytes .../reftest/bmp/bmp-8bpp/bmp-size-8x8-8bpp.bmp | Bin 0 -> 1142 bytes .../reftest/bmp/bmp-8bpp/bmp-size-8x8-8bpp.png | Bin 0 -> 217 bytes .../reftest/bmp/bmp-8bpp/bmp-size-9x9-8bpp.bmp | Bin 0 -> 1186 bytes .../reftest/bmp/bmp-8bpp/bmp-size-9x9-8bpp.png | Bin 0 -> 229 bytes .../bmp/bmp-8bpp/os2-bmp-size-32x32-8bpp.bmp | Bin 0 -> 1818 bytes image/test/reftest/bmp/bmp-8bpp/reftest.list | 25 + .../reftest/bmp/bmp-8bpp/rle-bmp-extrapad-8bpp.bmp | Bin 0 -> 1604 bytes .../bmp/bmp-8bpp/rle-bmp-not-square-8bpp.bmp | Bin 0 -> 1384 bytes .../bmp/bmp-8bpp/rle-bmp-size-32x32-8bpp.bmp | Bin 0 -> 1288 bytes .../bmp/bmp-8bpp/top-to-bottom-16x16-8bpp.bmp | Bin 0 -> 1334 bytes .../top-to-bottom-rle-bmp-size-32x32-8bpp.bmp | Bin 0 -> 1284 bytes .../test/reftest/bmp/bmp-corrupted/invalid-bpp.bmp | Bin 0 -> 58 bytes .../invalid-compression-BITFIELDS.bmp | Bin 0 -> 78 bytes .../bmp/bmp-corrupted/invalid-compression-RLE4.bmp | Bin 0 -> 246 bytes .../bmp/bmp-corrupted/invalid-compression-RLE8.bmp | Bin 0 -> 246 bytes .../bmp/bmp-corrupted/invalid-compression.bmp | Bin 0 -> 822 bytes .../bmp/bmp-corrupted/invalid-data-offset.bmp | Bin 0 -> 3126 bytes .../bmp/bmp-corrupted/invalid-signature.bmp | Bin 0 -> 58 bytes .../bmp-corrupted/invalid-truncated-metadata.bmp | Bin 0 -> 54 bytes .../reftest/bmp/bmp-corrupted/os2-invalid-bpp.bmp | Bin 0 -> 30 bytes image/test/reftest/bmp/bmp-corrupted/reftest.list | 21 + image/test/reftest/bmp/bmp-corrupted/wrapper.html | 28 + image/test/reftest/bmp/bmpsuite/COPYING.txt | 675 ++++++++ image/test/reftest/bmp/bmpsuite/README.mozilla | 40 + image/test/reftest/bmp/bmpsuite/b/badbitcount.bmp | Bin 0 -> 1086 bytes image/test/reftest/bmp/bmpsuite/b/badbitssize.bmp | Bin 0 -> 1086 bytes image/test/reftest/bmp/bmpsuite/b/baddens1.bmp | Bin 0 -> 1086 bytes image/test/reftest/bmp/bmpsuite/b/baddens2.bmp | Bin 0 -> 1086 bytes image/test/reftest/bmp/bmpsuite/b/badfilesize.bmp | Bin 0 -> 1086 bytes .../test/reftest/bmp/bmpsuite/b/badheadersize.bmp | Bin 0 -> 1112 bytes .../test/reftest/bmp/bmpsuite/b/badpalettesize.bmp | Bin 0 -> 9254 bytes image/test/reftest/bmp/bmpsuite/b/badplanes.bmp | Bin 0 -> 1086 bytes image/test/reftest/bmp/bmpsuite/b/badrle.bmp | Bin 0 -> 9212 bytes image/test/reftest/bmp/bmpsuite/b/badrle.png | Bin 0 -> 438 bytes image/test/reftest/bmp/bmpsuite/b/badrle4.bmp | Bin 0 -> 4326 bytes image/test/reftest/bmp/bmpsuite/b/badrle4.png | Bin 0 -> 245 bytes image/test/reftest/bmp/bmpsuite/b/badrle4bis.bmp | Bin 0 -> 4326 bytes image/test/reftest/bmp/bmpsuite/b/badrle4bis.png | Bin 0 -> 880 bytes image/test/reftest/bmp/bmpsuite/b/badrle4ter.bmp | Bin 0 -> 4326 bytes image/test/reftest/bmp/bmpsuite/b/badrle4ter.png | Bin 0 -> 883 bytes image/test/reftest/bmp/bmpsuite/b/badrlebis.bmp | Bin 0 -> 9212 bytes image/test/reftest/bmp/bmpsuite/b/badrlebis.png | Bin 0 -> 1626 bytes image/test/reftest/bmp/bmpsuite/b/badrleter.bmp | Bin 0 -> 9212 bytes image/test/reftest/bmp/bmpsuite/b/badrleter.png | Bin 0 -> 1628 bytes image/test/reftest/bmp/bmpsuite/b/badwidth.bmp | Bin 0 -> 1086 bytes image/test/reftest/bmp/bmpsuite/b/pal1.png | Bin 0 -> 586 bytes image/test/reftest/bmp/bmpsuite/b/pal8.png | Bin 0 -> 3772 bytes image/test/reftest/bmp/bmpsuite/b/pal8badindex.bmp | Bin 0 -> 8650 bytes image/test/reftest/bmp/bmpsuite/b/pal8badindex.png | Bin 0 -> 1819 bytes image/test/reftest/bmp/bmpsuite/b/reallybig.bmp | Bin 0 -> 24630 bytes image/test/reftest/bmp/bmpsuite/b/reftest.list | 110 ++ image/test/reftest/bmp/bmpsuite/b/rgb16-880.bmp | Bin 0 -> 16450 bytes image/test/reftest/bmp/bmpsuite/b/rgb16-880.png | Bin 0 -> 1029 bytes image/test/reftest/bmp/bmpsuite/b/rletopdown.bmp | Bin 0 -> 8788 bytes image/test/reftest/bmp/bmpsuite/b/shortfile.bmp | Bin 0 -> 273 bytes image/test/reftest/bmp/bmpsuite/b/shortfile.png | Bin 0 -> 399 bytes image/test/reftest/bmp/bmpsuite/b/wrapper.html | 28 + image/test/reftest/bmp/bmpsuite/g/pal1.bmp | Bin 0 -> 1086 bytes image/test/reftest/bmp/bmpsuite/g/pal1.png | Bin 0 -> 586 bytes image/test/reftest/bmp/bmpsuite/g/pal1bg.bmp | Bin 0 -> 1086 bytes image/test/reftest/bmp/bmpsuite/g/pal1bg.png | Bin 0 -> 604 bytes image/test/reftest/bmp/bmpsuite/g/pal1wb.bmp | Bin 0 -> 1086 bytes image/test/reftest/bmp/bmpsuite/g/pal4.bmp | Bin 0 -> 4198 bytes image/test/reftest/bmp/bmpsuite/g/pal4.png | Bin 0 -> 1428 bytes image/test/reftest/bmp/bmpsuite/g/pal4gs.bmp | Bin 0 -> 4198 bytes image/test/reftest/bmp/bmpsuite/g/pal4gs.png | Bin 0 -> 2016 bytes image/test/reftest/bmp/bmpsuite/g/pal4rle.bmp | Bin 0 -> 3836 bytes image/test/reftest/bmp/bmpsuite/g/pal8-0.bmp | Bin 0 -> 9270 bytes image/test/reftest/bmp/bmpsuite/g/pal8.bmp | Bin 0 -> 9254 bytes image/test/reftest/bmp/bmpsuite/g/pal8.png | Bin 0 -> 3772 bytes image/test/reftest/bmp/bmpsuite/g/pal8gs.bmp | Bin 0 -> 9254 bytes image/test/reftest/bmp/bmpsuite/g/pal8gs.png | Bin 0 -> 9441 bytes .../reftest/bmp/bmpsuite/g/pal8nonsquare-e.png | Bin 0 -> 2513 bytes .../test/reftest/bmp/bmpsuite/g/pal8nonsquare.bmp | Bin 0 -> 5158 bytes .../test/reftest/bmp/bmpsuite/g/pal8nonsquare.png | Bin 0 -> 2714 bytes image/test/reftest/bmp/bmpsuite/g/pal8os2.bmp | Bin 0 -> 8986 bytes image/test/reftest/bmp/bmpsuite/g/pal8rle.bmp | Bin 0 -> 8788 bytes image/test/reftest/bmp/bmpsuite/g/pal8topdown.bmp | Bin 0 -> 9254 bytes image/test/reftest/bmp/bmpsuite/g/pal8v4.bmp | Bin 0 -> 9322 bytes image/test/reftest/bmp/bmpsuite/g/pal8v5.bmp | Bin 0 -> 9338 bytes image/test/reftest/bmp/bmpsuite/g/pal8w124.bmp | Bin 0 -> 8626 bytes image/test/reftest/bmp/bmpsuite/g/pal8w124.png | Bin 0 -> 3585 bytes image/test/reftest/bmp/bmpsuite/g/pal8w125.bmp | Bin 0 -> 8998 bytes image/test/reftest/bmp/bmpsuite/g/pal8w125.png | Bin 0 -> 3628 bytes image/test/reftest/bmp/bmpsuite/g/pal8w126.bmp | Bin 0 -> 9126 bytes image/test/reftest/bmp/bmpsuite/g/pal8w126.png | Bin 0 -> 3714 bytes image/test/reftest/bmp/bmpsuite/g/reftest.list | 129 ++ image/test/reftest/bmp/bmpsuite/g/rgb16-565.bmp | Bin 0 -> 16450 bytes image/test/reftest/bmp/bmpsuite/g/rgb16-565.png | Bin 0 -> 1297 bytes image/test/reftest/bmp/bmpsuite/g/rgb16-565pal.bmp | Bin 0 -> 17474 bytes image/test/reftest/bmp/bmpsuite/g/rgb16.bmp | Bin 0 -> 16438 bytes image/test/reftest/bmp/bmpsuite/g/rgb16.png | Bin 0 -> 1177 bytes image/test/reftest/bmp/bmpsuite/g/rgb16bfdef.bmp | Bin 0 -> 16450 bytes image/test/reftest/bmp/bmpsuite/g/rgb24.bmp | Bin 0 -> 24630 bytes image/test/reftest/bmp/bmpsuite/g/rgb24.png | Bin 0 -> 1072 bytes image/test/reftest/bmp/bmpsuite/g/rgb24pal.bmp | Bin 0 -> 25654 bytes image/test/reftest/bmp/bmpsuite/g/rgb32.bmp | Bin 0 -> 32566 bytes image/test/reftest/bmp/bmpsuite/g/rgb32bf.bmp | Bin 0 -> 32578 bytes image/test/reftest/bmp/bmpsuite/g/rgb32bfdef.bmp | Bin 0 -> 32578 bytes image/test/reftest/bmp/bmpsuite/q/pal1huff.bmp | Bin 0 -> 2151 bytes image/test/reftest/bmp/bmpsuite/q/pal1p1.bmp | Bin 0 -> 1082 bytes image/test/reftest/bmp/bmpsuite/q/pal1p1.png | Bin 0 -> 124 bytes image/test/reftest/bmp/bmpsuite/q/pal2.bmp | Bin 0 -> 2118 bytes image/test/reftest/bmp/bmpsuite/q/pal2color.bmp | Bin 0 -> 2118 bytes image/test/reftest/bmp/bmpsuite/q/pal4rlecut.bmp | Bin 0 -> 3610 bytes image/test/reftest/bmp/bmpsuite/q/pal4rlecut.png | Bin 0 -> 1918 bytes image/test/reftest/bmp/bmpsuite/q/pal4rletrns.bmp | Bin 0 -> 4326 bytes image/test/reftest/bmp/bmpsuite/q/pal4rletrns.png | Bin 0 -> 1465 bytes image/test/reftest/bmp/bmpsuite/q/pal8.png | Bin 0 -> 3772 bytes image/test/reftest/bmp/bmpsuite/q/pal8offs.bmp | Bin 0 -> 9354 bytes image/test/reftest/bmp/bmpsuite/q/pal8os2-hs.bmp | Bin 0 -> 8986 bytes image/test/reftest/bmp/bmpsuite/q/pal8os2-sz.bmp | Bin 0 -> 8986 bytes image/test/reftest/bmp/bmpsuite/q/pal8os2sp.bmp | Bin 0 -> 8974 bytes image/test/reftest/bmp/bmpsuite/q/pal8os2v2-16.bmp | Bin 0 -> 9246 bytes .../test/reftest/bmp/bmpsuite/q/pal8os2v2-40sz.bmp | Bin 0 -> 9254 bytes image/test/reftest/bmp/bmpsuite/q/pal8os2v2-sz.bmp | Bin 0 -> 9278 bytes image/test/reftest/bmp/bmpsuite/q/pal8os2v2.bmp | Bin 0 -> 9278 bytes .../reftest/bmp/bmpsuite/q/pal8oversizepal.bmp | Bin 0 -> 9446 bytes image/test/reftest/bmp/bmpsuite/q/pal8rlecut.bmp | Bin 0 -> 7980 bytes image/test/reftest/bmp/bmpsuite/q/pal8rlecut.png | Bin 0 -> 3524 bytes image/test/reftest/bmp/bmpsuite/q/pal8rletrns.bmp | Bin 0 -> 9212 bytes image/test/reftest/bmp/bmpsuite/q/pal8rletrns.png | Bin 0 -> 3793 bytes image/test/reftest/bmp/bmpsuite/q/reftest.list | 251 +++ image/test/reftest/bmp/bmpsuite/q/rgb16-231.bmp | Bin 0 -> 16450 bytes image/test/reftest/bmp/bmpsuite/q/rgb16-231.png | Bin 0 -> 2643 bytes image/test/reftest/bmp/bmpsuite/q/rgb16-3103.bmp | Bin 0 -> 16450 bytes image/test/reftest/bmp/bmpsuite/q/rgb16-3103.png | Bin 0 -> 3347 bytes image/test/reftest/bmp/bmpsuite/q/rgb16.png | Bin 0 -> 1177 bytes .../test/reftest/bmp/bmpsuite/q/rgb16faketrns.bmp | Bin 0 -> 16438 bytes image/test/reftest/bmp/bmpsuite/q/rgb24.png | Bin 0 -> 1072 bytes image/test/reftest/bmp/bmpsuite/q/rgb24jpeg.bmp | Bin 0 -> 2457 bytes .../test/reftest/bmp/bmpsuite/q/rgb24largepal.bmp | Bin 0 -> 25830 bytes image/test/reftest/bmp/bmpsuite/q/rgb24lprof.bmp | Bin 0 -> 24743 bytes image/test/reftest/bmp/bmpsuite/q/rgb24png.bmp | Bin 0 -> 1210 bytes image/test/reftest/bmp/bmpsuite/q/rgb24prof.bmp | Bin 0 -> 27782 bytes image/test/reftest/bmp/bmpsuite/q/rgb24prof2.bmp | Bin 0 -> 25254 bytes image/test/reftest/bmp/bmpsuite/q/rgb24rle24.bmp | Bin 0 -> 21432 bytes image/test/reftest/bmp/bmpsuite/q/rgb32-111110.bmp | Bin 0 -> 32578 bytes image/test/reftest/bmp/bmpsuite/q/rgb32-7187.bmp | Bin 0 -> 32578 bytes image/test/reftest/bmp/bmpsuite/q/rgb32-7187.png | Bin 0 -> 2136 bytes image/test/reftest/bmp/bmpsuite/q/rgb32-xbgr.bmp | Bin 0 -> 32650 bytes .../test/reftest/bmp/bmpsuite/q/rgb32fakealpha.bmp | Bin 0 -> 32566 bytes image/test/reftest/bmp/bmpsuite/q/rgb32h52.bmp | Bin 0 -> 32578 bytes image/test/reftest/bmp/bmpsuite/q/rgba16-1924.bmp | Bin 0 -> 16522 bytes image/test/reftest/bmp/bmpsuite/q/rgba16-1924.png | Bin 0 -> 2811 bytes image/test/reftest/bmp/bmpsuite/q/rgba16-4444.bmp | Bin 0 -> 16522 bytes image/test/reftest/bmp/bmpsuite/q/rgba16-4444.png | Bin 0 -> 1093 bytes image/test/reftest/bmp/bmpsuite/q/rgba16-5551.bmp | Bin 0 -> 16522 bytes image/test/reftest/bmp/bmpsuite/q/rgba16-5551.png | Bin 0 -> 1226 bytes image/test/reftest/bmp/bmpsuite/q/rgba32-1.bmp | Bin 0 -> 32650 bytes .../test/reftest/bmp/bmpsuite/q/rgba32-1010102.bmp | Bin 0 -> 32650 bytes .../test/reftest/bmp/bmpsuite/q/rgba32-1010102.png | Bin 0 -> 1253 bytes image/test/reftest/bmp/bmpsuite/q/rgba32-2.bmp | Bin 0 -> 32650 bytes image/test/reftest/bmp/bmpsuite/q/rgba32-61754.bmp | Bin 0 -> 32650 bytes image/test/reftest/bmp/bmpsuite/q/rgba32-61754.png | Bin 0 -> 2483 bytes image/test/reftest/bmp/bmpsuite/q/rgba32-81284.bmp | Bin 0 -> 32650 bytes image/test/reftest/bmp/bmpsuite/q/rgba32-81284.png | Bin 0 -> 2182 bytes image/test/reftest/bmp/bmpsuite/q/rgba32.png | Bin 0 -> 1229 bytes image/test/reftest/bmp/bmpsuite/q/rgba32abf.bmp | Bin 0 -> 32582 bytes image/test/reftest/bmp/bmpsuite/q/rgba32h56.bmp | Bin 0 -> 32582 bytes image/test/reftest/bmp/bmpsuite/q/wrapper.html | 28 + image/test/reftest/bmp/bmpsuite/reftest.list | 8 + image/test/reftest/bmp/bmpsuite/x/ba-bm.bmp | Bin 0 -> 9000 bytes image/test/reftest/bmp/bmpsuite/x/reftest.list | 10 + image/test/reftest/bmp/bmpsuite/x/wrapper.html | 28 + image/test/reftest/bmp/reftest.list | 16 + image/test/reftest/color-management/color-curv.png | Bin 0 -> 1753 bytes image/test/reftest/color-management/color-lin.png | Bin 0 -> 1749 bytes .../test/reftest/color-management/color-table.png | Bin 0 -> 1754 bytes .../reftest/color-management/invalid-chrm-ref.png | Bin 0 -> 1460 bytes .../test/reftest/color-management/invalid-chrm.png | Bin 0 -> 1504 bytes .../color-management/invalid-whitepoint.png | Bin 0 -> 1504 bytes image/test/reftest/color-management/reftest.list | 7 + .../reftest/color-management/trc-type-ref.html | 8 + image/test/reftest/color-management/trc-type.html | 53 + image/test/reftest/colordepth.html | 16 + image/test/reftest/downscaling/100x100.gif | Bin 0 -> 956 bytes image/test/reftest/downscaling/100x100.jpg | Bin 0 -> 917 bytes image/test/reftest/downscaling/100x100.png | Bin 0 -> 338 bytes image/test/reftest/downscaling/100x32768.gif | Bin 0 -> 4299 bytes image/test/reftest/downscaling/100x32768.jpg | Bin 0 -> 22041 bytes image/test/reftest/downscaling/100x32768.png | Bin 0 -> 70926 bytes image/test/reftest/downscaling/1404366-1.html | 14 + image/test/reftest/downscaling/1404366-1.ico | Bin 0 -> 4287 bytes image/test/reftest/downscaling/1421191-1.html | 20 + image/test/reftest/downscaling/1421191-1.png | Bin 0 -> 92182 bytes image/test/reftest/downscaling/32768x100.gif | Bin 0 -> 4299 bytes image/test/reftest/downscaling/32768x100.jpg | Bin 0 -> 58065 bytes image/test/reftest/downscaling/32768x100.png | Bin 0 -> 13172 bytes .../reftest/downscaling/black-border-bottom.png | Bin 0 -> 4094 bytes .../test/reftest/downscaling/black-border-left.png | Bin 0 -> 4176 bytes .../test/reftest/downscaling/black-border-rect.svg | 3 + .../reftest/downscaling/black-border-right.png | Bin 0 -> 4097 bytes .../test/reftest/downscaling/black-border-top.png | Bin 0 -> 4144 bytes .../reftest/downscaling/bmp-size-16x16-24bpp.png | Bin 0 -> 879 bytes .../reftest/downscaling/downscale-1-bigimage.png | Bin 0 -> 195 bytes .../test/reftest/downscaling/downscale-1-ref.html | 8 + .../reftest/downscaling/downscale-1-smallimage.png | Bin 0 -> 88 bytes image/test/reftest/downscaling/downscale-1.html | 24 + image/test/reftest/downscaling/downscale-16px.html | 28 + image/test/reftest/downscaling/downscale-2a.html | 31 + image/test/reftest/downscaling/downscale-2b.html | 31 + image/test/reftest/downscaling/downscale-2c.html | 31 + image/test/reftest/downscaling/downscale-2d.html | 31 + image/test/reftest/downscaling/downscale-2e.html | 31 + image/test/reftest/downscaling/downscale-2f.html | 31 + .../reftest/downscaling/downscale-32px-ref.html | 8 + image/test/reftest/downscaling/downscale-32px.html | 31 + image/test/reftest/downscaling/downscale-8px.html | 27 + .../downscaling/downscale-moz-icon-1-ref.html | 41 + .../reftest/downscaling/downscale-moz-icon-1.html | 19 + .../reftest/downscaling/downscale-orient-ref.html | 24 + .../reftest/downscaling/downscale-orient-ref.png | Bin 0 -> 146 bytes .../test/reftest/downscaling/downscale-orient.html | 24 + image/test/reftest/downscaling/downscale-png.html | 31 + .../reftest/downscaling/downscale-svg-1-ref.html | 13 + .../test/reftest/downscaling/downscale-svg-1a.html | 8 + .../test/reftest/downscaling/downscale-svg-1b.html | 8 + .../test/reftest/downscaling/downscale-svg-1c.html | 8 + .../test/reftest/downscaling/downscale-svg-1d.html | 8 + .../test/reftest/downscaling/downscale-svg-1e.html | 8 + .../test/reftest/downscaling/downscale-svg-1f.html | 8 + image/test/reftest/downscaling/ff-0RGB.ico | Bin 0 -> 4286 bytes image/test/reftest/downscaling/ff-0RGB.png | Bin 0 -> 2515 bytes image/test/reftest/downscaling/ff-ARGB.ico | Bin 0 -> 4286 bytes image/test/reftest/downscaling/ff-ARGB.png | Bin 0 -> 115 bytes image/test/reftest/downscaling/huge-1.html | 9 + .../downscaling/image-pre-rotated-90-deg.jpg | Bin 0 -> 6914 bytes .../reftest/downscaling/lime-red-256px-bmp-in.ico | Bin 0 -> 74814 bytes .../reftest/downscaling/lime-red-256px-png-in.ico | Bin 0 -> 881 bytes image/test/reftest/downscaling/lime-red-256px.bmp | Bin 0 -> 196730 bytes image/test/reftest/downscaling/lime-red-256px.gif | Bin 0 -> 873 bytes image/test/reftest/downscaling/lime-red-256px.jpg | Bin 0 -> 2865 bytes image/test/reftest/downscaling/lime-red-256px.png | Bin 0 -> 568 bytes image/test/reftest/downscaling/lime-red-256px.svg | 5 + image/test/reftest/downscaling/lime-red-32px.png | Bin 0 -> 103 bytes image/test/reftest/downscaling/png-interlaced.png | Bin 0 -> 806 bytes image/test/reftest/downscaling/png-normal.png | Bin 0 -> 421 bytes image/test/reftest/downscaling/reftest.list | 217 +++ .../downscaling/top-to-bottom-16x16-24bpp.bmp | Bin 0 -> 822 bytes .../reftest/encoders-lossless/ImageDocument.css | 16 + image/test/reftest/encoders-lossless/encoder.html | 113 ++ image/test/reftest/encoders-lossless/reftest.list | 175 ++ .../test/reftest/encoders-lossless/size-15x15.png | Bin 0 -> 809 bytes .../test/reftest/encoders-lossless/size-16x16.png | Bin 0 -> 879 bytes .../test/reftest/encoders-lossless/size-17x17.png | Bin 0 -> 1000 bytes image/test/reftest/encoders-lossless/size-1x1.png | Bin 0 -> 70 bytes .../reftest/encoders-lossless/size-256x256.png | Bin 0 -> 5480 bytes image/test/reftest/encoders-lossless/size-2x2.png | Bin 0 -> 83 bytes .../test/reftest/encoders-lossless/size-31x31.png | Bin 0 -> 2936 bytes .../test/reftest/encoders-lossless/size-32x32.png | Bin 0 -> 3106 bytes .../test/reftest/encoders-lossless/size-33x33.png | Bin 0 -> 3303 bytes image/test/reftest/encoders-lossless/size-3x3.png | Bin 0 -> 107 bytes image/test/reftest/encoders-lossless/size-4x4.png | Bin 0 -> 136 bytes image/test/reftest/encoders-lossless/size-5x5.png | Bin 0 -> 173 bytes image/test/reftest/encoders-lossless/size-6x6.png | Bin 0 -> 218 bytes image/test/reftest/encoders-lossless/size-7x7.png | Bin 0 -> 271 bytes image/test/reftest/encoders-lossless/size-8x8.png | Bin 0 -> 313 bytes image/test/reftest/encoders-lossless/size-9x9.png | Bin 0 -> 368 bytes image/test/reftest/encoders-lossless/test.png | Bin 0 -> 3106 bytes .../reftest/generic/accept-image-catchall-ref.html | 12 + .../reftest/generic/accept-image-catchall.html | 13 + image/test/reftest/generic/check-header.sjs | 72 + image/test/reftest/generic/green.png | Bin 0 -> 201 bytes image/test/reftest/generic/moz-icon-1.html | 1 + .../generic/moz-icon-blank-1-almostref.html | 2 + .../reftest/generic/moz-icon-blank-1-antiref.html | 2 + .../reftest/generic/moz-icon-blank-1-antiref2.html | 2 + .../test/reftest/generic/moz-icon-blank-1-ref.html | 2 + image/test/reftest/generic/moz-icon-blank-1.html | 2 + image/test/reftest/generic/reftest.list | 6 + image/test/reftest/gif/1bit-255-trans.gif | Bin 0 -> 337 bytes image/test/reftest/gif/1bit-255-trans.png | Bin 0 -> 1214 bytes image/test/reftest/gif/ImageDocument.css | 16 + image/test/reftest/gif/animation1a.gif | Bin 0 -> 167 bytes image/test/reftest/gif/animation2a-finalframe.gif | Bin 0 -> 107 bytes image/test/reftest/gif/animation2a.gif | Bin 0 -> 167 bytes image/test/reftest/gif/blue.gif | Bin 0 -> 43 bytes image/test/reftest/gif/comment.gif | Bin 0 -> 68 bytes image/test/reftest/gif/comment.png | Bin 0 -> 167 bytes image/test/reftest/gif/delaytest.html | 58 + image/test/reftest/gif/in-colormap-trans.gif | Bin 0 -> 355 bytes image/test/reftest/gif/in-colormap-trans.png | Bin 0 -> 237 bytes image/test/reftest/gif/one-color-offset-ref.gif | Bin 0 -> 69 bytes image/test/reftest/gif/one-color-offset.gif | Bin 0 -> 49 bytes .../reftest/gif/one-pixel-no-image-data-ref.html | 11 + .../test/reftest/gif/one-pixel-no-image-data.html | 11 + image/test/reftest/gif/out-of-colormap-trans.gif | Bin 0 -> 355 bytes image/test/reftest/gif/out-of-colormap-trans.png | Bin 0 -> 241 bytes image/test/reftest/gif/red.gif | Bin 0 -> 43 bytes image/test/reftest/gif/reftest.list | 32 + .../reftest/gif/small-background-size-2-ref.gif | Bin 0 -> 807 bytes image/test/reftest/gif/small-background-size-2.gif | Bin 0 -> 572 bytes .../test/reftest/gif/small-background-size-ref.gif | Bin 0 -> 1076 bytes image/test/reftest/gif/small-background-size.gif | Bin 0 -> 991 bytes image/test/reftest/gif/test_bug641198.html | 53 + image/test/reftest/gif/tile-transform-ref.html | 12 + image/test/reftest/gif/tile-transform.html | 12 + image/test/reftest/gif/tiletest-ref.png | Bin 0 -> 282 bytes image/test/reftest/gif/tiletest.gif | Bin 0 -> 156 bytes .../gif/transparent-animation-finalframe.gif | Bin 0 -> 121 bytes .../gif/transparent-animation-finalframe.html | 6 + image/test/reftest/gif/transparent-animation.gif | Bin 0 -> 527 bytes .../gif/truncated-framerect-interlaced-ref.gif | Bin 0 -> 927 bytes .../reftest/gif/truncated-framerect-interlaced.gif | Bin 0 -> 927 bytes image/test/reftest/gif/truncated-framerect-ref.gif | Bin 0 -> 929 bytes .../test/reftest/gif/truncated-framerect-ref.html | 33 + image/test/reftest/gif/truncated-framerect.gif | Bin 0 -> 929 bytes image/test/reftest/gif/truncated-framerect.html | 28 + image/test/reftest/ico/cur/pointer.cur | Bin 0 -> 4286 bytes image/test/reftest/ico/cur/pointer.png | Bin 0 -> 453 bytes image/test/reftest/ico/cur/reftest.list | 4 + image/test/reftest/ico/cur/wrapper.html | 28 + .../ico-not-square-transparent-1bpp.ico | Bin 0 -> 182 bytes .../ico-not-square-transparent-1bpp.png | Bin 0 -> 241 bytes .../ico-bmp-1bpp/ico-partial-transparent-1bpp.ico | Bin 0 -> 326 bytes .../ico-bmp-1bpp/ico-partial-transparent-1bpp.png | Bin 0 -> 410 bytes .../ico/ico-bmp-1bpp/ico-size-15x15-1bpp.ico | Bin 0 -> 190 bytes .../ico/ico-bmp-1bpp/ico-size-15x15-1bpp.png | Bin 0 -> 220 bytes .../ico/ico-bmp-1bpp/ico-size-16x16-1bpp.ico | Bin 0 -> 198 bytes .../ico/ico-bmp-1bpp/ico-size-16x16-1bpp.png | Bin 0 -> 242 bytes .../ico/ico-bmp-1bpp/ico-size-17x17-1bpp.ico | Bin 0 -> 206 bytes .../ico/ico-bmp-1bpp/ico-size-17x17-1bpp.png | Bin 0 -> 247 bytes .../reftest/ico/ico-bmp-1bpp/ico-size-1x1-1bpp.ico | Bin 0 -> 78 bytes .../reftest/ico/ico-bmp-1bpp/ico-size-1x1-1bpp.png | Bin 0 -> 120 bytes .../ico/ico-bmp-1bpp/ico-size-256x256-1bpp.ico | Bin 0 -> 16454 bytes .../ico/ico-bmp-1bpp/ico-size-256x256-1bpp.png | Bin 0 -> 7673 bytes .../reftest/ico/ico-bmp-1bpp/ico-size-2x2-1bpp.ico | Bin 0 -> 86 bytes .../reftest/ico/ico-bmp-1bpp/ico-size-2x2-1bpp.png | Bin 0 -> 126 bytes .../ico/ico-bmp-1bpp/ico-size-31x31-1bpp.ico | Bin 0 -> 318 bytes .../ico/ico-bmp-1bpp/ico-size-31x31-1bpp.png | Bin 0 -> 447 bytes .../ico/ico-bmp-1bpp/ico-size-32x32-1bpp.ico | Bin 0 -> 326 bytes .../ico/ico-bmp-1bpp/ico-size-32x32-1bpp.png | Bin 0 -> 455 bytes .../ico/ico-bmp-1bpp/ico-size-33x33-1bpp.ico | Bin 0 -> 598 bytes .../ico/ico-bmp-1bpp/ico-size-33x33-1bpp.png | Bin 0 -> 489 bytes .../reftest/ico/ico-bmp-1bpp/ico-size-3x3-1bpp.ico | Bin 0 -> 94 bytes .../reftest/ico/ico-bmp-1bpp/ico-size-3x3-1bpp.png | Bin 0 -> 132 bytes .../reftest/ico/ico-bmp-1bpp/ico-size-4x4-1bpp.ico | Bin 0 -> 102 bytes .../reftest/ico/ico-bmp-1bpp/ico-size-4x4-1bpp.png | Bin 0 -> 135 bytes .../reftest/ico/ico-bmp-1bpp/ico-size-5x5-1bpp.ico | Bin 0 -> 110 bytes .../reftest/ico/ico-bmp-1bpp/ico-size-5x5-1bpp.png | Bin 0 -> 146 bytes .../reftest/ico/ico-bmp-1bpp/ico-size-6x6-1bpp.ico | Bin 0 -> 118 bytes .../reftest/ico/ico-bmp-1bpp/ico-size-6x6-1bpp.png | Bin 0 -> 149 bytes .../reftest/ico/ico-bmp-1bpp/ico-size-7x7-1bpp.ico | Bin 0 -> 126 bytes .../reftest/ico/ico-bmp-1bpp/ico-size-7x7-1bpp.png | Bin 0 -> 156 bytes .../reftest/ico/ico-bmp-1bpp/ico-size-8x8-1bpp.ico | Bin 0 -> 134 bytes .../reftest/ico/ico-bmp-1bpp/ico-size-8x8-1bpp.png | Bin 0 -> 161 bytes .../reftest/ico/ico-bmp-1bpp/ico-size-9x9-1bpp.ico | Bin 0 -> 142 bytes .../reftest/ico/ico-bmp-1bpp/ico-size-9x9-1bpp.png | Bin 0 -> 171 bytes .../ico/ico-bmp-1bpp/ico-transparent-1bpp.ico | Bin 0 -> 3262 bytes .../ico/ico-bmp-1bpp/ico-transparent-1bpp.png | Bin 0 -> 195 bytes image/test/reftest/ico/ico-bmp-1bpp/reftest.list | 23 + .../ico-not-square-transparent-24bpp.ico | Bin 0 -> 1126 bytes .../ico-not-square-transparent-24bpp.png | Bin 0 -> 514 bytes .../ico-partial-transparent-24bpp.ico | Bin 0 -> 3262 bytes .../ico-partial-transparent-24bpp.png | Bin 0 -> 1028 bytes .../ico/ico-bmp-24bpp/ico-size-15x15-24bpp.ico | Bin 0 -> 842 bytes .../ico/ico-bmp-24bpp/ico-size-15x15-24bpp.png | Bin 0 -> 809 bytes .../ico/ico-bmp-24bpp/ico-size-16x16-24bpp.ico | Bin 0 -> 894 bytes .../ico/ico-bmp-24bpp/ico-size-16x16-24bpp.png | Bin 0 -> 879 bytes .../ico/ico-bmp-24bpp/ico-size-17x17-24bpp.ico | Bin 0 -> 1014 bytes .../ico/ico-bmp-24bpp/ico-size-17x17-24bpp.png | Bin 0 -> 1000 bytes .../ico/ico-bmp-24bpp/ico-size-1x1-24bpp.ico | Bin 0 -> 70 bytes .../ico/ico-bmp-24bpp/ico-size-1x1-24bpp.png | Bin 0 -> 70 bytes .../ico/ico-bmp-24bpp/ico-size-256x256-24bpp.ico | Bin 0 -> 204862 bytes .../ico/ico-bmp-24bpp/ico-size-256x256-24bpp.png | Bin 0 -> 5480 bytes .../ico/ico-bmp-24bpp/ico-size-2x2-24bpp.ico | Bin 0 -> 86 bytes .../ico/ico-bmp-24bpp/ico-size-2x2-24bpp.png | Bin 0 -> 83 bytes .../ico/ico-bmp-24bpp/ico-size-31x31-24bpp.ico | Bin 0 -> 3162 bytes .../ico/ico-bmp-24bpp/ico-size-31x31-24bpp.png | Bin 0 -> 2936 bytes .../ico/ico-bmp-24bpp/ico-size-32x32-24bpp.ico | Bin 0 -> 3262 bytes .../ico/ico-bmp-24bpp/ico-size-32x32-24bpp.png | Bin 0 -> 3106 bytes .../ico/ico-bmp-24bpp/ico-size-33x33-24bpp.ico | Bin 0 -> 3626 bytes .../ico/ico-bmp-24bpp/ico-size-33x33-24bpp.png | Bin 0 -> 3303 bytes .../ico/ico-bmp-24bpp/ico-size-3x3-24bpp.ico | Bin 0 -> 110 bytes .../ico/ico-bmp-24bpp/ico-size-3x3-24bpp.png | Bin 0 -> 107 bytes .../ico/ico-bmp-24bpp/ico-size-4x4-24bpp.ico | Bin 0 -> 126 bytes .../ico/ico-bmp-24bpp/ico-size-4x4-24bpp.png | Bin 0 -> 136 bytes .../ico/ico-bmp-24bpp/ico-size-5x5-24bpp.ico | Bin 0 -> 162 bytes .../ico/ico-bmp-24bpp/ico-size-5x5-24bpp.png | Bin 0 -> 173 bytes .../ico/ico-bmp-24bpp/ico-size-6x6-24bpp.ico | Bin 0 -> 206 bytes .../ico/ico-bmp-24bpp/ico-size-6x6-24bpp.png | Bin 0 -> 218 bytes .../ico/ico-bmp-24bpp/ico-size-7x7-24bpp.ico | Bin 0 -> 258 bytes .../ico/ico-bmp-24bpp/ico-size-7x7-24bpp.png | Bin 0 -> 271 bytes .../ico/ico-bmp-24bpp/ico-size-8x8-24bpp.ico | Bin 0 -> 286 bytes .../ico/ico-bmp-24bpp/ico-size-8x8-24bpp.png | Bin 0 -> 313 bytes .../ico/ico-bmp-24bpp/ico-size-9x9-24bpp.ico | Bin 0 -> 350 bytes .../ico/ico-bmp-24bpp/ico-size-9x9-24bpp.png | Bin 0 -> 368 bytes .../ico/ico-bmp-24bpp/ico-transparent-24bpp.ico | Bin 0 -> 3262 bytes .../ico/ico-bmp-24bpp/ico-transparent-24bpp.png | Bin 0 -> 195 bytes image/test/reftest/ico/ico-bmp-24bpp/reftest.list | 23 + .../ico-not-square-transparent-32bpp.ico | Bin 0 -> 1462 bytes .../ico-not-square-transparent-32bpp.png | Bin 0 -> 533 bytes .../ico-partial-transparent-32bpp.ico | Bin 0 -> 4286 bytes .../ico-partial-transparent-32bpp.png | Bin 0 -> 1028 bytes .../ico/ico-bmp-32bpp/ico-size-15x15-32bpp.ico | Bin 0 -> 1022 bytes .../ico/ico-bmp-32bpp/ico-size-15x15-32bpp.png | Bin 0 -> 809 bytes .../ico/ico-bmp-32bpp/ico-size-16x16-32bpp.ico | Bin 0 -> 1150 bytes .../ico/ico-bmp-32bpp/ico-size-16x16-32bpp.png | Bin 0 -> 879 bytes .../ico/ico-bmp-32bpp/ico-size-17x17-32bpp.ico | Bin 0 -> 1286 bytes .../ico/ico-bmp-32bpp/ico-size-17x17-32bpp.png | Bin 0 -> 1000 bytes .../ico/ico-bmp-32bpp/ico-size-1x1-32bpp.ico | Bin 0 -> 70 bytes .../ico/ico-bmp-32bpp/ico-size-1x1-32bpp.png | Bin 0 -> 70 bytes .../ico/ico-bmp-32bpp/ico-size-256x256-32bpp.ico | Bin 0 -> 270398 bytes .../ico/ico-bmp-32bpp/ico-size-256x256-32bpp.png | Bin 0 -> 5480 bytes .../ico/ico-bmp-32bpp/ico-size-2x2-32bpp.ico | Bin 0 -> 86 bytes .../ico/ico-bmp-32bpp/ico-size-2x2-32bpp.png | Bin 0 -> 83 bytes .../ico/ico-bmp-32bpp/ico-size-31x31-32bpp.ico | Bin 0 -> 4030 bytes .../ico/ico-bmp-32bpp/ico-size-31x31-32bpp.png | Bin 0 -> 2936 bytes .../ico/ico-bmp-32bpp/ico-size-32x32-32bpp.ico | Bin 0 -> 4286 bytes .../ico/ico-bmp-32bpp/ico-size-32x32-32bpp.png | Bin 0 -> 3106 bytes .../ico/ico-bmp-32bpp/ico-size-33x33-32bpp.ico | Bin 0 -> 4682 bytes .../ico/ico-bmp-32bpp/ico-size-33x33-32bpp.png | Bin 0 -> 3303 bytes .../ico/ico-bmp-32bpp/ico-size-3x3-32bpp.ico | Bin 0 -> 110 bytes .../ico/ico-bmp-32bpp/ico-size-3x3-32bpp.png | Bin 0 -> 107 bytes .../ico/ico-bmp-32bpp/ico-size-4x4-32bpp.ico | Bin 0 -> 142 bytes .../ico/ico-bmp-32bpp/ico-size-4x4-32bpp.png | Bin 0 -> 136 bytes .../ico/ico-bmp-32bpp/ico-size-5x5-32bpp.ico | Bin 0 -> 182 bytes .../ico/ico-bmp-32bpp/ico-size-5x5-32bpp.png | Bin 0 -> 173 bytes .../ico/ico-bmp-32bpp/ico-size-6x6-32bpp.ico | Bin 0 -> 230 bytes .../ico/ico-bmp-32bpp/ico-size-6x6-32bpp.png | Bin 0 -> 218 bytes .../ico/ico-bmp-32bpp/ico-size-7x7-32bpp.ico | Bin 0 -> 286 bytes .../ico/ico-bmp-32bpp/ico-size-7x7-32bpp.png | Bin 0 -> 271 bytes .../ico/ico-bmp-32bpp/ico-size-8x8-32bpp.ico | Bin 0 -> 350 bytes .../ico/ico-bmp-32bpp/ico-size-8x8-32bpp.png | Bin 0 -> 313 bytes .../ico/ico-bmp-32bpp/ico-size-9x9-32bpp.ico | Bin 0 -> 422 bytes .../ico/ico-bmp-32bpp/ico-size-9x9-32bpp.png | Bin 0 -> 368 bytes .../ico/ico-bmp-32bpp/ico-transparent-32bpp.ico | Bin 0 -> 4286 bytes .../ico/ico-bmp-32bpp/ico-transparent-32bpp.png | Bin 0 -> 195 bytes image/test/reftest/ico/ico-bmp-32bpp/reftest.list | 22 + .../ico-not-square-transparent-4bpp.ico | Bin 0 -> 350 bytes .../ico-not-square-transparent-4bpp.png | Bin 0 -> 315 bytes .../ico-bmp-4bpp/ico-partial-transparent-4bpp.ico | Bin 0 -> 766 bytes .../ico-bmp-4bpp/ico-partial-transparent-4bpp.png | Bin 0 -> 556 bytes .../ico/ico-bmp-4bpp/ico-size-15x15-4bpp.ico | Bin 0 -> 306 bytes .../ico/ico-bmp-4bpp/ico-size-15x15-4bpp.png | Bin 0 -> 304 bytes .../ico/ico-bmp-4bpp/ico-size-16x16-4bpp.ico | Bin 0 -> 318 bytes .../ico/ico-bmp-4bpp/ico-size-16x16-4bpp.png | Bin 0 -> 323 bytes .../ico/ico-bmp-4bpp/ico-size-17x17-4bpp.ico | Bin 0 -> 398 bytes .../ico/ico-bmp-4bpp/ico-size-17x17-4bpp.png | Bin 0 -> 337 bytes .../reftest/ico/ico-bmp-4bpp/ico-size-1x1-4bpp.ico | Bin 0 -> 134 bytes .../reftest/ico/ico-bmp-4bpp/ico-size-1x1-4bpp.png | Bin 0 -> 120 bytes .../ico/ico-bmp-4bpp/ico-size-256x256-4bpp.ico | Bin 0 -> 41086 bytes .../ico/ico-bmp-4bpp/ico-size-256x256-4bpp.png | Bin 0 -> 16944 bytes .../reftest/ico/ico-bmp-4bpp/ico-size-2x2-4bpp.ico | Bin 0 -> 142 bytes .../reftest/ico/ico-bmp-4bpp/ico-size-2x2-4bpp.png | Bin 0 -> 128 bytes .../ico/ico-bmp-4bpp/ico-size-31x31-4bpp.ico | Bin 0 -> 746 bytes .../ico/ico-bmp-4bpp/ico-size-31x31-4bpp.png | Bin 0 -> 700 bytes .../ico/ico-bmp-4bpp/ico-size-32x32-4bpp.ico | Bin 0 -> 766 bytes .../ico/ico-bmp-4bpp/ico-size-32x32-4bpp.png | Bin 0 -> 763 bytes .../ico/ico-bmp-4bpp/ico-size-33x33-4bpp.ico | Bin 0 -> 1050 bytes .../ico/ico-bmp-4bpp/ico-size-33x33-4bpp.png | Bin 0 -> 778 bytes .../reftest/ico/ico-bmp-4bpp/ico-size-3x3-4bpp.ico | Bin 0 -> 150 bytes .../reftest/ico/ico-bmp-4bpp/ico-size-3x3-4bpp.png | Bin 0 -> 139 bytes .../reftest/ico/ico-bmp-4bpp/ico-size-4x4-4bpp.ico | Bin 0 -> 158 bytes .../reftest/ico/ico-bmp-4bpp/ico-size-4x4-4bpp.png | Bin 0 -> 147 bytes .../reftest/ico/ico-bmp-4bpp/ico-size-5x5-4bpp.ico | Bin 0 -> 166 bytes .../reftest/ico/ico-bmp-4bpp/ico-size-5x5-4bpp.png | Bin 0 -> 156 bytes .../reftest/ico/ico-bmp-4bpp/ico-size-6x6-4bpp.ico | Bin 0 -> 174 bytes .../reftest/ico/ico-bmp-4bpp/ico-size-6x6-4bpp.png | Bin 0 -> 163 bytes .../reftest/ico/ico-bmp-4bpp/ico-size-7x7-4bpp.ico | Bin 0 -> 182 bytes .../reftest/ico/ico-bmp-4bpp/ico-size-7x7-4bpp.png | Bin 0 -> 172 bytes .../reftest/ico/ico-bmp-4bpp/ico-size-8x8-4bpp.ico | Bin 0 -> 190 bytes .../reftest/ico/ico-bmp-4bpp/ico-size-8x8-4bpp.png | Bin 0 -> 188 bytes .../reftest/ico/ico-bmp-4bpp/ico-size-9x9-4bpp.ico | Bin 0 -> 234 bytes .../reftest/ico/ico-bmp-4bpp/ico-size-9x9-4bpp.png | Bin 0 -> 198 bytes .../ico/ico-bmp-4bpp/ico-transparent-4bpp.ico | Bin 0 -> 3262 bytes .../ico/ico-bmp-4bpp/ico-transparent-4bpp.png | Bin 0 -> 195 bytes image/test/reftest/ico/ico-bmp-4bpp/reftest.list | 23 + .../ico-not-square-transparent-8bpp.ico | Bin 0 -> 1478 bytes .../ico-not-square-transparent-8bpp.png | Bin 0 -> 514 bytes .../ico-bmp-8bpp/ico-partial-transparent-8bpp.ico | Bin 0 -> 2238 bytes .../ico-bmp-8bpp/ico-partial-transparent-8bpp.png | Bin 0 -> 983 bytes .../ico/ico-bmp-8bpp/ico-size-15x15-8bpp.ico | Bin 0 -> 1386 bytes .../ico/ico-bmp-8bpp/ico-size-15x15-8bpp.png | Bin 0 -> 809 bytes .../ico/ico-bmp-8bpp/ico-size-16x16-8bpp.ico | Bin 0 -> 1406 bytes .../ico/ico-bmp-8bpp/ico-size-16x16-8bpp.png | Bin 0 -> 903 bytes .../ico/ico-bmp-8bpp/ico-size-17x17-8bpp.ico | Bin 0 -> 1494 bytes .../ico/ico-bmp-8bpp/ico-size-17x17-8bpp.png | Bin 0 -> 964 bytes .../reftest/ico/ico-bmp-8bpp/ico-size-1x1-8bpp.ico | Bin 0 -> 1094 bytes .../reftest/ico/ico-bmp-8bpp/ico-size-1x1-8bpp.png | Bin 0 -> 70 bytes .../ico/ico-bmp-8bpp/ico-size-256x256-8bpp.ico | Bin 0 -> 74814 bytes .../ico/ico-bmp-8bpp/ico-size-256x256-8bpp.png | Bin 0 -> 22443 bytes .../reftest/ico/ico-bmp-8bpp/ico-size-2x2-8bpp.ico | Bin 0 -> 1102 bytes .../reftest/ico/ico-bmp-8bpp/ico-size-2x2-8bpp.png | Bin 0 -> 83 bytes .../ico/ico-bmp-8bpp/ico-size-31x31-8bpp.ico | Bin 0 -> 2238 bytes .../ico/ico-bmp-8bpp/ico-size-31x31-8bpp.png | Bin 0 -> 1546 bytes .../ico/ico-bmp-8bpp/ico-size-32x32-8bpp.ico | Bin 0 -> 2238 bytes .../ico/ico-bmp-8bpp/ico-size-32x32-8bpp.png | Bin 0 -> 1530 bytes .../ico/ico-bmp-8bpp/ico-size-33x33-8bpp.ico | Bin 0 -> 2538 bytes .../ico/ico-bmp-8bpp/ico-size-33x33-8bpp.png | Bin 0 -> 1632 bytes .../reftest/ico/ico-bmp-8bpp/ico-size-3x3-8bpp.ico | Bin 0 -> 1110 bytes .../reftest/ico/ico-bmp-8bpp/ico-size-3x3-8bpp.png | Bin 0 -> 107 bytes .../reftest/ico/ico-bmp-8bpp/ico-size-4x4-8bpp.ico | Bin 0 -> 1118 bytes .../reftest/ico/ico-bmp-8bpp/ico-size-4x4-8bpp.png | Bin 0 -> 136 bytes .../reftest/ico/ico-bmp-8bpp/ico-size-5x5-8bpp.ico | Bin 0 -> 1146 bytes .../reftest/ico/ico-bmp-8bpp/ico-size-5x5-8bpp.png | Bin 0 -> 173 bytes .../reftest/ico/ico-bmp-8bpp/ico-size-6x6-8bpp.ico | Bin 0 -> 1158 bytes .../reftest/ico/ico-bmp-8bpp/ico-size-6x6-8bpp.png | Bin 0 -> 218 bytes .../reftest/ico/ico-bmp-8bpp/ico-size-7x7-8bpp.ico | Bin 0 -> 1170 bytes .../reftest/ico/ico-bmp-8bpp/ico-size-7x7-8bpp.png | Bin 0 -> 271 bytes .../reftest/ico/ico-bmp-8bpp/ico-size-8x8-8bpp.ico | Bin 0 -> 286 bytes .../reftest/ico/ico-bmp-8bpp/ico-size-8x8-8bpp.png | Bin 0 -> 313 bytes .../reftest/ico/ico-bmp-8bpp/ico-size-9x9-8bpp.ico | Bin 0 -> 1230 bytes .../reftest/ico/ico-bmp-8bpp/ico-size-9x9-8bpp.png | Bin 0 -> 368 bytes .../ico/ico-bmp-8bpp/ico-transparent-8bpp.ico | Bin 0 -> 3262 bytes .../ico/ico-bmp-8bpp/ico-transparent-8bpp.png | Bin 0 -> 195 bytes image/test/reftest/ico/ico-bmp-8bpp/reftest.list | 23 + image/test/reftest/ico/ico-bmp-corrupted/16x16.png | Bin 0 -> 879 bytes .../reftest/ico/ico-bmp-corrupted/invalid-bpp.ico | Bin 0 -> 86 bytes .../ico-bmp-corrupted/invalid-compression-RLE4.ico | Bin 0 -> 86 bytes .../ico-bmp-corrupted/invalid-compression-RLE8.ico | Bin 0 -> 86 bytes .../ico/ico-bmp-corrupted/invalid-compression.ico | Bin 0 -> 830 bytes .../reftest/ico/ico-bmp-corrupted/reftest.list | 10 + .../reftest/ico/ico-bmp-corrupted/wrapper.html | 80 + image/test/reftest/ico/ico-mixed/mixed-bmp-png.ico | Bin 0 -> 17542 bytes image/test/reftest/ico/ico-mixed/mixed-bmp-png.png | Bin 0 -> 629 bytes .../test/reftest/ico/ico-mixed/mixed-bmp-png32.png | Bin 0 -> 940 bytes .../test/reftest/ico/ico-mixed/mixed-bmp-png48.png | Bin 0 -> 1332 bytes image/test/reftest/ico/ico-mixed/reftest.list | 3 + .../reftest/ico/ico-png/corrupted_x00n0g01.ico | Bin 0 -> 71 bytes .../reftest/ico/ico-png/corrupted_xxcrn0g04.ico | Bin 0 -> 283 bytes .../reftest/ico/ico-png/ico-size-15x15-png.ico | Bin 0 -> 831 bytes .../reftest/ico/ico-png/ico-size-15x15-png.png | Bin 0 -> 809 bytes .../reftest/ico/ico-png/ico-size-16x16-png.ico | Bin 0 -> 901 bytes .../reftest/ico/ico-png/ico-size-16x16-png.png | Bin 0 -> 879 bytes .../reftest/ico/ico-png/ico-size-17x17-png.ico | Bin 0 -> 1022 bytes .../reftest/ico/ico-png/ico-size-17x17-png.png | Bin 0 -> 1000 bytes .../test/reftest/ico/ico-png/ico-size-1x1-png.ico | Bin 0 -> 92 bytes .../test/reftest/ico/ico-png/ico-size-1x1-png.png | Bin 0 -> 70 bytes .../reftest/ico/ico-png/ico-size-256x256-png.ico | Bin 0 -> 5934 bytes .../reftest/ico/ico-png/ico-size-256x256-png.png | Bin 0 -> 5912 bytes .../test/reftest/ico/ico-png/ico-size-2x2-png.ico | Bin 0 -> 105 bytes .../test/reftest/ico/ico-png/ico-size-2x2-png.png | Bin 0 -> 83 bytes .../reftest/ico/ico-png/ico-size-31x31-png.ico | Bin 0 -> 2958 bytes .../reftest/ico/ico-png/ico-size-31x31-png.png | Bin 0 -> 2936 bytes .../reftest/ico/ico-png/ico-size-32x32-png.ico | Bin 0 -> 3128 bytes .../reftest/ico/ico-png/ico-size-32x32-png.png | Bin 0 -> 3106 bytes .../reftest/ico/ico-png/ico-size-33x33-png.ico | Bin 0 -> 3325 bytes .../reftest/ico/ico-png/ico-size-33x33-png.png | Bin 0 -> 3303 bytes .../test/reftest/ico/ico-png/ico-size-3x3-png.ico | Bin 0 -> 129 bytes .../test/reftest/ico/ico-png/ico-size-3x3-png.png | Bin 0 -> 107 bytes .../test/reftest/ico/ico-png/ico-size-4x4-png.ico | Bin 0 -> 158 bytes .../test/reftest/ico/ico-png/ico-size-4x4-png.png | Bin 0 -> 136 bytes .../test/reftest/ico/ico-png/ico-size-5x5-png.ico | Bin 0 -> 195 bytes .../test/reftest/ico/ico-png/ico-size-5x5-png.png | Bin 0 -> 173 bytes .../test/reftest/ico/ico-png/ico-size-6x6-png.ico | Bin 0 -> 240 bytes .../test/reftest/ico/ico-png/ico-size-6x6-png.png | Bin 0 -> 218 bytes .../test/reftest/ico/ico-png/ico-size-7x7-png.ico | Bin 0 -> 293 bytes .../test/reftest/ico/ico-png/ico-size-7x7-png.png | Bin 0 -> 271 bytes .../test/reftest/ico/ico-png/ico-size-8x8-png.ico | Bin 0 -> 335 bytes .../test/reftest/ico/ico-png/ico-size-8x8-png.png | Bin 0 -> 313 bytes .../test/reftest/ico/ico-png/ico-size-9x9-png.ico | Bin 0 -> 390 bytes .../test/reftest/ico/ico-png/ico-size-9x9-png.png | Bin 0 -> 368 bytes image/test/reftest/ico/ico-png/reftest.list | 29 + image/test/reftest/ico/ico-png/tmp.ico | Bin 0 -> 1150 bytes image/test/reftest/ico/ico-png/transparent-png.ico | Bin 0 -> 1150 bytes image/test/reftest/ico/ico-png/transparent-png.png | Bin 0 -> 699 bytes image/test/reftest/ico/ico-png/wrapper.html | 28 + image/test/reftest/ico/ico-png/x00n0g01.png | Bin 0 -> 49 bytes image/test/reftest/ico/ico-png/xcrn0g04.png | Bin 0 -> 261 bytes image/test/reftest/ico/reftest.list | 11 + image/test/reftest/img2html.html | 122 ++ image/test/reftest/jpeg/blue.html | 1 + image/test/reftest/jpeg/blue.jpg | Bin 0 -> 3937 bytes image/test/reftest/jpeg/jpg-cmyk-1.jpg | Bin 0 -> 1498 bytes image/test/reftest/jpeg/jpg-cmyk-1.png | Bin 0 -> 2523 bytes image/test/reftest/jpeg/jpg-cmyk-2.jpg | Bin 0 -> 5174 bytes image/test/reftest/jpeg/jpg-cmyk-2.png | Bin 0 -> 21147 bytes image/test/reftest/jpeg/jpg-gray.jpg | Bin 0 -> 396 bytes image/test/reftest/jpeg/jpg-gray.png | Bin 0 -> 498 bytes .../reftest/jpeg/jpg-progressive-1000-ref.html | 1 + image/test/reftest/jpeg/jpg-progressive-1000.html | 1 + image/test/reftest/jpeg/jpg-progressive-1000.jpg | Bin 0 -> 34409 bytes image/test/reftest/jpeg/jpg-progressive.jpg | Bin 0 -> 979 bytes image/test/reftest/jpeg/jpg-progressive.png | Bin 0 -> 3106 bytes image/test/reftest/jpeg/jpg-size-15x15.jpg | Bin 0 -> 465 bytes image/test/reftest/jpeg/jpg-size-15x15.png | Bin 0 -> 809 bytes image/test/reftest/jpeg/jpg-size-16x16.jpg | Bin 0 -> 443 bytes image/test/reftest/jpeg/jpg-size-16x16.png | Bin 0 -> 879 bytes image/test/reftest/jpeg/jpg-size-17x17.jpg | Bin 0 -> 582 bytes image/test/reftest/jpeg/jpg-size-17x17.png | Bin 0 -> 1000 bytes image/test/reftest/jpeg/jpg-size-1x1.jpg | Bin 0 -> 288 bytes image/test/reftest/jpeg/jpg-size-1x1.png | Bin 0 -> 70 bytes image/test/reftest/jpeg/jpg-size-2x2.jpg | Bin 0 -> 353 bytes image/test/reftest/jpeg/jpg-size-2x2.png | Bin 0 -> 83 bytes image/test/reftest/jpeg/jpg-size-31x31.jpg | Bin 0 -> 773 bytes image/test/reftest/jpeg/jpg-size-31x31.png | Bin 0 -> 2936 bytes image/test/reftest/jpeg/jpg-size-32x32.jpg | Bin 0 -> 759 bytes image/test/reftest/jpeg/jpg-size-32x32.png | Bin 0 -> 3106 bytes image/test/reftest/jpeg/jpg-size-33x33.jpg | Bin 0 -> 941 bytes image/test/reftest/jpeg/jpg-size-33x33.png | Bin 0 -> 3303 bytes image/test/reftest/jpeg/jpg-size-3x3.jpg | Bin 0 -> 429 bytes image/test/reftest/jpeg/jpg-size-3x3.png | Bin 0 -> 107 bytes image/test/reftest/jpeg/jpg-size-4x4.jpg | Bin 0 -> 427 bytes image/test/reftest/jpeg/jpg-size-4x4.png | Bin 0 -> 136 bytes image/test/reftest/jpeg/jpg-size-5x5.jpg | Bin 0 -> 421 bytes image/test/reftest/jpeg/jpg-size-5x5.png | Bin 0 -> 173 bytes image/test/reftest/jpeg/jpg-size-6x6.jpg | Bin 0 -> 218 bytes image/test/reftest/jpeg/jpg-size-6x6.png | Bin 0 -> 218 bytes image/test/reftest/jpeg/jpg-size-7x7.jpg | Bin 0 -> 420 bytes image/test/reftest/jpeg/jpg-size-7x7.png | Bin 0 -> 271 bytes image/test/reftest/jpeg/jpg-size-8x8.jpg | Bin 0 -> 412 bytes image/test/reftest/jpeg/jpg-size-8x8.png | Bin 0 -> 313 bytes image/test/reftest/jpeg/jpg-size-9x9.jpg | Bin 0 -> 438 bytes image/test/reftest/jpeg/jpg-size-9x9.png | Bin 0 -> 368 bytes image/test/reftest/jpeg/jpg-srgb-icc.jpg | Bin 0 -> 3226 bytes image/test/reftest/jpeg/jpg-srgb-icc.png | Bin 0 -> 2738 bytes .../non-interleaved_progressive-1-halfred-ref.png | Bin 0 -> 3486 bytes .../reftest/jpeg/non-interleaved_progressive-1.jpg | Bin 0 -> 1777 bytes .../non-interleaved_progressive-2-white-ref.png | Bin 0 -> 2303 bytes .../reftest/jpeg/non-interleaved_progressive-2.jpg | Bin 0 -> 3000 bytes image/test/reftest/jpeg/red-bad-marker.jpg | Bin 0 -> 640 bytes image/test/reftest/jpeg/red.jpg | Bin 0 -> 3938 bytes image/test/reftest/jpeg/reftest.list | 73 + image/test/reftest/jpeg/webcam-simulacrum.html | 1 + image/test/reftest/jpeg/webcam-simulacrum.mjpg | Bin 0 -> 7978 bytes .../reftest/jpeg/webcam-simulacrum.mjpg^headers^ | 3 + image/test/reftest/jxl/jxl-size-33x33.jxl | Bin 0 -> 916 bytes image/test/reftest/jxl/jxl-size-33x33.png | Bin 0 -> 3303 bytes image/test/reftest/jxl/reftest.list | 3 + .../test/reftest/pngsuite-ancillary/ccwn2c08.html | 1242 ++++++++++++++ image/test/reftest/pngsuite-ancillary/ccwn2c08.png | Bin 0 -> 1514 bytes .../test/reftest/pngsuite-ancillary/ccwn3p08.html | 1272 +++++++++++++++ image/test/reftest/pngsuite-ancillary/ccwn3p08.png | Bin 0 -> 1554 bytes .../test/reftest/pngsuite-ancillary/cdfn2c08.html | 326 ++++ image/test/reftest/pngsuite-ancillary/cdfn2c08.png | Bin 0 -> 404 bytes .../test/reftest/pngsuite-ancillary/cdhn2c08.html | 278 ++++ image/test/reftest/pngsuite-ancillary/cdhn2c08.png | Bin 0 -> 344 bytes .../test/reftest/pngsuite-ancillary/cdsn2c08.html | 86 + image/test/reftest/pngsuite-ancillary/cdsn2c08.png | Bin 0 -> 232 bytes .../test/reftest/pngsuite-ancillary/cdun2c08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-ancillary/cdun2c08.png | Bin 0 -> 724 bytes .../test/reftest/pngsuite-ancillary/ch1n3p04.html | 1094 +++++++++++++ image/test/reftest/pngsuite-ancillary/ch1n3p04.png | Bin 0 -> 258 bytes .../test/reftest/pngsuite-ancillary/ch2n3p08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-ancillary/ch2n3p08.png | Bin 0 -> 1810 bytes .../test/reftest/pngsuite-ancillary/cm0n0g04.html | 1094 +++++++++++++ image/test/reftest/pngsuite-ancillary/cm0n0g04.png | Bin 0 -> 292 bytes .../test/reftest/pngsuite-ancillary/cm7n0g04.html | 1094 +++++++++++++ image/test/reftest/pngsuite-ancillary/cm7n0g04.png | Bin 0 -> 292 bytes .../test/reftest/pngsuite-ancillary/cm9n0g04.html | 1094 +++++++++++++ image/test/reftest/pngsuite-ancillary/cm9n0g04.png | Bin 0 -> 292 bytes .../test/reftest/pngsuite-ancillary/cs3n2c16.html | 1094 +++++++++++++ image/test/reftest/pngsuite-ancillary/cs3n2c16.png | Bin 0 -> 214 bytes .../test/reftest/pngsuite-ancillary/cs3n3p08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-ancillary/cs3n3p08.png | Bin 0 -> 259 bytes .../test/reftest/pngsuite-ancillary/cs5n2c08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-ancillary/cs5n2c08.png | Bin 0 -> 186 bytes .../test/reftest/pngsuite-ancillary/cs5n3p08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-ancillary/cs5n3p08.png | Bin 0 -> 271 bytes .../test/reftest/pngsuite-ancillary/cs8n2c08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-ancillary/cs8n2c08.png | Bin 0 -> 149 bytes .../test/reftest/pngsuite-ancillary/cs8n3p08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-ancillary/cs8n3p08.png | Bin 0 -> 256 bytes .../test/reftest/pngsuite-ancillary/ct0n0g04.html | 1094 +++++++++++++ image/test/reftest/pngsuite-ancillary/ct0n0g04.png | Bin 0 -> 273 bytes .../test/reftest/pngsuite-ancillary/ct1n0g04.html | 1094 +++++++++++++ image/test/reftest/pngsuite-ancillary/ct1n0g04.png | Bin 0 -> 792 bytes .../test/reftest/pngsuite-ancillary/ctzn0g04.html | 1094 +++++++++++++ image/test/reftest/pngsuite-ancillary/ctzn0g04.png | Bin 0 -> 753 bytes .../reftest/pngsuite-ancillary/qcms-asm-check.js | 28 + image/test/reftest/pngsuite-ancillary/reftest.list | 62 + .../test/reftest/pngsuite-background/bg__4a08.html | 1092 +++++++++++++ .../test/reftest/pngsuite-background/bg__4a16.html | 1092 +++++++++++++ .../test/reftest/pngsuite-background/bg__6a08.html | 1092 +++++++++++++ .../test/reftest/pngsuite-background/bg__6a16.html | 1092 +++++++++++++ .../test/reftest/pngsuite-background/bgai4a08.png | Bin 0 -> 214 bytes .../test/reftest/pngsuite-background/bgai4a16.png | Bin 0 -> 2855 bytes .../test/reftest/pngsuite-background/bgan6a08.png | Bin 0 -> 184 bytes .../test/reftest/pngsuite-background/bgan6a16.png | Bin 0 -> 3435 bytes .../test/reftest/pngsuite-background/bgbn4a08.png | Bin 0 -> 140 bytes .../test/reftest/pngsuite-background/bggn4a16.png | Bin 0 -> 2220 bytes .../test/reftest/pngsuite-background/bgwn6a08.png | Bin 0 -> 202 bytes .../test/reftest/pngsuite-background/bgyn6a16.png | Bin 0 -> 3453 bytes .../test/reftest/pngsuite-background/reftest.list | 22 + .../test/reftest/pngsuite-background/wrapper.html | 28 + image/test/reftest/pngsuite-basic-i/basi0g01.html | 1094 +++++++++++++ image/test/reftest/pngsuite-basic-i/basi0g01.png | Bin 0 -> 217 bytes image/test/reftest/pngsuite-basic-i/basi0g02.html | 1094 +++++++++++++ image/test/reftest/pngsuite-basic-i/basi0g02.png | Bin 0 -> 154 bytes image/test/reftest/pngsuite-basic-i/basi0g04.html | 1094 +++++++++++++ image/test/reftest/pngsuite-basic-i/basi0g04.png | Bin 0 -> 247 bytes image/test/reftest/pngsuite-basic-i/basi0g08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-basic-i/basi0g08.png | Bin 0 -> 254 bytes image/test/reftest/pngsuite-basic-i/basi0g16.html | 1094 +++++++++++++ image/test/reftest/pngsuite-basic-i/basi0g16.png | Bin 0 -> 299 bytes image/test/reftest/pngsuite-basic-i/basi2c08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-basic-i/basi2c08.png | Bin 0 -> 315 bytes image/test/reftest/pngsuite-basic-i/basi2c16.html | 1094 +++++++++++++ image/test/reftest/pngsuite-basic-i/basi2c16.png | Bin 0 -> 595 bytes image/test/reftest/pngsuite-basic-i/basi3p01.html | 1094 +++++++++++++ image/test/reftest/pngsuite-basic-i/basi3p01.png | Bin 0 -> 132 bytes image/test/reftest/pngsuite-basic-i/basi3p02.html | 1094 +++++++++++++ image/test/reftest/pngsuite-basic-i/basi3p02.png | Bin 0 -> 193 bytes image/test/reftest/pngsuite-basic-i/basi3p04.html | 1094 +++++++++++++ image/test/reftest/pngsuite-basic-i/basi3p04.png | Bin 0 -> 327 bytes image/test/reftest/pngsuite-basic-i/basi3p08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-basic-i/basi3p08.png | Bin 0 -> 1527 bytes image/test/reftest/pngsuite-basic-i/basi4a08.png | Bin 0 -> 214 bytes image/test/reftest/pngsuite-basic-i/basi4a16.png | Bin 0 -> 2855 bytes image/test/reftest/pngsuite-basic-i/basi6a08.png | Bin 0 -> 361 bytes image/test/reftest/pngsuite-basic-i/basi6a16.png | Bin 0 -> 4180 bytes image/test/reftest/pngsuite-basic-i/reftest.list | 33 + image/test/reftest/pngsuite-basic-n/basn0g01.html | 1094 +++++++++++++ image/test/reftest/pngsuite-basic-n/basn0g01.png | Bin 0 -> 164 bytes image/test/reftest/pngsuite-basic-n/basn0g02.html | 1094 +++++++++++++ image/test/reftest/pngsuite-basic-n/basn0g02.png | Bin 0 -> 104 bytes image/test/reftest/pngsuite-basic-n/basn0g04.html | 1094 +++++++++++++ image/test/reftest/pngsuite-basic-n/basn0g04.png | Bin 0 -> 145 bytes image/test/reftest/pngsuite-basic-n/basn0g08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-basic-n/basn0g08.png | Bin 0 -> 138 bytes image/test/reftest/pngsuite-basic-n/basn0g16.html | 1094 +++++++++++++ image/test/reftest/pngsuite-basic-n/basn0g16.png | Bin 0 -> 167 bytes image/test/reftest/pngsuite-basic-n/basn2c08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-basic-n/basn2c08.png | Bin 0 -> 145 bytes image/test/reftest/pngsuite-basic-n/basn2c16.html | 1094 +++++++++++++ image/test/reftest/pngsuite-basic-n/basn2c16.png | Bin 0 -> 302 bytes image/test/reftest/pngsuite-basic-n/basn3p01.html | 1094 +++++++++++++ image/test/reftest/pngsuite-basic-n/basn3p01.png | Bin 0 -> 112 bytes image/test/reftest/pngsuite-basic-n/basn3p02.html | 1094 +++++++++++++ image/test/reftest/pngsuite-basic-n/basn3p02.png | Bin 0 -> 146 bytes image/test/reftest/pngsuite-basic-n/basn3p04.html | 1094 +++++++++++++ image/test/reftest/pngsuite-basic-n/basn3p04.png | Bin 0 -> 216 bytes image/test/reftest/pngsuite-basic-n/basn3p08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-basic-n/basn3p08.png | Bin 0 -> 1286 bytes image/test/reftest/pngsuite-basic-n/basn4a08.png | Bin 0 -> 126 bytes image/test/reftest/pngsuite-basic-n/basn4a16.png | Bin 0 -> 2206 bytes image/test/reftest/pngsuite-basic-n/basn6a08.png | Bin 0 -> 184 bytes image/test/reftest/pngsuite-basic-n/basn6a16.png | Bin 0 -> 3435 bytes image/test/reftest/pngsuite-basic-n/reftest.list | 33 + image/test/reftest/pngsuite-chunkorder/color.html | 1094 +++++++++++++ .../reftest/pngsuite-chunkorder/grayscale.html | 1094 +++++++++++++ .../test/reftest/pngsuite-chunkorder/oi1n0g16.png | Bin 0 -> 167 bytes .../test/reftest/pngsuite-chunkorder/oi1n2c16.png | Bin 0 -> 302 bytes .../test/reftest/pngsuite-chunkorder/oi2n0g16.png | Bin 0 -> 179 bytes .../test/reftest/pngsuite-chunkorder/oi2n2c16.png | Bin 0 -> 314 bytes .../test/reftest/pngsuite-chunkorder/oi4n0g16.png | Bin 0 -> 203 bytes .../test/reftest/pngsuite-chunkorder/oi4n2c16.png | Bin 0 -> 338 bytes .../test/reftest/pngsuite-chunkorder/oi9n0g16.png | Bin 0 -> 1283 bytes .../test/reftest/pngsuite-chunkorder/oi9n2c16.png | Bin 0 -> 3038 bytes .../test/reftest/pngsuite-chunkorder/reftest.list | 21 + image/test/reftest/pngsuite-corrupted/reftest.list | 10 + image/test/reftest/pngsuite-corrupted/wrapper.html | 28 + image/test/reftest/pngsuite-corrupted/x00n0g01.png | Bin 0 -> 49 bytes image/test/reftest/pngsuite-corrupted/xcrn0g04.png | Bin 0 -> 261 bytes image/test/reftest/pngsuite-corrupted/xlfn0g04.png | 13 + .../test/reftest/pngsuite-filtering/f00n0g08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-filtering/f00n0g08.png | Bin 0 -> 319 bytes .../test/reftest/pngsuite-filtering/f00n2c08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-filtering/f00n2c08.png | Bin 0 -> 2475 bytes .../test/reftest/pngsuite-filtering/f01n0g08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-filtering/f01n0g08.png | Bin 0 -> 321 bytes .../test/reftest/pngsuite-filtering/f01n2c08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-filtering/f01n2c08.png | Bin 0 -> 1180 bytes .../test/reftest/pngsuite-filtering/f02n0g08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-filtering/f02n0g08.png | Bin 0 -> 355 bytes .../test/reftest/pngsuite-filtering/f02n2c08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-filtering/f02n2c08.png | Bin 0 -> 1729 bytes .../test/reftest/pngsuite-filtering/f03n0g08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-filtering/f03n0g08.png | Bin 0 -> 389 bytes .../test/reftest/pngsuite-filtering/f03n2c08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-filtering/f03n2c08.png | Bin 0 -> 1291 bytes .../test/reftest/pngsuite-filtering/f04n0g08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-filtering/f04n0g08.png | Bin 0 -> 269 bytes .../test/reftest/pngsuite-filtering/f04n2c08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-filtering/f04n2c08.png | Bin 0 -> 985 bytes image/test/reftest/pngsuite-filtering/reftest.list | 22 + image/test/reftest/pngsuite-gamma/g03n0g16.html | 1094 +++++++++++++ image/test/reftest/pngsuite-gamma/g03n0g16.png | Bin 0 -> 345 bytes image/test/reftest/pngsuite-gamma/g03n2c08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-gamma/g03n2c08.png | Bin 0 -> 370 bytes image/test/reftest/pngsuite-gamma/g03n3p04.html | 1094 +++++++++++++ image/test/reftest/pngsuite-gamma/g03n3p04.png | Bin 0 -> 214 bytes image/test/reftest/pngsuite-gamma/g04n0g16.html | 1094 +++++++++++++ image/test/reftest/pngsuite-gamma/g04n0g16.png | Bin 0 -> 363 bytes image/test/reftest/pngsuite-gamma/g04n2c08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-gamma/g04n2c08.png | Bin 0 -> 377 bytes image/test/reftest/pngsuite-gamma/g04n3p04.html | 1094 +++++++++++++ image/test/reftest/pngsuite-gamma/g04n3p04.png | Bin 0 -> 219 bytes image/test/reftest/pngsuite-gamma/g05n0g16.html | 1094 +++++++++++++ image/test/reftest/pngsuite-gamma/g05n0g16.png | Bin 0 -> 339 bytes image/test/reftest/pngsuite-gamma/g05n2c08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-gamma/g05n2c08.png | Bin 0 -> 350 bytes image/test/reftest/pngsuite-gamma/g05n3p04.html | 1094 +++++++++++++ image/test/reftest/pngsuite-gamma/g05n3p04.png | Bin 0 -> 206 bytes image/test/reftest/pngsuite-gamma/g07n0g16.html | 1094 +++++++++++++ image/test/reftest/pngsuite-gamma/g07n0g16.png | Bin 0 -> 321 bytes image/test/reftest/pngsuite-gamma/g07n2c08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-gamma/g07n2c08.png | Bin 0 -> 340 bytes image/test/reftest/pngsuite-gamma/g07n3p04.html | 1094 +++++++++++++ image/test/reftest/pngsuite-gamma/g07n3p04.png | Bin 0 -> 207 bytes image/test/reftest/pngsuite-gamma/g10n0g16.html | 1094 +++++++++++++ image/test/reftest/pngsuite-gamma/g10n0g16.png | Bin 0 -> 262 bytes image/test/reftest/pngsuite-gamma/g10n2c08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-gamma/g10n2c08.png | Bin 0 -> 285 bytes image/test/reftest/pngsuite-gamma/g10n3p04.html | 1094 +++++++++++++ image/test/reftest/pngsuite-gamma/g10n3p04.png | Bin 0 -> 214 bytes image/test/reftest/pngsuite-gamma/g25n0g16.html | 1094 +++++++++++++ image/test/reftest/pngsuite-gamma/g25n0g16.png | Bin 0 -> 383 bytes image/test/reftest/pngsuite-gamma/g25n2c08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-gamma/g25n2c08.png | Bin 0 -> 405 bytes image/test/reftest/pngsuite-gamma/g25n3p04.html | 1094 +++++++++++++ image/test/reftest/pngsuite-gamma/g25n3p04.png | Bin 0 -> 215 bytes image/test/reftest/pngsuite-gamma/reftest.list | 38 + image/test/reftest/pngsuite-oddsizes/reftest.list | 77 + image/test/reftest/pngsuite-oddsizes/s01_3p01.html | 9 + image/test/reftest/pngsuite-oddsizes/s01i3p01.png | Bin 0 -> 113 bytes image/test/reftest/pngsuite-oddsizes/s01n3p01.png | Bin 0 -> 113 bytes image/test/reftest/pngsuite-oddsizes/s02_3p01.html | 14 + image/test/reftest/pngsuite-oddsizes/s02i3p01.png | Bin 0 -> 114 bytes image/test/reftest/pngsuite-oddsizes/s02n3p01.png | Bin 0 -> 115 bytes image/test/reftest/pngsuite-oddsizes/s03_3p01.html | 21 + image/test/reftest/pngsuite-oddsizes/s03i3p01.png | Bin 0 -> 118 bytes image/test/reftest/pngsuite-oddsizes/s03n3p01.png | Bin 0 -> 120 bytes image/test/reftest/pngsuite-oddsizes/s04_3p01.html | 30 + image/test/reftest/pngsuite-oddsizes/s04i3p01.png | Bin 0 -> 126 bytes image/test/reftest/pngsuite-oddsizes/s04n3p01.png | Bin 0 -> 121 bytes image/test/reftest/pngsuite-oddsizes/s05_3p02.html | 41 + image/test/reftest/pngsuite-oddsizes/s05i3p02.png | Bin 0 -> 134 bytes image/test/reftest/pngsuite-oddsizes/s05n3p02.png | Bin 0 -> 129 bytes image/test/reftest/pngsuite-oddsizes/s06_3p02.html | 54 + image/test/reftest/pngsuite-oddsizes/s06i3p02.png | Bin 0 -> 143 bytes image/test/reftest/pngsuite-oddsizes/s06n3p02.png | Bin 0 -> 131 bytes image/test/reftest/pngsuite-oddsizes/s07_3p02.html | 69 + image/test/reftest/pngsuite-oddsizes/s07i3p02.png | Bin 0 -> 149 bytes image/test/reftest/pngsuite-oddsizes/s07n3p02.png | Bin 0 -> 138 bytes image/test/reftest/pngsuite-oddsizes/s08_3p02.html | 86 + image/test/reftest/pngsuite-oddsizes/s08i3p02.png | Bin 0 -> 149 bytes image/test/reftest/pngsuite-oddsizes/s08n3p02.png | Bin 0 -> 139 bytes image/test/reftest/pngsuite-oddsizes/s09_3p02.html | 105 ++ image/test/reftest/pngsuite-oddsizes/s09i3p02.png | Bin 0 -> 147 bytes image/test/reftest/pngsuite-oddsizes/s09n3p02.png | Bin 0 -> 143 bytes image/test/reftest/pngsuite-oddsizes/s32_3p04.html | 1094 +++++++++++++ image/test/reftest/pngsuite-oddsizes/s32i3p04.png | Bin 0 -> 355 bytes image/test/reftest/pngsuite-oddsizes/s32n3p04.png | Bin 0 -> 263 bytes image/test/reftest/pngsuite-oddsizes/s33_3p04.html | 1161 ++++++++++++++ image/test/reftest/pngsuite-oddsizes/s33i3p04.png | Bin 0 -> 385 bytes image/test/reftest/pngsuite-oddsizes/s33n3p04.png | Bin 0 -> 329 bytes image/test/reftest/pngsuite-oddsizes/s34_3p04.html | 1230 ++++++++++++++ image/test/reftest/pngsuite-oddsizes/s34i3p04.png | Bin 0 -> 349 bytes image/test/reftest/pngsuite-oddsizes/s34n3p04.png | Bin 0 -> 248 bytes image/test/reftest/pngsuite-oddsizes/s35_3p04.html | 1301 +++++++++++++++ image/test/reftest/pngsuite-oddsizes/s35i3p04.png | Bin 0 -> 399 bytes image/test/reftest/pngsuite-oddsizes/s35n3p04.png | Bin 0 -> 338 bytes image/test/reftest/pngsuite-oddsizes/s36_3p04.html | 1374 ++++++++++++++++ image/test/reftest/pngsuite-oddsizes/s36i3p04.png | Bin 0 -> 356 bytes image/test/reftest/pngsuite-oddsizes/s36n3p04.png | Bin 0 -> 258 bytes image/test/reftest/pngsuite-oddsizes/s37_3p04.html | 1449 +++++++++++++++++ image/test/reftest/pngsuite-oddsizes/s37i3p04.png | Bin 0 -> 393 bytes image/test/reftest/pngsuite-oddsizes/s37n3p04.png | Bin 0 -> 336 bytes image/test/reftest/pngsuite-oddsizes/s38_3p04.html | 1526 ++++++++++++++++++ image/test/reftest/pngsuite-oddsizes/s38i3p04.png | Bin 0 -> 357 bytes image/test/reftest/pngsuite-oddsizes/s38n3p04.png | Bin 0 -> 245 bytes image/test/reftest/pngsuite-oddsizes/s39_3p04.html | 1605 +++++++++++++++++++ image/test/reftest/pngsuite-oddsizes/s39i3p04.png | Bin 0 -> 420 bytes image/test/reftest/pngsuite-oddsizes/s39n3p04.png | Bin 0 -> 352 bytes image/test/reftest/pngsuite-oddsizes/s40_3p04.html | 1686 ++++++++++++++++++++ image/test/reftest/pngsuite-oddsizes/s40i3p04.png | Bin 0 -> 357 bytes image/test/reftest/pngsuite-oddsizes/s40n3p04.png | Bin 0 -> 256 bytes image/test/reftest/pngsuite-palettes/pp0n2c16.html | 1094 +++++++++++++ image/test/reftest/pngsuite-palettes/pp0n2c16.png | Bin 0 -> 962 bytes image/test/reftest/pngsuite-palettes/pp0n6a08.png | Bin 0 -> 818 bytes image/test/reftest/pngsuite-palettes/ps1n0g08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-palettes/ps1n0g08.png | Bin 0 -> 1477 bytes image/test/reftest/pngsuite-palettes/ps1n2c16.html | 1094 +++++++++++++ image/test/reftest/pngsuite-palettes/ps1n2c16.png | Bin 0 -> 1641 bytes image/test/reftest/pngsuite-palettes/ps2n0g08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-palettes/ps2n0g08.png | Bin 0 -> 2341 bytes image/test/reftest/pngsuite-palettes/ps2n2c16.html | 1094 +++++++++++++ image/test/reftest/pngsuite-palettes/ps2n2c16.png | Bin 0 -> 2505 bytes image/test/reftest/pngsuite-palettes/reftest.list | 14 + image/test/reftest/pngsuite-zlib/reftest.list | 8 + image/test/reftest/pngsuite-zlib/z00n2c08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-zlib/z00n2c08.png | Bin 0 -> 3172 bytes image/test/reftest/pngsuite-zlib/z03n2c08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-zlib/z03n2c08.png | Bin 0 -> 232 bytes image/test/reftest/pngsuite-zlib/z06n2c08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-zlib/z06n2c08.png | Bin 0 -> 224 bytes image/test/reftest/pngsuite-zlib/z09n2c08.html | 1094 +++++++++++++ image/test/reftest/pngsuite-zlib/z09n2c08.png | Bin 0 -> 224 bytes image/test/reftest/reftest.list | 55 + image/test/reftest/webp/blue.png | Bin 0 -> 100 bytes image/test/reftest/webp/icc-bit-no-icc-chunk.webp | Bin 0 -> 78 bytes image/test/reftest/webp/reftest.list | 1 + image/test/unit/async_load_tests.js | 302 ++++ image/test/unit/bug413512.ico | Bin 0 -> 17759 bytes image/test/unit/bug815359.ico | Bin 0 -> 4286 bytes image/test/unit/image1.png | Bin 0 -> 8415 bytes image/test/unit/image1.webp | Bin 0 -> 3206 bytes image/test/unit/image1png16x16.jpg | Bin 0 -> 1050 bytes image/test/unit/image1png64x64.jpg | Bin 0 -> 4507 bytes image/test/unit/image1quality50.webp | Bin 0 -> 1944 bytes image/test/unit/image2.jpg | Bin 0 -> 3494 bytes image/test/unit/image2jpg16x16-win.png | Bin 0 -> 948 bytes image/test/unit/image2jpg16x16.png | Bin 0 -> 955 bytes image/test/unit/image2jpg16x16cropped.jpg | Bin 0 -> 879 bytes image/test/unit/image2jpg16x16cropped2.jpg | Bin 0 -> 878 bytes image/test/unit/image2jpg16x32cropped3.jpg | Bin 0 -> 1127 bytes image/test/unit/image2jpg16x32scaled.jpg | Bin 0 -> 1219 bytes image/test/unit/image2jpg32x16cropped4.jpg | Bin 0 -> 1135 bytes image/test/unit/image2jpg32x16scaled.jpg | Bin 0 -> 1227 bytes image/test/unit/image2jpg32x32-win.png | Bin 0 -> 3104 bytes image/test/unit/image2jpg32x32.jpg | Bin 0 -> 1634 bytes image/test/unit/image2jpg32x32.png | Bin 0 -> 3026 bytes image/test/unit/image3.ico | Bin 0 -> 1406 bytes image/test/unit/image3ico16x16.png | Bin 0 -> 520 bytes image/test/unit/image3ico32x32.png | Bin 0 -> 2280 bytes image/test/unit/image4.gif | Bin 0 -> 1809 bytes image/test/unit/image4gif16x16bmp24bpp.ico | Bin 0 -> 894 bytes image/test/unit/image4gif16x16bmp32bpp.ico | Bin 0 -> 1150 bytes image/test/unit/image4gif32x32bmp24bpp.ico | Bin 0 -> 3262 bytes image/test/unit/image4gif32x32bmp32bpp.ico | Bin 0 -> 4286 bytes image/test/unit/image_load_helpers.js | 124 ++ image/test/unit/test_async_notification.js | 15 + image/test/unit/test_async_notification_404.js | 19 + .../test/unit/test_async_notification_animated.js | 19 + image/test/unit/test_encoder_apng.js | 582 +++++++ image/test/unit/test_encoder_png.js | 263 +++ image/test/unit/test_imgtools.js | 871 ++++++++++ image/test/unit/test_moz_icon_uri.js | 157 ++ image/test/unit/test_private_channel.js | 170 ++ image/test/unit/xpcshell.toml | 50 + 1488 files changed, 129784 insertions(+) create mode 100644 image/test/browser/animated.gif create mode 100644 image/test/browser/animated2.gif create mode 100644 image/test/browser/big.png create mode 100644 image/test/browser/browser.toml create mode 100644 image/test/browser/browser_bug1869938.js create mode 100644 image/test/browser/browser_bug666317.js create mode 100644 image/test/browser/browser_docshell_type_editor.js create mode 100644 image/test/browser/browser_docshell_type_editor/chrome.manifest create mode 100644 image/test/browser/browser_docshell_type_editor/img/privileged.png create mode 100644 image/test/browser/browser_image.js create mode 100644 image/test/browser/browser_mozicon_file.js create mode 100644 image/test/browser/browser_mozicon_file_sandbox_headless.js create mode 100644 image/test/browser/browser_offscreen_image_in_out_of_process_iframe.js create mode 100644 image/test/browser/browser_sandbox_headless.toml create mode 100644 image/test/browser/empty.html create mode 100644 image/test/browser/head.js create mode 100644 image/test/browser/helper1869938.html create mode 100644 image/test/browser/image.html create mode 100644 image/test/browser/imageX2.html create mode 100644 image/test/crashtests/1205923-1.html create mode 100644 image/test/crashtests/1210745-1.gif create mode 100644 image/test/crashtests/1212954-1.svg create mode 100644 image/test/crashtests/1235605.gif create mode 100644 image/test/crashtests/1241728-1.html create mode 100644 image/test/crashtests/1241729-1.bmp create mode 100644 image/test/crashtests/1241729-1.html create mode 100644 image/test/crashtests/1242093-1.html create mode 100644 image/test/crashtests/1242778-1.png create mode 100644 image/test/crashtests/1249576-1.png create mode 100644 image/test/crashtests/1251091-1.html create mode 100644 image/test/crashtests/1251091-1.png create mode 100644 image/test/crashtests/1253362-1.html create mode 100644 image/test/crashtests/1262549-1.gif create mode 100644 image/test/crashtests/1277397-1.jpg create mode 100644 image/test/crashtests/1277397-2.jpg create mode 100644 image/test/crashtests/1355898-1.html create mode 100644 image/test/crashtests/1375842-1.html create mode 100644 image/test/crashtests/1413762-1.gif create mode 100644 image/test/crashtests/1443232-1.gif create mode 100644 image/test/crashtests/1443232-1.html create mode 100644 image/test/crashtests/1509998.gif create mode 100644 image/test/crashtests/1526717-1.html create mode 100644 image/test/crashtests/1526717-1.png create mode 100644 image/test/crashtests/1629490-1-iframe.html create mode 100644 image/test/crashtests/1629490-1.html create mode 100644 image/test/crashtests/1634839-1-iframe.html create mode 100644 image/test/crashtests/1634839-1.html create mode 100644 image/test/crashtests/1634839-2-iframe.html create mode 100644 image/test/crashtests/1634839-2.html create mode 100644 image/test/crashtests/1676172-1-iframe.html create mode 100644 image/test/crashtests/1676172-1.gif create mode 100644 image/test/crashtests/1676172-1.html create mode 100644 image/test/crashtests/1763581-1-iframe.html create mode 100644 image/test/crashtests/1763581-1.gif create mode 100644 image/test/crashtests/1763581-1.html create mode 100644 image/test/crashtests/1763581-1.sjs create mode 100644 image/test/crashtests/1765871-1.jpg create mode 100644 image/test/crashtests/1814553.avif create mode 100644 image/test/crashtests/1814561.avif create mode 100644 image/test/crashtests/1814677.avif create mode 100644 image/test/crashtests/1814708.avif create mode 100644 image/test/crashtests/1814741.avif create mode 100644 image/test/crashtests/1814774.avif create mode 100644 image/test/crashtests/1817108.avif create mode 100644 image/test/crashtests/1848717-1.avif create mode 100644 image/test/crashtests/1852649.webp create mode 100644 image/test/crashtests/1862059-1.html create mode 100644 image/test/crashtests/1862059-1.svg create mode 100644 image/test/crashtests/1862059-1.svg^headers^ create mode 100644 image/test/crashtests/256-height.ico create mode 100644 image/test/crashtests/256-width.ico create mode 100644 image/test/crashtests/463696.bmp create mode 100644 image/test/crashtests/523528-1.gif create mode 100644 image/test/crashtests/523528-2.gif create mode 100644 image/test/crashtests/570451.png create mode 100644 image/test/crashtests/694165-1.xhtml create mode 100644 image/test/crashtests/732319-1.html create mode 100644 image/test/crashtests/83804-1.gif create mode 100644 image/test/crashtests/844403-1.html create mode 100644 image/test/crashtests/856616.gif create mode 100644 image/test/crashtests/89341-1.gif create mode 100644 image/test/crashtests/944353.jpg create mode 100644 image/test/crashtests/colormap-range.gif create mode 100644 image/test/crashtests/crashtests.list create mode 100644 image/test/crashtests/delayedframe.sjs create mode 100644 image/test/crashtests/delaytest.html create mode 100644 image/test/crashtests/discardframe.htm create mode 100644 image/test/crashtests/finite-apng.png create mode 100644 image/test/crashtests/ie.png create mode 100644 image/test/crashtests/invalid-disposal-method-1.gif create mode 100644 image/test/crashtests/invalid-disposal-method-2.gif create mode 100644 image/test/crashtests/invalid-disposal-method-3.gif create mode 100644 image/test/crashtests/invalid-icc-profile.jpg create mode 100644 image/test/crashtests/invalid-size-second-frame.gif create mode 100644 image/test/crashtests/invalid-size.gif create mode 100644 image/test/crashtests/invalid_ico_height.ico create mode 100644 image/test/crashtests/invalid_ico_width.ico create mode 100644 image/test/crashtests/multiple-png-hassize.ico create mode 100644 image/test/crashtests/out2.gif create mode 100644 image/test/crashtests/ownerdiscard.html create mode 100644 image/test/crashtests/rainbow.gif create mode 100644 image/test/crashtests/threeframes-end.gif create mode 100644 image/test/crashtests/threeframes-start.gif create mode 100644 image/test/crashtests/truncated-second-frame.png create mode 100644 image/test/crashtests/unsized-svg.svg create mode 100644 image/test/fuzzing/TestDecoders.cpp create mode 100644 image/test/fuzzing/moz.build create mode 100644 image/test/gtest/Common.cpp create mode 100644 image/test/gtest/Common.h create mode 100644 image/test/gtest/TestADAM7InterpolatingFilter.cpp create mode 100644 image/test/gtest/TestAnimationFrameBuffer.cpp create mode 100644 image/test/gtest/TestBlendAnimationFilter.cpp create mode 100644 image/test/gtest/TestCopyOnWrite.cpp create mode 100644 image/test/gtest/TestDecodeToSurface.cpp create mode 100644 image/test/gtest/TestDecoders.cpp create mode 100644 image/test/gtest/TestDecodersPerf.cpp create mode 100644 image/test/gtest/TestDeinterlacingFilter.cpp create mode 100644 image/test/gtest/TestDownscalingFilter.cpp create mode 100644 image/test/gtest/TestFrameAnimator.cpp create mode 100644 image/test/gtest/TestLoader.cpp create mode 100644 image/test/gtest/TestMetadata.cpp create mode 100644 image/test/gtest/TestRemoveFrameRectFilter.cpp create mode 100644 image/test/gtest/TestSourceBuffer.cpp create mode 100644 image/test/gtest/TestStreamingLexer.cpp create mode 100644 image/test/gtest/TestSurfaceCache.cpp create mode 100644 image/test/gtest/TestSurfacePipeIntegration.cpp create mode 100644 image/test/gtest/TestSurfaceSink.cpp create mode 100644 image/test/gtest/TestSwizzleFilter.cpp create mode 100644 image/test/gtest/animated-with-extra-image-sub-blocks.gif create mode 100644 image/test/gtest/blend.avif create mode 100644 image/test/gtest/blend.gif create mode 100644 image/test/gtest/blend.png create mode 100644 image/test/gtest/blend.webp create mode 100644 image/test/gtest/bug-1655846.avif create mode 100644 image/test/gtest/corrupt-with-bad-bmp-height.ico create mode 100644 image/test/gtest/corrupt-with-bad-bmp-width.ico create mode 100644 image/test/gtest/corrupt-with-bad-ico-bpp.ico create mode 100644 image/test/gtest/corrupt.jpg create mode 100644 image/test/gtest/downscaled.avif create mode 100644 image/test/gtest/downscaled.bmp create mode 100644 image/test/gtest/downscaled.gif create mode 100644 image/test/gtest/downscaled.ico create mode 100644 image/test/gtest/downscaled.icon create mode 100644 image/test/gtest/downscaled.jpg create mode 100644 image/test/gtest/downscaled.jxl create mode 100644 image/test/gtest/downscaled.png create mode 100644 image/test/gtest/downscaled.webp create mode 100644 image/test/gtest/exif_resolution.jpg create mode 100644 image/test/gtest/first-frame-green.avif create mode 100644 image/test/gtest/first-frame-green.gif create mode 100644 image/test/gtest/first-frame-green.png create mode 100644 image/test/gtest/first-frame-green.webp create mode 100644 image/test/gtest/first-frame-padding.gif create mode 100644 image/test/gtest/gray-235-10bit-full-range-bt2020.avif create mode 100644 image/test/gtest/gray-235-10bit-full-range-bt601.avif create mode 100644 image/test/gtest/gray-235-10bit-full-range-bt709.avif create mode 100644 image/test/gtest/gray-235-10bit-full-range-grayscale.avif create mode 100644 image/test/gtest/gray-235-10bit-limited-range-bt2020.avif create mode 100644 image/test/gtest/gray-235-10bit-limited-range-bt601.avif create mode 100644 image/test/gtest/gray-235-10bit-limited-range-bt709.avif create mode 100644 image/test/gtest/gray-235-10bit-limited-range-grayscale.avif create mode 100644 image/test/gtest/gray-235-12bit-full-range-bt2020.avif create mode 100644 image/test/gtest/gray-235-12bit-full-range-bt601.avif create mode 100644 image/test/gtest/gray-235-12bit-full-range-bt709.avif create mode 100644 image/test/gtest/gray-235-12bit-full-range-grayscale.avif create mode 100644 image/test/gtest/gray-235-12bit-limited-range-bt2020.avif create mode 100644 image/test/gtest/gray-235-12bit-limited-range-bt601.avif create mode 100644 image/test/gtest/gray-235-12bit-limited-range-bt709.avif create mode 100644 image/test/gtest/gray-235-12bit-limited-range-grayscale.avif create mode 100644 image/test/gtest/gray-235-8bit-full-range-bt2020.avif create mode 100644 image/test/gtest/gray-235-8bit-full-range-bt601.avif create mode 100644 image/test/gtest/gray-235-8bit-full-range-bt709.avif create mode 100644 image/test/gtest/gray-235-8bit-full-range-grayscale.avif create mode 100644 image/test/gtest/gray-235-8bit-limited-range-bt2020.avif create mode 100644 image/test/gtest/gray-235-8bit-limited-range-bt601.avif create mode 100644 image/test/gtest/gray-235-8bit-limited-range-bt709.avif create mode 100644 image/test/gtest/gray-235-8bit-limited-range-grayscale.avif create mode 100644 image/test/gtest/green-1x1-truncated.gif create mode 100644 image/test/gtest/green-large-bmp.ico create mode 100644 image/test/gtest/green-large-png.ico create mode 100644 image/test/gtest/green-multiple-sizes.ico create mode 100644 image/test/gtest/green.avif create mode 100644 image/test/gtest/green.bmp create mode 100644 image/test/gtest/green.gif create mode 100644 image/test/gtest/green.icc_srgb.webp create mode 100644 image/test/gtest/green.ico create mode 100644 image/test/gtest/green.icon create mode 100644 image/test/gtest/green.jpg create mode 100644 image/test/gtest/green.jxl create mode 100644 image/test/gtest/green.png create mode 100644 image/test/gtest/green.webp create mode 100644 image/test/gtest/hdlr-nonzero-reserved-bug-1727033.avif create mode 100644 image/test/gtest/invalid-truncated-metadata.bmp create mode 100644 image/test/gtest/large.avif create mode 100644 image/test/gtest/large.jxl create mode 100644 image/test/gtest/large.webp create mode 100644 image/test/gtest/moz.build create mode 100644 image/test/gtest/multilayer.avif create mode 100644 image/test/gtest/no-frame-delay.gif create mode 100644 image/test/gtest/perf_cmyk.jpg create mode 100644 image/test/gtest/perf_gray.jpg create mode 100644 image/test/gtest/perf_gray.png create mode 100644 image/test/gtest/perf_gray_alpha.png create mode 100644 image/test/gtest/perf_srgb.gif create mode 100644 image/test/gtest/perf_srgb.png create mode 100644 image/test/gtest/perf_srgb_alpha.png create mode 100644 image/test/gtest/perf_srgb_alpha_lossless.webp create mode 100644 image/test/gtest/perf_srgb_alpha_lossy.webp create mode 100644 image/test/gtest/perf_srgb_lossless.webp create mode 100644 image/test/gtest/perf_srgb_lossy.webp create mode 100644 image/test/gtest/perf_ycbcr.jpg create mode 100644 image/test/gtest/rle4.bmp create mode 100644 image/test/gtest/rle8.bmp create mode 100644 image/test/gtest/stackcheck.avif create mode 100644 image/test/gtest/transparent-green-50pct-10bit-yuv420.avif create mode 100644 image/test/gtest/transparent-green-50pct-10bit-yuv422.avif create mode 100644 image/test/gtest/transparent-green-50pct-10bit-yuv444.avif create mode 100644 image/test/gtest/transparent-green-50pct-12bit-yuv420.avif create mode 100644 image/test/gtest/transparent-green-50pct-12bit-yuv422.avif create mode 100644 image/test/gtest/transparent-green-50pct-12bit-yuv444.avif create mode 100644 image/test/gtest/transparent-green-50pct-8bit-yuv420.avif create mode 100644 image/test/gtest/transparent-green-50pct-8bit-yuv422.avif create mode 100644 image/test/gtest/transparent-green-50pct-8bit-yuv444.avif create mode 100644 image/test/gtest/transparent-ico-with-and-mask.ico create mode 100644 image/test/gtest/transparent-if-within-ico.bmp create mode 100644 image/test/gtest/transparent-no-alpha-header.webp create mode 100644 image/test/gtest/transparent.avif create mode 100644 image/test/gtest/transparent.gif create mode 100644 image/test/gtest/transparent.jxl create mode 100644 image/test/gtest/transparent.png create mode 100644 image/test/gtest/transparent.webp create mode 100644 image/test/gtest/valid-avif-colr-nclx-and-prof.avif create mode 100644 image/test/mochitest/12M-pixels-1.png create mode 100644 image/test/mochitest/12M-pixels-2.png create mode 100644 image/test/mochitest/6M-pixels.png create mode 100644 image/test/mochitest/INT32_MIN.bmp create mode 100644 image/test/mochitest/animated-avif.avif create mode 100644 image/test/mochitest/animated-gif-finalframe.gif create mode 100644 image/test/mochitest/animated-gif.gif create mode 100644 image/test/mochitest/animated-gif2.gif create mode 100644 image/test/mochitest/animated-gif_trailing-garbage.gif create mode 100644 image/test/mochitest/animated1.gif create mode 100644 image/test/mochitest/animated1.svg create mode 100644 image/test/mochitest/animated2.gif create mode 100644 image/test/mochitest/animatedMask.gif create mode 100644 image/test/mochitest/animation.svg create mode 100644 image/test/mochitest/animationPolling.js create mode 100644 image/test/mochitest/bad.jpg create mode 100644 image/test/mochitest/big.png create mode 100644 image/test/mochitest/blue.gif create mode 100644 image/test/mochitest/blue.png create mode 100644 image/test/mochitest/bug1132427.gif create mode 100644 image/test/mochitest/bug1132427.html create mode 100644 image/test/mochitest/bug1180105-waiter.sjs create mode 100644 image/test/mochitest/bug1180105.sjs create mode 100644 image/test/mochitest/bug1217571-iframe.html create mode 100644 image/test/mochitest/bug1217571.jpg create mode 100644 image/test/mochitest/bug1319025-ref.png create mode 100644 image/test/mochitest/bug1319025.png create mode 100644 image/test/mochitest/bug399925.gif create mode 100644 image/test/mochitest/bug415761.ico create mode 100644 image/test/mochitest/bug468160.sjs create mode 100644 image/test/mochitest/bug478398_ONLY.png create mode 100644 image/test/mochitest/bug490949-iframe.html create mode 100644 image/test/mochitest/bug490949.sjs create mode 100644 image/test/mochitest/bug496292-1.sjs create mode 100644 image/test/mochitest/bug496292-2.sjs create mode 100644 image/test/mochitest/bug496292-iframe-1.html create mode 100644 image/test/mochitest/bug496292-iframe-2.html create mode 100644 image/test/mochitest/bug496292-iframe-ref.html create mode 100644 image/test/mochitest/bug497665-iframe.html create mode 100644 image/test/mochitest/bug497665.sjs create mode 100644 image/test/mochitest/bug552605.sjs create mode 100644 image/test/mochitest/bug657191.sjs create mode 100644 image/test/mochitest/bug671906-iframe.html create mode 100644 image/test/mochitest/bug671906.sjs create mode 100644 image/test/mochitest/bug733553-informant.sjs create mode 100644 image/test/mochitest/bug733553.sjs create mode 100644 image/test/mochitest/bug767779.sjs create mode 100644 image/test/mochitest/bug89419-iframe.html create mode 100644 image/test/mochitest/bug89419.sjs create mode 100644 image/test/mochitest/bug900200-ref.png create mode 100644 image/test/mochitest/bug900200.png create mode 100644 image/test/mochitest/child.html create mode 100644 image/test/mochitest/chrome.toml create mode 100644 image/test/mochitest/clear.avif create mode 100644 image/test/mochitest/clear.gif create mode 100644 image/test/mochitest/clear.png create mode 100644 image/test/mochitest/clear.webp create mode 100644 image/test/mochitest/clear2-results.gif create mode 100644 image/test/mochitest/clear2.gif create mode 100644 image/test/mochitest/clear2.webp create mode 100644 image/test/mochitest/damon.jpg create mode 100644 image/test/mochitest/error-early.png create mode 100644 image/test/mochitest/filter-final.svg create mode 100644 image/test/mochitest/filter.svg create mode 100644 image/test/mochitest/finite-apng.png create mode 100644 image/test/mochitest/first-frame-padding.gif create mode 100644 image/test/mochitest/green-background.html create mode 100644 image/test/mochitest/green.png create mode 100644 image/test/mochitest/grey.png create mode 100644 image/test/mochitest/ico-bmp-opaque.ico create mode 100644 image/test/mochitest/ico-bmp-transparent.ico create mode 100644 image/test/mochitest/iframe.html create mode 100644 image/test/mochitest/imgutils.js create mode 100644 image/test/mochitest/infinite-apng.png create mode 100644 image/test/mochitest/infinite.avif create mode 100644 image/test/mochitest/infinite.webp create mode 100644 image/test/mochitest/invalid.jpg create mode 100644 image/test/mochitest/keep.gif create mode 100644 image/test/mochitest/keep.png create mode 100644 image/test/mochitest/keep.webp create mode 100644 image/test/mochitest/lime-anim-100x100-2.svg create mode 100644 image/test/mochitest/lime-anim-100x100.svg create mode 100644 image/test/mochitest/lime-css-anim-100x100.svg create mode 100644 image/test/mochitest/lime100x100.svg create mode 100644 image/test/mochitest/mochitest.toml create mode 100644 image/test/mochitest/mq_dynamic_svg_ref.html create mode 100644 image/test/mochitest/mq_dynamic_svg_test.html create mode 100644 image/test/mochitest/opaque.bmp create mode 100644 image/test/mochitest/over.png create mode 100644 image/test/mochitest/purple.gif create mode 100644 image/test/mochitest/rainbow.gif create mode 100644 image/test/mochitest/red.gif create mode 100644 image/test/mochitest/red.png create mode 100644 image/test/mochitest/ref-iframe.html create mode 100644 image/test/mochitest/restore-previous.gif create mode 100644 image/test/mochitest/restore-previous.png create mode 100644 image/test/mochitest/rillybad.jpg create mode 100644 image/test/mochitest/schrep.png create mode 100644 image/test/mochitest/shaver.png create mode 100644 image/test/mochitest/short_header.gif create mode 100644 image/test/mochitest/source.png create mode 100644 image/test/mochitest/test_animSVGImage.html create mode 100644 image/test/mochitest/test_animSVGImage2.html create mode 100644 image/test/mochitest/test_animated_css_image.html create mode 100644 image/test/mochitest/test_animated_gif.html create mode 100644 image/test/mochitest/test_animation.html create mode 100644 image/test/mochitest/test_animation2.html create mode 100644 image/test/mochitest/test_animation_operators.html create mode 100644 image/test/mochitest/test_background_image_anim.html create mode 100644 image/test/mochitest/test_bug1132427.html create mode 100644 image/test/mochitest/test_bug1180105.html create mode 100644 image/test/mochitest/test_bug1217571.html create mode 100644 image/test/mochitest/test_bug1325080.html create mode 100644 image/test/mochitest/test_bug399925.html create mode 100644 image/test/mochitest/test_bug415761.html create mode 100644 image/test/mochitest/test_bug435296.html create mode 100644 image/test/mochitest/test_bug466586.html create mode 100644 image/test/mochitest/test_bug468160.html create mode 100644 image/test/mochitest/test_bug478398.html create mode 100644 image/test/mochitest/test_bug490949.html create mode 100644 image/test/mochitest/test_bug496292.html create mode 100644 image/test/mochitest/test_bug497665.html create mode 100644 image/test/mochitest/test_bug552605-1.html create mode 100644 image/test/mochitest/test_bug552605-2.html create mode 100644 image/test/mochitest/test_bug553982.html create mode 100644 image/test/mochitest/test_bug601470.html create mode 100644 image/test/mochitest/test_bug614392.html create mode 100644 image/test/mochitest/test_bug657191.html create mode 100644 image/test/mochitest/test_bug671906.html create mode 100644 image/test/mochitest/test_bug733553.html create mode 100644 image/test/mochitest/test_bug767779.html create mode 100644 image/test/mochitest/test_bug865919.html create mode 100644 image/test/mochitest/test_bug89419-1.html create mode 100644 image/test/mochitest/test_bug89419-2.html create mode 100644 image/test/mochitest/test_bullet_animation.html create mode 100644 image/test/mochitest/test_canvas_frame_animation.html create mode 100644 image/test/mochitest/test_changeOfSource.html create mode 100644 image/test/mochitest/test_changeOfSource2.html create mode 100644 image/test/mochitest/test_discardAnimatedImage.html create mode 100644 image/test/mochitest/test_discardFinishedAnimatedImage.html create mode 100644 image/test/mochitest/test_discardFramesAnimatedImage.html create mode 100644 image/test/mochitest/test_drawDiscardedImage.html create mode 100644 image/test/mochitest/test_error_events.html create mode 100644 image/test/mochitest/test_has_transparency.html create mode 100644 image/test/mochitest/test_image_cache_notification.html create mode 100644 image/test/mochitest/test_image_crossorigin_data_url.html create mode 100644 image/test/mochitest/test_mq_dynamic_svg.html create mode 100644 image/test/mochitest/test_net_failedtoprocess.html create mode 100644 image/test/mochitest/test_removal_ondecode.html create mode 100644 image/test/mochitest/test_removal_onload.html create mode 100644 image/test/mochitest/test_short_gif_header.html create mode 100644 image/test/mochitest/test_staticClone.html create mode 100644 image/test/mochitest/test_svg_animatedGIF.html create mode 100644 image/test/mochitest/test_svg_filter_animation.html create mode 100644 image/test/mochitest/test_synchronized_animation.html create mode 100644 image/test/mochitest/test_undisplayed_iframe.html create mode 100644 image/test/mochitest/test_webcam.html create mode 100644 image/test/mochitest/test_xultree_animation.xhtml create mode 100644 image/test/mochitest/transparent.gif create mode 100644 image/test/mochitest/transparent.png create mode 100644 image/test/mochitest/webcam-simulacrum.sjs create mode 100644 image/test/reftest/ImageDocument.css create mode 100644 image/test/reftest/apng/bug411852-1-ref.html create mode 100644 image/test/reftest/apng/bug411852-1-ref.png create mode 100644 image/test/reftest/apng/bug411852-1.png create mode 100644 image/test/reftest/apng/bug546272-ref.html create mode 100644 image/test/reftest/apng/bug546272-ref.png create mode 100644 image/test/reftest/apng/bug546272.png create mode 100644 image/test/reftest/apng/delaytest.html create mode 100644 image/test/reftest/apng/reftest.list create mode 100644 image/test/reftest/avif/1-normal.avif create mode 100644 image/test/reftest/avif/2-flipped-horizontally.avif create mode 100644 image/test/reftest/avif/3-rotated-180deg.avif create mode 100644 image/test/reftest/avif/4-flipped-vertically.avif create mode 100644 image/test/reftest/avif/5-rotated-90deg-CCW-and-flipped-vertically.avif create mode 100644 image/test/reftest/avif/6-rotated-90deg-CCW.avif create mode 100644 image/test/reftest/avif/7-rotated-90deg-CW-and-flipped-vertically.avif create mode 100644 image/test/reftest/avif/8-rotated-90deg-CW.avif create mode 100644 image/test/reftest/avif/img_irot0_imir0.avif create mode 100644 image/test/reftest/avif/img_irot0_imir1.avif create mode 100644 image/test/reftest/avif/img_irot0_imirN.avif create mode 100644 image/test/reftest/avif/img_irot1_imir0.avif create mode 100644 image/test/reftest/avif/img_irot1_imir1.avif create mode 100644 image/test/reftest/avif/img_irot1_imirN.avif create mode 100644 image/test/reftest/avif/img_irot2_imir0.avif create mode 100644 image/test/reftest/avif/img_irot2_imir1.avif create mode 100644 image/test/reftest/avif/img_irot2_imirN.avif create mode 100644 image/test/reftest/avif/img_irot3_imir0.avif create mode 100644 image/test/reftest/avif/img_irot3_imir1.avif create mode 100644 image/test/reftest/avif/img_irot3_imirN.avif create mode 100644 image/test/reftest/avif/img_irotN_imir0.avif create mode 100644 image/test/reftest/avif/img_irotN_imir1.avif create mode 100644 image/test/reftest/avif/img_irotN_imirN.avif create mode 100644 image/test/reftest/avif/reftest.list create mode 100644 image/test/reftest/bmp/1240629-1.bmp create mode 100644 image/test/reftest/bmp/1240629-2.bmp create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-not-square-1bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-not-square-1bpp.png create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-15x15-1bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-15x15-1bpp.png create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-16x16-1bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-16x16-1bpp.png create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-17x17-1bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-17x17-1bpp.png create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-1x1-1bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-1x1-1bpp.ico create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-1x1-1bpp.png create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-2x2-1bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-2x2-1bpp.png create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-31x31-1bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-31x31-1bpp.png create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-32x32-1bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-32x32-1bpp.png create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-33x33-1bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-33x33-1bpp.png create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-3x3-1bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-3x3-1bpp.png create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-4x4-1bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-4x4-1bpp.png create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-5x5-1bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-5x5-1bpp.png create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-6x6-1bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-6x6-1bpp.png create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-7x7-1bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-7x7-1bpp.png create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-8x8-1bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-8x8-1bpp.png create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-9x9-1bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-1bpp/bmp-size-9x9-1bpp.png create mode 100644 image/test/reftest/bmp/bmp-1bpp/os2bmp-size-32x32-1bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-1bpp/reftest.list create mode 100644 image/test/reftest/bmp/bmp-1bpp/top-to-bottom-16x16-1bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-not-square-24bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-not-square-24bpp.png create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-15x15-24bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-15x15-24bpp.png create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-16x16-24bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-16x16-24bpp.png create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-17x17-24bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-17x17-24bpp.png create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-1x1-24bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-1x1-24bpp.png create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-2x2-24bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-2x2-24bpp.png create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-31x31-24bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-31x31-24bpp.png create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-32x32-24bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-32x32-24bpp.png create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-33x33-24bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-33x33-24bpp.png create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-3x3-24bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-3x3-24bpp.png create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-4x4-24bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-4x4-24bpp.png create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-5x5-24bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-5x5-24bpp.png create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-6x6-24bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-6x6-24bpp.png create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-7x7-24bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-7x7-24bpp.png create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-8x8-24bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-8x8-24bpp.png create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-9x9-24bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-24bpp/bmp-size-9x9-24bpp.png create mode 100644 image/test/reftest/bmp/bmp-24bpp/os2bmp-size-32x32-24bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-24bpp/reftest.list create mode 100644 image/test/reftest/bmp/bmp-24bpp/top-to-bottom-16x16-24bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-not-square-4bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-not-square-4bpp.png create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-15x15-4bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-15x15-4bpp.png create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-16x16-4bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-16x16-4bpp.png create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-17x17-4bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-17x17-4bpp.png create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-1x1-4bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-1x1-4bpp.png create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-2x2-4bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-2x2-4bpp.png create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-31x31-4bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-31x31-4bpp.png create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-32x32-4bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-32x32-4bpp.png create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-33x33-4bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-33x33-4bpp.png create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-3x3-4bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-3x3-4bpp.png create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-4x4-4bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-4x4-4bpp.png create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-5x5-4bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-5x5-4bpp.png create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-6x6-4bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-6x6-4bpp.png create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-7x7-4bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-7x7-4bpp.png create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-8x8-4bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-8x8-4bpp.png create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-9x9-4bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-4bpp/bmp-size-9x9-4bpp.png create mode 100644 image/test/reftest/bmp/bmp-4bpp/os2bmp-size-32x32-4bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-4bpp/reftest.list create mode 100644 image/test/reftest/bmp/bmp-4bpp/rle4-delta-320x240.bmp create mode 100644 image/test/reftest/bmp/bmp-4bpp/rle4-delta-320x240.png create mode 100644 image/test/reftest/bmp/bmp-4bpp/top-to-bottom-16x16-4bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-extrapad-8bpp.png create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-not-square-8bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-not-square-8bpp.png create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-15x15-8bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-15x15-8bpp.png create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-16x16-8bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-16x16-8bpp.png create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-17x17-8bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-17x17-8bpp.png create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-1x1-8bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-1x1-8bpp.png create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-2x2-8bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-2x2-8bpp.png create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-31x31-8bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-31x31-8bpp.png create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-32x32-8bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-32x32-8bpp.png create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-33x33-8bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-33x33-8bpp.png create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-3x3-8bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-3x3-8bpp.png create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-4x4-8bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-4x4-8bpp.png create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-5x5-8bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-5x5-8bpp.png create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-6x6-8bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-6x6-8bpp.png create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-7x7-8bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-7x7-8bpp.png create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-8x8-8bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-8x8-8bpp.png create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-9x9-8bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-8bpp/bmp-size-9x9-8bpp.png create mode 100644 image/test/reftest/bmp/bmp-8bpp/os2-bmp-size-32x32-8bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-8bpp/reftest.list create mode 100644 image/test/reftest/bmp/bmp-8bpp/rle-bmp-extrapad-8bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-8bpp/rle-bmp-not-square-8bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-8bpp/rle-bmp-size-32x32-8bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-8bpp/top-to-bottom-16x16-8bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-8bpp/top-to-bottom-rle-bmp-size-32x32-8bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-corrupted/invalid-bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-corrupted/invalid-compression-BITFIELDS.bmp create mode 100644 image/test/reftest/bmp/bmp-corrupted/invalid-compression-RLE4.bmp create mode 100644 image/test/reftest/bmp/bmp-corrupted/invalid-compression-RLE8.bmp create mode 100644 image/test/reftest/bmp/bmp-corrupted/invalid-compression.bmp create mode 100644 image/test/reftest/bmp/bmp-corrupted/invalid-data-offset.bmp create mode 100644 image/test/reftest/bmp/bmp-corrupted/invalid-signature.bmp create mode 100644 image/test/reftest/bmp/bmp-corrupted/invalid-truncated-metadata.bmp create mode 100644 image/test/reftest/bmp/bmp-corrupted/os2-invalid-bpp.bmp create mode 100644 image/test/reftest/bmp/bmp-corrupted/reftest.list create mode 100644 image/test/reftest/bmp/bmp-corrupted/wrapper.html create mode 100644 image/test/reftest/bmp/bmpsuite/COPYING.txt create mode 100644 image/test/reftest/bmp/bmpsuite/README.mozilla create mode 100644 image/test/reftest/bmp/bmpsuite/b/badbitcount.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/b/badbitssize.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/b/baddens1.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/b/baddens2.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/b/badfilesize.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/b/badheadersize.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/b/badpalettesize.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/b/badplanes.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/b/badrle.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/b/badrle.png create mode 100644 image/test/reftest/bmp/bmpsuite/b/badrle4.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/b/badrle4.png create mode 100644 image/test/reftest/bmp/bmpsuite/b/badrle4bis.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/b/badrle4bis.png create mode 100644 image/test/reftest/bmp/bmpsuite/b/badrle4ter.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/b/badrle4ter.png create mode 100644 image/test/reftest/bmp/bmpsuite/b/badrlebis.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/b/badrlebis.png create mode 100644 image/test/reftest/bmp/bmpsuite/b/badrleter.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/b/badrleter.png create mode 100644 image/test/reftest/bmp/bmpsuite/b/badwidth.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/b/pal1.png create mode 100644 image/test/reftest/bmp/bmpsuite/b/pal8.png create mode 100644 image/test/reftest/bmp/bmpsuite/b/pal8badindex.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/b/pal8badindex.png create mode 100644 image/test/reftest/bmp/bmpsuite/b/reallybig.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/b/reftest.list create mode 100644 image/test/reftest/bmp/bmpsuite/b/rgb16-880.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/b/rgb16-880.png create mode 100644 image/test/reftest/bmp/bmpsuite/b/rletopdown.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/b/shortfile.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/b/shortfile.png create mode 100644 image/test/reftest/bmp/bmpsuite/b/wrapper.html create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal1.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal1.png create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal1bg.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal1bg.png create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal1wb.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal4.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal4.png create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal4gs.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal4gs.png create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal4rle.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal8-0.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal8.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal8.png create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal8gs.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal8gs.png create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal8nonsquare-e.png create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal8nonsquare.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal8nonsquare.png create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal8os2.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal8rle.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal8topdown.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal8v4.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal8v5.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal8w124.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal8w124.png create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal8w125.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal8w125.png create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal8w126.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/pal8w126.png create mode 100644 image/test/reftest/bmp/bmpsuite/g/reftest.list create mode 100644 image/test/reftest/bmp/bmpsuite/g/rgb16-565.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/rgb16-565.png create mode 100644 image/test/reftest/bmp/bmpsuite/g/rgb16-565pal.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/rgb16.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/rgb16.png create mode 100644 image/test/reftest/bmp/bmpsuite/g/rgb16bfdef.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/rgb24.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/rgb24.png create mode 100644 image/test/reftest/bmp/bmpsuite/g/rgb24pal.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/rgb32.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/rgb32bf.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/g/rgb32bfdef.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/pal1huff.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/pal1p1.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/pal1p1.png create mode 100644 image/test/reftest/bmp/bmpsuite/q/pal2.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/pal2color.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/pal4rlecut.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/pal4rlecut.png create mode 100644 image/test/reftest/bmp/bmpsuite/q/pal4rletrns.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/pal4rletrns.png create mode 100644 image/test/reftest/bmp/bmpsuite/q/pal8.png create mode 100644 image/test/reftest/bmp/bmpsuite/q/pal8offs.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/pal8os2-hs.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/pal8os2-sz.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/pal8os2sp.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/pal8os2v2-16.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/pal8os2v2-40sz.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/pal8os2v2-sz.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/pal8os2v2.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/pal8oversizepal.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/pal8rlecut.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/pal8rlecut.png create mode 100644 image/test/reftest/bmp/bmpsuite/q/pal8rletrns.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/pal8rletrns.png create mode 100644 image/test/reftest/bmp/bmpsuite/q/reftest.list create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgb16-231.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgb16-231.png create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgb16-3103.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgb16-3103.png create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgb16.png create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgb16faketrns.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgb24.png create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgb24jpeg.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgb24largepal.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgb24lprof.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgb24png.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgb24prof.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgb24prof2.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgb24rle24.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgb32-111110.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgb32-7187.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgb32-7187.png create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgb32-xbgr.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgb32fakealpha.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgb32h52.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgba16-1924.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgba16-1924.png create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgba16-4444.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgba16-4444.png create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgba16-5551.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgba16-5551.png create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgba32-1.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgba32-1010102.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgba32-1010102.png create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgba32-2.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgba32-61754.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgba32-61754.png create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgba32-81284.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgba32-81284.png create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgba32.png create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgba32abf.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/rgba32h56.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/q/wrapper.html create mode 100644 image/test/reftest/bmp/bmpsuite/reftest.list create mode 100644 image/test/reftest/bmp/bmpsuite/x/ba-bm.bmp create mode 100644 image/test/reftest/bmp/bmpsuite/x/reftest.list create mode 100644 image/test/reftest/bmp/bmpsuite/x/wrapper.html create mode 100644 image/test/reftest/bmp/reftest.list create mode 100644 image/test/reftest/color-management/color-curv.png create mode 100644 image/test/reftest/color-management/color-lin.png create mode 100644 image/test/reftest/color-management/color-table.png create mode 100644 image/test/reftest/color-management/invalid-chrm-ref.png create mode 100644 image/test/reftest/color-management/invalid-chrm.png create mode 100644 image/test/reftest/color-management/invalid-whitepoint.png create mode 100644 image/test/reftest/color-management/reftest.list create mode 100644 image/test/reftest/color-management/trc-type-ref.html create mode 100644 image/test/reftest/color-management/trc-type.html create mode 100644 image/test/reftest/colordepth.html create mode 100644 image/test/reftest/downscaling/100x100.gif create mode 100644 image/test/reftest/downscaling/100x100.jpg create mode 100644 image/test/reftest/downscaling/100x100.png create mode 100644 image/test/reftest/downscaling/100x32768.gif create mode 100644 image/test/reftest/downscaling/100x32768.jpg create mode 100644 image/test/reftest/downscaling/100x32768.png create mode 100644 image/test/reftest/downscaling/1404366-1.html create mode 100644 image/test/reftest/downscaling/1404366-1.ico create mode 100644 image/test/reftest/downscaling/1421191-1.html create mode 100644 image/test/reftest/downscaling/1421191-1.png create mode 100644 image/test/reftest/downscaling/32768x100.gif create mode 100644 image/test/reftest/downscaling/32768x100.jpg create mode 100644 image/test/reftest/downscaling/32768x100.png create mode 100644 image/test/reftest/downscaling/black-border-bottom.png create mode 100644 image/test/reftest/downscaling/black-border-left.png create mode 100644 image/test/reftest/downscaling/black-border-rect.svg create mode 100644 image/test/reftest/downscaling/black-border-right.png create mode 100644 image/test/reftest/downscaling/black-border-top.png create mode 100644 image/test/reftest/downscaling/bmp-size-16x16-24bpp.png create mode 100644 image/test/reftest/downscaling/downscale-1-bigimage.png create mode 100644 image/test/reftest/downscaling/downscale-1-ref.html create mode 100644 image/test/reftest/downscaling/downscale-1-smallimage.png create mode 100644 image/test/reftest/downscaling/downscale-1.html create mode 100644 image/test/reftest/downscaling/downscale-16px.html create mode 100644 image/test/reftest/downscaling/downscale-2a.html create mode 100644 image/test/reftest/downscaling/downscale-2b.html create mode 100644 image/test/reftest/downscaling/downscale-2c.html create mode 100644 image/test/reftest/downscaling/downscale-2d.html create mode 100644 image/test/reftest/downscaling/downscale-2e.html create mode 100644 image/test/reftest/downscaling/downscale-2f.html create mode 100644 image/test/reftest/downscaling/downscale-32px-ref.html create mode 100644 image/test/reftest/downscaling/downscale-32px.html create mode 100644 image/test/reftest/downscaling/downscale-8px.html create mode 100644 image/test/reftest/downscaling/downscale-moz-icon-1-ref.html create mode 100644 image/test/reftest/downscaling/downscale-moz-icon-1.html create mode 100644 image/test/reftest/downscaling/downscale-orient-ref.html create mode 100644 image/test/reftest/downscaling/downscale-orient-ref.png create mode 100644 image/test/reftest/downscaling/downscale-orient.html create mode 100644 image/test/reftest/downscaling/downscale-png.html create mode 100644 image/test/reftest/downscaling/downscale-svg-1-ref.html create mode 100644 image/test/reftest/downscaling/downscale-svg-1a.html create mode 100644 image/test/reftest/downscaling/downscale-svg-1b.html create mode 100644 image/test/reftest/downscaling/downscale-svg-1c.html create mode 100644 image/test/reftest/downscaling/downscale-svg-1d.html create mode 100644 image/test/reftest/downscaling/downscale-svg-1e.html create mode 100644 image/test/reftest/downscaling/downscale-svg-1f.html create mode 100644 image/test/reftest/downscaling/ff-0RGB.ico create mode 100644 image/test/reftest/downscaling/ff-0RGB.png create mode 100644 image/test/reftest/downscaling/ff-ARGB.ico create mode 100644 image/test/reftest/downscaling/ff-ARGB.png create mode 100644 image/test/reftest/downscaling/huge-1.html create mode 100644 image/test/reftest/downscaling/image-pre-rotated-90-deg.jpg create mode 100644 image/test/reftest/downscaling/lime-red-256px-bmp-in.ico create mode 100644 image/test/reftest/downscaling/lime-red-256px-png-in.ico create mode 100644 image/test/reftest/downscaling/lime-red-256px.bmp create mode 100644 image/test/reftest/downscaling/lime-red-256px.gif create mode 100644 image/test/reftest/downscaling/lime-red-256px.jpg create mode 100644 image/test/reftest/downscaling/lime-red-256px.png create mode 100644 image/test/reftest/downscaling/lime-red-256px.svg create mode 100644 image/test/reftest/downscaling/lime-red-32px.png create mode 100644 image/test/reftest/downscaling/png-interlaced.png create mode 100644 image/test/reftest/downscaling/png-normal.png create mode 100644 image/test/reftest/downscaling/reftest.list create mode 100644 image/test/reftest/downscaling/top-to-bottom-16x16-24bpp.bmp create mode 100644 image/test/reftest/encoders-lossless/ImageDocument.css create mode 100644 image/test/reftest/encoders-lossless/encoder.html create mode 100644 image/test/reftest/encoders-lossless/reftest.list create mode 100644 image/test/reftest/encoders-lossless/size-15x15.png create mode 100644 image/test/reftest/encoders-lossless/size-16x16.png create mode 100644 image/test/reftest/encoders-lossless/size-17x17.png create mode 100644 image/test/reftest/encoders-lossless/size-1x1.png create mode 100644 image/test/reftest/encoders-lossless/size-256x256.png create mode 100644 image/test/reftest/encoders-lossless/size-2x2.png create mode 100644 image/test/reftest/encoders-lossless/size-31x31.png create mode 100644 image/test/reftest/encoders-lossless/size-32x32.png create mode 100644 image/test/reftest/encoders-lossless/size-33x33.png create mode 100644 image/test/reftest/encoders-lossless/size-3x3.png create mode 100644 image/test/reftest/encoders-lossless/size-4x4.png create mode 100644 image/test/reftest/encoders-lossless/size-5x5.png create mode 100644 image/test/reftest/encoders-lossless/size-6x6.png create mode 100644 image/test/reftest/encoders-lossless/size-7x7.png create mode 100644 image/test/reftest/encoders-lossless/size-8x8.png create mode 100644 image/test/reftest/encoders-lossless/size-9x9.png create mode 100644 image/test/reftest/encoders-lossless/test.png create mode 100644 image/test/reftest/generic/accept-image-catchall-ref.html create mode 100644 image/test/reftest/generic/accept-image-catchall.html create mode 100644 image/test/reftest/generic/check-header.sjs create mode 100644 image/test/reftest/generic/green.png create mode 100644 image/test/reftest/generic/moz-icon-1.html create mode 100644 image/test/reftest/generic/moz-icon-blank-1-almostref.html create mode 100644 image/test/reftest/generic/moz-icon-blank-1-antiref.html create mode 100644 image/test/reftest/generic/moz-icon-blank-1-antiref2.html create mode 100644 image/test/reftest/generic/moz-icon-blank-1-ref.html create mode 100644 image/test/reftest/generic/moz-icon-blank-1.html create mode 100644 image/test/reftest/generic/reftest.list create mode 100644 image/test/reftest/gif/1bit-255-trans.gif create mode 100644 image/test/reftest/gif/1bit-255-trans.png create mode 100644 image/test/reftest/gif/ImageDocument.css create mode 100644 image/test/reftest/gif/animation1a.gif create mode 100644 image/test/reftest/gif/animation2a-finalframe.gif create mode 100644 image/test/reftest/gif/animation2a.gif create mode 100644 image/test/reftest/gif/blue.gif create mode 100644 image/test/reftest/gif/comment.gif create mode 100644 image/test/reftest/gif/comment.png create mode 100644 image/test/reftest/gif/delaytest.html create mode 100644 image/test/reftest/gif/in-colormap-trans.gif create mode 100644 image/test/reftest/gif/in-colormap-trans.png create mode 100644 image/test/reftest/gif/one-color-offset-ref.gif create mode 100644 image/test/reftest/gif/one-color-offset.gif create mode 100644 image/test/reftest/gif/one-pixel-no-image-data-ref.html create mode 100644 image/test/reftest/gif/one-pixel-no-image-data.html create mode 100644 image/test/reftest/gif/out-of-colormap-trans.gif create mode 100644 image/test/reftest/gif/out-of-colormap-trans.png create mode 100644 image/test/reftest/gif/red.gif create mode 100644 image/test/reftest/gif/reftest.list create mode 100644 image/test/reftest/gif/small-background-size-2-ref.gif create mode 100644 image/test/reftest/gif/small-background-size-2.gif create mode 100644 image/test/reftest/gif/small-background-size-ref.gif create mode 100644 image/test/reftest/gif/small-background-size.gif create mode 100644 image/test/reftest/gif/test_bug641198.html create mode 100644 image/test/reftest/gif/tile-transform-ref.html create mode 100644 image/test/reftest/gif/tile-transform.html create mode 100644 image/test/reftest/gif/tiletest-ref.png create mode 100644 image/test/reftest/gif/tiletest.gif create mode 100644 image/test/reftest/gif/transparent-animation-finalframe.gif create mode 100644 image/test/reftest/gif/transparent-animation-finalframe.html create mode 100644 image/test/reftest/gif/transparent-animation.gif create mode 100644 image/test/reftest/gif/truncated-framerect-interlaced-ref.gif create mode 100644 image/test/reftest/gif/truncated-framerect-interlaced.gif create mode 100644 image/test/reftest/gif/truncated-framerect-ref.gif create mode 100644 image/test/reftest/gif/truncated-framerect-ref.html create mode 100644 image/test/reftest/gif/truncated-framerect.gif create mode 100644 image/test/reftest/gif/truncated-framerect.html create mode 100644 image/test/reftest/ico/cur/pointer.cur create mode 100644 image/test/reftest/ico/cur/pointer.png create mode 100644 image/test/reftest/ico/cur/reftest.list create mode 100644 image/test/reftest/ico/cur/wrapper.html create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-not-square-transparent-1bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-not-square-transparent-1bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-partial-transparent-1bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-partial-transparent-1bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-15x15-1bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-15x15-1bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-16x16-1bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-16x16-1bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-17x17-1bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-17x17-1bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-1x1-1bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-1x1-1bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-256x256-1bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-256x256-1bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-2x2-1bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-2x2-1bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-31x31-1bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-31x31-1bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-32x32-1bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-32x32-1bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-33x33-1bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-33x33-1bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-3x3-1bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-3x3-1bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-4x4-1bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-4x4-1bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-5x5-1bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-5x5-1bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-6x6-1bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-6x6-1bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-7x7-1bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-7x7-1bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-8x8-1bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-8x8-1bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-9x9-1bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-size-9x9-1bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-transparent-1bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/ico-transparent-1bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-1bpp/reftest.list create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-not-square-transparent-24bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-not-square-transparent-24bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-partial-transparent-24bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-partial-transparent-24bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-15x15-24bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-15x15-24bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-16x16-24bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-16x16-24bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-17x17-24bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-17x17-24bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-1x1-24bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-1x1-24bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-256x256-24bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-256x256-24bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-2x2-24bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-2x2-24bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-31x31-24bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-31x31-24bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-32x32-24bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-32x32-24bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-33x33-24bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-33x33-24bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-3x3-24bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-3x3-24bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-4x4-24bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-4x4-24bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-5x5-24bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-5x5-24bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-6x6-24bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-6x6-24bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-7x7-24bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-7x7-24bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-8x8-24bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-8x8-24bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-9x9-24bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-size-9x9-24bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-transparent-24bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/ico-transparent-24bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-24bpp/reftest.list create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-not-square-transparent-32bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-not-square-transparent-32bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-partial-transparent-32bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-partial-transparent-32bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-15x15-32bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-15x15-32bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-16x16-32bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-16x16-32bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-17x17-32bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-17x17-32bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-1x1-32bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-1x1-32bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-256x256-32bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-256x256-32bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-2x2-32bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-2x2-32bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-31x31-32bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-31x31-32bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-32x32-32bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-32x32-32bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-33x33-32bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-33x33-32bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-3x3-32bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-3x3-32bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-4x4-32bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-4x4-32bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-5x5-32bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-5x5-32bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-6x6-32bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-6x6-32bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-7x7-32bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-7x7-32bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-8x8-32bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-8x8-32bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-9x9-32bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-size-9x9-32bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-transparent-32bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/ico-transparent-32bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-32bpp/reftest.list create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-not-square-transparent-4bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-not-square-transparent-4bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-partial-transparent-4bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-partial-transparent-4bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-15x15-4bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-15x15-4bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-16x16-4bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-16x16-4bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-17x17-4bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-17x17-4bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-1x1-4bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-1x1-4bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-256x256-4bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-256x256-4bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-2x2-4bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-2x2-4bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-31x31-4bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-31x31-4bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-32x32-4bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-32x32-4bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-33x33-4bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-33x33-4bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-3x3-4bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-3x3-4bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-4x4-4bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-4x4-4bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-5x5-4bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-5x5-4bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-6x6-4bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-6x6-4bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-7x7-4bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-7x7-4bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-8x8-4bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-8x8-4bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-9x9-4bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-size-9x9-4bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-transparent-4bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/ico-transparent-4bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-4bpp/reftest.list create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-not-square-transparent-8bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-not-square-transparent-8bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-partial-transparent-8bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-partial-transparent-8bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-15x15-8bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-15x15-8bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-16x16-8bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-16x16-8bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-17x17-8bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-17x17-8bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-1x1-8bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-1x1-8bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-256x256-8bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-256x256-8bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-2x2-8bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-2x2-8bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-31x31-8bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-31x31-8bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-32x32-8bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-32x32-8bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-33x33-8bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-33x33-8bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-3x3-8bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-3x3-8bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-4x4-8bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-4x4-8bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-5x5-8bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-5x5-8bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-6x6-8bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-6x6-8bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-7x7-8bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-7x7-8bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-8x8-8bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-8x8-8bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-9x9-8bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-size-9x9-8bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-transparent-8bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/ico-transparent-8bpp.png create mode 100644 image/test/reftest/ico/ico-bmp-8bpp/reftest.list create mode 100644 image/test/reftest/ico/ico-bmp-corrupted/16x16.png create mode 100644 image/test/reftest/ico/ico-bmp-corrupted/invalid-bpp.ico create mode 100644 image/test/reftest/ico/ico-bmp-corrupted/invalid-compression-RLE4.ico create mode 100644 image/test/reftest/ico/ico-bmp-corrupted/invalid-compression-RLE8.ico create mode 100644 image/test/reftest/ico/ico-bmp-corrupted/invalid-compression.ico create mode 100644 image/test/reftest/ico/ico-bmp-corrupted/reftest.list create mode 100644 image/test/reftest/ico/ico-bmp-corrupted/wrapper.html create mode 100644 image/test/reftest/ico/ico-mixed/mixed-bmp-png.ico create mode 100644 image/test/reftest/ico/ico-mixed/mixed-bmp-png.png create mode 100644 image/test/reftest/ico/ico-mixed/mixed-bmp-png32.png create mode 100644 image/test/reftest/ico/ico-mixed/mixed-bmp-png48.png create mode 100644 image/test/reftest/ico/ico-mixed/reftest.list create mode 100644 image/test/reftest/ico/ico-png/corrupted_x00n0g01.ico create mode 100644 image/test/reftest/ico/ico-png/corrupted_xxcrn0g04.ico create mode 100644 image/test/reftest/ico/ico-png/ico-size-15x15-png.ico create mode 100644 image/test/reftest/ico/ico-png/ico-size-15x15-png.png create mode 100644 image/test/reftest/ico/ico-png/ico-size-16x16-png.ico create mode 100644 image/test/reftest/ico/ico-png/ico-size-16x16-png.png create mode 100644 image/test/reftest/ico/ico-png/ico-size-17x17-png.ico create mode 100644 image/test/reftest/ico/ico-png/ico-size-17x17-png.png create mode 100644 image/test/reftest/ico/ico-png/ico-size-1x1-png.ico create mode 100644 image/test/reftest/ico/ico-png/ico-size-1x1-png.png create mode 100644 image/test/reftest/ico/ico-png/ico-size-256x256-png.ico create mode 100644 image/test/reftest/ico/ico-png/ico-size-256x256-png.png create mode 100644 image/test/reftest/ico/ico-png/ico-size-2x2-png.ico create mode 100644 image/test/reftest/ico/ico-png/ico-size-2x2-png.png create mode 100644 image/test/reftest/ico/ico-png/ico-size-31x31-png.ico create mode 100644 image/test/reftest/ico/ico-png/ico-size-31x31-png.png create mode 100644 image/test/reftest/ico/ico-png/ico-size-32x32-png.ico create mode 100644 image/test/reftest/ico/ico-png/ico-size-32x32-png.png create mode 100644 image/test/reftest/ico/ico-png/ico-size-33x33-png.ico create mode 100644 image/test/reftest/ico/ico-png/ico-size-33x33-png.png create mode 100644 image/test/reftest/ico/ico-png/ico-size-3x3-png.ico create mode 100644 image/test/reftest/ico/ico-png/ico-size-3x3-png.png create mode 100644 image/test/reftest/ico/ico-png/ico-size-4x4-png.ico create mode 100644 image/test/reftest/ico/ico-png/ico-size-4x4-png.png create mode 100644 image/test/reftest/ico/ico-png/ico-size-5x5-png.ico create mode 100644 image/test/reftest/ico/ico-png/ico-size-5x5-png.png create mode 100644 image/test/reftest/ico/ico-png/ico-size-6x6-png.ico create mode 100644 image/test/reftest/ico/ico-png/ico-size-6x6-png.png create mode 100644 image/test/reftest/ico/ico-png/ico-size-7x7-png.ico create mode 100644 image/test/reftest/ico/ico-png/ico-size-7x7-png.png create mode 100644 image/test/reftest/ico/ico-png/ico-size-8x8-png.ico create mode 100644 image/test/reftest/ico/ico-png/ico-size-8x8-png.png create mode 100644 image/test/reftest/ico/ico-png/ico-size-9x9-png.ico create mode 100644 image/test/reftest/ico/ico-png/ico-size-9x9-png.png create mode 100644 image/test/reftest/ico/ico-png/reftest.list create mode 100644 image/test/reftest/ico/ico-png/tmp.ico create mode 100644 image/test/reftest/ico/ico-png/transparent-png.ico create mode 100644 image/test/reftest/ico/ico-png/transparent-png.png create mode 100644 image/test/reftest/ico/ico-png/wrapper.html create mode 100644 image/test/reftest/ico/ico-png/x00n0g01.png create mode 100644 image/test/reftest/ico/ico-png/xcrn0g04.png create mode 100644 image/test/reftest/ico/reftest.list create mode 100644 image/test/reftest/img2html.html create mode 100644 image/test/reftest/jpeg/blue.html create mode 100644 image/test/reftest/jpeg/blue.jpg create mode 100644 image/test/reftest/jpeg/jpg-cmyk-1.jpg create mode 100644 image/test/reftest/jpeg/jpg-cmyk-1.png create mode 100644 image/test/reftest/jpeg/jpg-cmyk-2.jpg create mode 100644 image/test/reftest/jpeg/jpg-cmyk-2.png create mode 100644 image/test/reftest/jpeg/jpg-gray.jpg create mode 100644 image/test/reftest/jpeg/jpg-gray.png create mode 100644 image/test/reftest/jpeg/jpg-progressive-1000-ref.html create mode 100644 image/test/reftest/jpeg/jpg-progressive-1000.html create mode 100644 image/test/reftest/jpeg/jpg-progressive-1000.jpg create mode 100644 image/test/reftest/jpeg/jpg-progressive.jpg create mode 100644 image/test/reftest/jpeg/jpg-progressive.png create mode 100644 image/test/reftest/jpeg/jpg-size-15x15.jpg create mode 100644 image/test/reftest/jpeg/jpg-size-15x15.png create mode 100644 image/test/reftest/jpeg/jpg-size-16x16.jpg create mode 100644 image/test/reftest/jpeg/jpg-size-16x16.png create mode 100644 image/test/reftest/jpeg/jpg-size-17x17.jpg create mode 100644 image/test/reftest/jpeg/jpg-size-17x17.png create mode 100644 image/test/reftest/jpeg/jpg-size-1x1.jpg create mode 100644 image/test/reftest/jpeg/jpg-size-1x1.png create mode 100644 image/test/reftest/jpeg/jpg-size-2x2.jpg create mode 100644 image/test/reftest/jpeg/jpg-size-2x2.png create mode 100644 image/test/reftest/jpeg/jpg-size-31x31.jpg create mode 100644 image/test/reftest/jpeg/jpg-size-31x31.png create mode 100644 image/test/reftest/jpeg/jpg-size-32x32.jpg create mode 100644 image/test/reftest/jpeg/jpg-size-32x32.png create mode 100644 image/test/reftest/jpeg/jpg-size-33x33.jpg create mode 100644 image/test/reftest/jpeg/jpg-size-33x33.png create mode 100644 image/test/reftest/jpeg/jpg-size-3x3.jpg create mode 100644 image/test/reftest/jpeg/jpg-size-3x3.png create mode 100644 image/test/reftest/jpeg/jpg-size-4x4.jpg create mode 100644 image/test/reftest/jpeg/jpg-size-4x4.png create mode 100644 image/test/reftest/jpeg/jpg-size-5x5.jpg create mode 100644 image/test/reftest/jpeg/jpg-size-5x5.png create mode 100644 image/test/reftest/jpeg/jpg-size-6x6.jpg create mode 100644 image/test/reftest/jpeg/jpg-size-6x6.png create mode 100644 image/test/reftest/jpeg/jpg-size-7x7.jpg create mode 100644 image/test/reftest/jpeg/jpg-size-7x7.png create mode 100644 image/test/reftest/jpeg/jpg-size-8x8.jpg create mode 100644 image/test/reftest/jpeg/jpg-size-8x8.png create mode 100644 image/test/reftest/jpeg/jpg-size-9x9.jpg create mode 100644 image/test/reftest/jpeg/jpg-size-9x9.png create mode 100644 image/test/reftest/jpeg/jpg-srgb-icc.jpg create mode 100644 image/test/reftest/jpeg/jpg-srgb-icc.png create mode 100644 image/test/reftest/jpeg/non-interleaved_progressive-1-halfred-ref.png create mode 100644 image/test/reftest/jpeg/non-interleaved_progressive-1.jpg create mode 100644 image/test/reftest/jpeg/non-interleaved_progressive-2-white-ref.png create mode 100644 image/test/reftest/jpeg/non-interleaved_progressive-2.jpg create mode 100644 image/test/reftest/jpeg/red-bad-marker.jpg create mode 100644 image/test/reftest/jpeg/red.jpg create mode 100644 image/test/reftest/jpeg/reftest.list create mode 100644 image/test/reftest/jpeg/webcam-simulacrum.html create mode 100644 image/test/reftest/jpeg/webcam-simulacrum.mjpg create mode 100644 image/test/reftest/jpeg/webcam-simulacrum.mjpg^headers^ create mode 100644 image/test/reftest/jxl/jxl-size-33x33.jxl create mode 100644 image/test/reftest/jxl/jxl-size-33x33.png create mode 100644 image/test/reftest/jxl/reftest.list create mode 100644 image/test/reftest/pngsuite-ancillary/ccwn2c08.html create mode 100644 image/test/reftest/pngsuite-ancillary/ccwn2c08.png create mode 100644 image/test/reftest/pngsuite-ancillary/ccwn3p08.html create mode 100644 image/test/reftest/pngsuite-ancillary/ccwn3p08.png create mode 100644 image/test/reftest/pngsuite-ancillary/cdfn2c08.html create mode 100644 image/test/reftest/pngsuite-ancillary/cdfn2c08.png create mode 100644 image/test/reftest/pngsuite-ancillary/cdhn2c08.html create mode 100644 image/test/reftest/pngsuite-ancillary/cdhn2c08.png create mode 100644 image/test/reftest/pngsuite-ancillary/cdsn2c08.html create mode 100644 image/test/reftest/pngsuite-ancillary/cdsn2c08.png create mode 100644 image/test/reftest/pngsuite-ancillary/cdun2c08.html create mode 100644 image/test/reftest/pngsuite-ancillary/cdun2c08.png create mode 100644 image/test/reftest/pngsuite-ancillary/ch1n3p04.html create mode 100644 image/test/reftest/pngsuite-ancillary/ch1n3p04.png create mode 100644 image/test/reftest/pngsuite-ancillary/ch2n3p08.html create mode 100644 image/test/reftest/pngsuite-ancillary/ch2n3p08.png create mode 100644 image/test/reftest/pngsuite-ancillary/cm0n0g04.html create mode 100644 image/test/reftest/pngsuite-ancillary/cm0n0g04.png create mode 100644 image/test/reftest/pngsuite-ancillary/cm7n0g04.html create mode 100644 image/test/reftest/pngsuite-ancillary/cm7n0g04.png create mode 100644 image/test/reftest/pngsuite-ancillary/cm9n0g04.html create mode 100644 image/test/reftest/pngsuite-ancillary/cm9n0g04.png create mode 100644 image/test/reftest/pngsuite-ancillary/cs3n2c16.html create mode 100644 image/test/reftest/pngsuite-ancillary/cs3n2c16.png create mode 100644 image/test/reftest/pngsuite-ancillary/cs3n3p08.html create mode 100644 image/test/reftest/pngsuite-ancillary/cs3n3p08.png create mode 100644 image/test/reftest/pngsuite-ancillary/cs5n2c08.html create mode 100644 image/test/reftest/pngsuite-ancillary/cs5n2c08.png create mode 100644 image/test/reftest/pngsuite-ancillary/cs5n3p08.html create mode 100644 image/test/reftest/pngsuite-ancillary/cs5n3p08.png create mode 100644 image/test/reftest/pngsuite-ancillary/cs8n2c08.html create mode 100644 image/test/reftest/pngsuite-ancillary/cs8n2c08.png create mode 100644 image/test/reftest/pngsuite-ancillary/cs8n3p08.html create mode 100644 image/test/reftest/pngsuite-ancillary/cs8n3p08.png create mode 100644 image/test/reftest/pngsuite-ancillary/ct0n0g04.html create mode 100644 image/test/reftest/pngsuite-ancillary/ct0n0g04.png create mode 100644 image/test/reftest/pngsuite-ancillary/ct1n0g04.html create mode 100644 image/test/reftest/pngsuite-ancillary/ct1n0g04.png create mode 100644 image/test/reftest/pngsuite-ancillary/ctzn0g04.html create mode 100644 image/test/reftest/pngsuite-ancillary/ctzn0g04.png create mode 100644 image/test/reftest/pngsuite-ancillary/qcms-asm-check.js create mode 100644 image/test/reftest/pngsuite-ancillary/reftest.list create mode 100644 image/test/reftest/pngsuite-background/bg__4a08.html create mode 100644 image/test/reftest/pngsuite-background/bg__4a16.html create mode 100644 image/test/reftest/pngsuite-background/bg__6a08.html create mode 100644 image/test/reftest/pngsuite-background/bg__6a16.html create mode 100644 image/test/reftest/pngsuite-background/bgai4a08.png create mode 100644 image/test/reftest/pngsuite-background/bgai4a16.png create mode 100644 image/test/reftest/pngsuite-background/bgan6a08.png create mode 100644 image/test/reftest/pngsuite-background/bgan6a16.png create mode 100644 image/test/reftest/pngsuite-background/bgbn4a08.png create mode 100644 image/test/reftest/pngsuite-background/bggn4a16.png create mode 100644 image/test/reftest/pngsuite-background/bgwn6a08.png create mode 100644 image/test/reftest/pngsuite-background/bgyn6a16.png create mode 100644 image/test/reftest/pngsuite-background/reftest.list create mode 100644 image/test/reftest/pngsuite-background/wrapper.html create mode 100644 image/test/reftest/pngsuite-basic-i/basi0g01.html create mode 100644 image/test/reftest/pngsuite-basic-i/basi0g01.png create mode 100644 image/test/reftest/pngsuite-basic-i/basi0g02.html create mode 100644 image/test/reftest/pngsuite-basic-i/basi0g02.png create mode 100644 image/test/reftest/pngsuite-basic-i/basi0g04.html create mode 100644 image/test/reftest/pngsuite-basic-i/basi0g04.png create mode 100644 image/test/reftest/pngsuite-basic-i/basi0g08.html create mode 100644 image/test/reftest/pngsuite-basic-i/basi0g08.png create mode 100644 image/test/reftest/pngsuite-basic-i/basi0g16.html create mode 100644 image/test/reftest/pngsuite-basic-i/basi0g16.png create mode 100644 image/test/reftest/pngsuite-basic-i/basi2c08.html create mode 100644 image/test/reftest/pngsuite-basic-i/basi2c08.png create mode 100644 image/test/reftest/pngsuite-basic-i/basi2c16.html create mode 100644 image/test/reftest/pngsuite-basic-i/basi2c16.png create mode 100644 image/test/reftest/pngsuite-basic-i/basi3p01.html create mode 100644 image/test/reftest/pngsuite-basic-i/basi3p01.png create mode 100644 image/test/reftest/pngsuite-basic-i/basi3p02.html create mode 100644 image/test/reftest/pngsuite-basic-i/basi3p02.png create mode 100644 image/test/reftest/pngsuite-basic-i/basi3p04.html create mode 100644 image/test/reftest/pngsuite-basic-i/basi3p04.png create mode 100644 image/test/reftest/pngsuite-basic-i/basi3p08.html create mode 100644 image/test/reftest/pngsuite-basic-i/basi3p08.png create mode 100644 image/test/reftest/pngsuite-basic-i/basi4a08.png create mode 100644 image/test/reftest/pngsuite-basic-i/basi4a16.png create mode 100644 image/test/reftest/pngsuite-basic-i/basi6a08.png create mode 100644 image/test/reftest/pngsuite-basic-i/basi6a16.png create mode 100644 image/test/reftest/pngsuite-basic-i/reftest.list create mode 100644 image/test/reftest/pngsuite-basic-n/basn0g01.html create mode 100644 image/test/reftest/pngsuite-basic-n/basn0g01.png create mode 100644 image/test/reftest/pngsuite-basic-n/basn0g02.html create mode 100644 image/test/reftest/pngsuite-basic-n/basn0g02.png create mode 100644 image/test/reftest/pngsuite-basic-n/basn0g04.html create mode 100644 image/test/reftest/pngsuite-basic-n/basn0g04.png create mode 100644 image/test/reftest/pngsuite-basic-n/basn0g08.html create mode 100644 image/test/reftest/pngsuite-basic-n/basn0g08.png create mode 100644 image/test/reftest/pngsuite-basic-n/basn0g16.html create mode 100644 image/test/reftest/pngsuite-basic-n/basn0g16.png create mode 100644 image/test/reftest/pngsuite-basic-n/basn2c08.html create mode 100644 image/test/reftest/pngsuite-basic-n/basn2c08.png create mode 100644 image/test/reftest/pngsuite-basic-n/basn2c16.html create mode 100644 image/test/reftest/pngsuite-basic-n/basn2c16.png create mode 100644 image/test/reftest/pngsuite-basic-n/basn3p01.html create mode 100644 image/test/reftest/pngsuite-basic-n/basn3p01.png create mode 100644 image/test/reftest/pngsuite-basic-n/basn3p02.html create mode 100644 image/test/reftest/pngsuite-basic-n/basn3p02.png create mode 100644 image/test/reftest/pngsuite-basic-n/basn3p04.html create mode 100644 image/test/reftest/pngsuite-basic-n/basn3p04.png create mode 100644 image/test/reftest/pngsuite-basic-n/basn3p08.html create mode 100644 image/test/reftest/pngsuite-basic-n/basn3p08.png create mode 100644 image/test/reftest/pngsuite-basic-n/basn4a08.png create mode 100644 image/test/reftest/pngsuite-basic-n/basn4a16.png create mode 100644 image/test/reftest/pngsuite-basic-n/basn6a08.png create mode 100644 image/test/reftest/pngsuite-basic-n/basn6a16.png create mode 100644 image/test/reftest/pngsuite-basic-n/reftest.list create mode 100644 image/test/reftest/pngsuite-chunkorder/color.html create mode 100644 image/test/reftest/pngsuite-chunkorder/grayscale.html create mode 100644 image/test/reftest/pngsuite-chunkorder/oi1n0g16.png create mode 100644 image/test/reftest/pngsuite-chunkorder/oi1n2c16.png create mode 100644 image/test/reftest/pngsuite-chunkorder/oi2n0g16.png create mode 100644 image/test/reftest/pngsuite-chunkorder/oi2n2c16.png create mode 100644 image/test/reftest/pngsuite-chunkorder/oi4n0g16.png create mode 100644 image/test/reftest/pngsuite-chunkorder/oi4n2c16.png create mode 100644 image/test/reftest/pngsuite-chunkorder/oi9n0g16.png create mode 100644 image/test/reftest/pngsuite-chunkorder/oi9n2c16.png create mode 100644 image/test/reftest/pngsuite-chunkorder/reftest.list create mode 100644 image/test/reftest/pngsuite-corrupted/reftest.list create mode 100644 image/test/reftest/pngsuite-corrupted/wrapper.html create mode 100644 image/test/reftest/pngsuite-corrupted/x00n0g01.png create mode 100644 image/test/reftest/pngsuite-corrupted/xcrn0g04.png create mode 100644 image/test/reftest/pngsuite-corrupted/xlfn0g04.png create mode 100644 image/test/reftest/pngsuite-filtering/f00n0g08.html create mode 100644 image/test/reftest/pngsuite-filtering/f00n0g08.png create mode 100644 image/test/reftest/pngsuite-filtering/f00n2c08.html create mode 100644 image/test/reftest/pngsuite-filtering/f00n2c08.png create mode 100644 image/test/reftest/pngsuite-filtering/f01n0g08.html create mode 100644 image/test/reftest/pngsuite-filtering/f01n0g08.png create mode 100644 image/test/reftest/pngsuite-filtering/f01n2c08.html create mode 100644 image/test/reftest/pngsuite-filtering/f01n2c08.png create mode 100644 image/test/reftest/pngsuite-filtering/f02n0g08.html create mode 100644 image/test/reftest/pngsuite-filtering/f02n0g08.png create mode 100644 image/test/reftest/pngsuite-filtering/f02n2c08.html create mode 100644 image/test/reftest/pngsuite-filtering/f02n2c08.png create mode 100644 image/test/reftest/pngsuite-filtering/f03n0g08.html create mode 100644 image/test/reftest/pngsuite-filtering/f03n0g08.png create mode 100644 image/test/reftest/pngsuite-filtering/f03n2c08.html create mode 100644 image/test/reftest/pngsuite-filtering/f03n2c08.png create mode 100644 image/test/reftest/pngsuite-filtering/f04n0g08.html create mode 100644 image/test/reftest/pngsuite-filtering/f04n0g08.png create mode 100644 image/test/reftest/pngsuite-filtering/f04n2c08.html create mode 100644 image/test/reftest/pngsuite-filtering/f04n2c08.png create mode 100644 image/test/reftest/pngsuite-filtering/reftest.list create mode 100644 image/test/reftest/pngsuite-gamma/g03n0g16.html create mode 100644 image/test/reftest/pngsuite-gamma/g03n0g16.png create mode 100644 image/test/reftest/pngsuite-gamma/g03n2c08.html create mode 100644 image/test/reftest/pngsuite-gamma/g03n2c08.png create mode 100644 image/test/reftest/pngsuite-gamma/g03n3p04.html create mode 100644 image/test/reftest/pngsuite-gamma/g03n3p04.png create mode 100644 image/test/reftest/pngsuite-gamma/g04n0g16.html create mode 100644 image/test/reftest/pngsuite-gamma/g04n0g16.png create mode 100644 image/test/reftest/pngsuite-gamma/g04n2c08.html create mode 100644 image/test/reftest/pngsuite-gamma/g04n2c08.png create mode 100644 image/test/reftest/pngsuite-gamma/g04n3p04.html create mode 100644 image/test/reftest/pngsuite-gamma/g04n3p04.png create mode 100644 image/test/reftest/pngsuite-gamma/g05n0g16.html create mode 100644 image/test/reftest/pngsuite-gamma/g05n0g16.png create mode 100644 image/test/reftest/pngsuite-gamma/g05n2c08.html create mode 100644 image/test/reftest/pngsuite-gamma/g05n2c08.png create mode 100644 image/test/reftest/pngsuite-gamma/g05n3p04.html create mode 100644 image/test/reftest/pngsuite-gamma/g05n3p04.png create mode 100644 image/test/reftest/pngsuite-gamma/g07n0g16.html create mode 100644 image/test/reftest/pngsuite-gamma/g07n0g16.png create mode 100644 image/test/reftest/pngsuite-gamma/g07n2c08.html create mode 100644 image/test/reftest/pngsuite-gamma/g07n2c08.png create mode 100644 image/test/reftest/pngsuite-gamma/g07n3p04.html create mode 100644 image/test/reftest/pngsuite-gamma/g07n3p04.png create mode 100644 image/test/reftest/pngsuite-gamma/g10n0g16.html create mode 100644 image/test/reftest/pngsuite-gamma/g10n0g16.png create mode 100644 image/test/reftest/pngsuite-gamma/g10n2c08.html create mode 100644 image/test/reftest/pngsuite-gamma/g10n2c08.png create mode 100644 image/test/reftest/pngsuite-gamma/g10n3p04.html create mode 100644 image/test/reftest/pngsuite-gamma/g10n3p04.png create mode 100644 image/test/reftest/pngsuite-gamma/g25n0g16.html create mode 100644 image/test/reftest/pngsuite-gamma/g25n0g16.png create mode 100644 image/test/reftest/pngsuite-gamma/g25n2c08.html create mode 100644 image/test/reftest/pngsuite-gamma/g25n2c08.png create mode 100644 image/test/reftest/pngsuite-gamma/g25n3p04.html create mode 100644 image/test/reftest/pngsuite-gamma/g25n3p04.png create mode 100644 image/test/reftest/pngsuite-gamma/reftest.list create mode 100644 image/test/reftest/pngsuite-oddsizes/reftest.list create mode 100644 image/test/reftest/pngsuite-oddsizes/s01_3p01.html create mode 100644 image/test/reftest/pngsuite-oddsizes/s01i3p01.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s01n3p01.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s02_3p01.html create mode 100644 image/test/reftest/pngsuite-oddsizes/s02i3p01.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s02n3p01.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s03_3p01.html create mode 100644 image/test/reftest/pngsuite-oddsizes/s03i3p01.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s03n3p01.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s04_3p01.html create mode 100644 image/test/reftest/pngsuite-oddsizes/s04i3p01.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s04n3p01.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s05_3p02.html create mode 100644 image/test/reftest/pngsuite-oddsizes/s05i3p02.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s05n3p02.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s06_3p02.html create mode 100644 image/test/reftest/pngsuite-oddsizes/s06i3p02.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s06n3p02.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s07_3p02.html create mode 100644 image/test/reftest/pngsuite-oddsizes/s07i3p02.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s07n3p02.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s08_3p02.html create mode 100644 image/test/reftest/pngsuite-oddsizes/s08i3p02.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s08n3p02.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s09_3p02.html create mode 100644 image/test/reftest/pngsuite-oddsizes/s09i3p02.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s09n3p02.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s32_3p04.html create mode 100644 image/test/reftest/pngsuite-oddsizes/s32i3p04.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s32n3p04.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s33_3p04.html create mode 100644 image/test/reftest/pngsuite-oddsizes/s33i3p04.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s33n3p04.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s34_3p04.html create mode 100644 image/test/reftest/pngsuite-oddsizes/s34i3p04.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s34n3p04.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s35_3p04.html create mode 100644 image/test/reftest/pngsuite-oddsizes/s35i3p04.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s35n3p04.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s36_3p04.html create mode 100644 image/test/reftest/pngsuite-oddsizes/s36i3p04.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s36n3p04.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s37_3p04.html create mode 100644 image/test/reftest/pngsuite-oddsizes/s37i3p04.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s37n3p04.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s38_3p04.html create mode 100644 image/test/reftest/pngsuite-oddsizes/s38i3p04.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s38n3p04.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s39_3p04.html create mode 100644 image/test/reftest/pngsuite-oddsizes/s39i3p04.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s39n3p04.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s40_3p04.html create mode 100644 image/test/reftest/pngsuite-oddsizes/s40i3p04.png create mode 100644 image/test/reftest/pngsuite-oddsizes/s40n3p04.png create mode 100644 image/test/reftest/pngsuite-palettes/pp0n2c16.html create mode 100644 image/test/reftest/pngsuite-palettes/pp0n2c16.png create mode 100644 image/test/reftest/pngsuite-palettes/pp0n6a08.png create mode 100644 image/test/reftest/pngsuite-palettes/ps1n0g08.html create mode 100644 image/test/reftest/pngsuite-palettes/ps1n0g08.png create mode 100644 image/test/reftest/pngsuite-palettes/ps1n2c16.html create mode 100644 image/test/reftest/pngsuite-palettes/ps1n2c16.png create mode 100644 image/test/reftest/pngsuite-palettes/ps2n0g08.html create mode 100644 image/test/reftest/pngsuite-palettes/ps2n0g08.png create mode 100644 image/test/reftest/pngsuite-palettes/ps2n2c16.html create mode 100644 image/test/reftest/pngsuite-palettes/ps2n2c16.png create mode 100644 image/test/reftest/pngsuite-palettes/reftest.list create mode 100644 image/test/reftest/pngsuite-zlib/reftest.list create mode 100644 image/test/reftest/pngsuite-zlib/z00n2c08.html create mode 100644 image/test/reftest/pngsuite-zlib/z00n2c08.png create mode 100644 image/test/reftest/pngsuite-zlib/z03n2c08.html create mode 100644 image/test/reftest/pngsuite-zlib/z03n2c08.png create mode 100644 image/test/reftest/pngsuite-zlib/z06n2c08.html create mode 100644 image/test/reftest/pngsuite-zlib/z06n2c08.png create mode 100644 image/test/reftest/pngsuite-zlib/z09n2c08.html create mode 100644 image/test/reftest/pngsuite-zlib/z09n2c08.png create mode 100644 image/test/reftest/reftest.list create mode 100644 image/test/reftest/webp/blue.png create mode 100644 image/test/reftest/webp/icc-bit-no-icc-chunk.webp create mode 100644 image/test/reftest/webp/reftest.list create mode 100644 image/test/unit/async_load_tests.js create mode 100644 image/test/unit/bug413512.ico create mode 100644 image/test/unit/bug815359.ico create mode 100644 image/test/unit/image1.png create mode 100644 image/test/unit/image1.webp create mode 100644 image/test/unit/image1png16x16.jpg create mode 100644 image/test/unit/image1png64x64.jpg create mode 100644 image/test/unit/image1quality50.webp create mode 100644 image/test/unit/image2.jpg create mode 100644 image/test/unit/image2jpg16x16-win.png create mode 100644 image/test/unit/image2jpg16x16.png create mode 100644 image/test/unit/image2jpg16x16cropped.jpg create mode 100644 image/test/unit/image2jpg16x16cropped2.jpg create mode 100644 image/test/unit/image2jpg16x32cropped3.jpg create mode 100644 image/test/unit/image2jpg16x32scaled.jpg create mode 100644 image/test/unit/image2jpg32x16cropped4.jpg create mode 100644 image/test/unit/image2jpg32x16scaled.jpg create mode 100644 image/test/unit/image2jpg32x32-win.png create mode 100644 image/test/unit/image2jpg32x32.jpg create mode 100644 image/test/unit/image2jpg32x32.png create mode 100644 image/test/unit/image3.ico create mode 100644 image/test/unit/image3ico16x16.png create mode 100644 image/test/unit/image3ico32x32.png create mode 100644 image/test/unit/image4.gif create mode 100644 image/test/unit/image4gif16x16bmp24bpp.ico create mode 100644 image/test/unit/image4gif16x16bmp32bpp.ico create mode 100644 image/test/unit/image4gif32x32bmp24bpp.ico create mode 100644 image/test/unit/image4gif32x32bmp32bpp.ico create mode 100644 image/test/unit/image_load_helpers.js create mode 100644 image/test/unit/test_async_notification.js create mode 100644 image/test/unit/test_async_notification_404.js create mode 100644 image/test/unit/test_async_notification_animated.js create mode 100644 image/test/unit/test_encoder_apng.js create mode 100644 image/test/unit/test_encoder_png.js create mode 100644 image/test/unit/test_imgtools.js create mode 100644 image/test/unit/test_moz_icon_uri.js create mode 100644 image/test/unit/test_private_channel.js create mode 100644 image/test/unit/xpcshell.toml (limited to 'image/test') diff --git a/image/test/browser/animated.gif b/image/test/browser/animated.gif new file mode 100644 index 0000000000..eb034e1501 Binary files /dev/null and b/image/test/browser/animated.gif differ diff --git a/image/test/browser/animated2.gif b/image/test/browser/animated2.gif new file mode 100644 index 0000000000..053eaae688 Binary files /dev/null and b/image/test/browser/animated2.gif differ diff --git a/image/test/browser/big.png b/image/test/browser/big.png new file mode 100644 index 0000000000..94e7eb6db2 Binary files /dev/null and b/image/test/browser/big.png differ diff --git a/image/test/browser/browser.toml b/image/test/browser/browser.toml new file mode 100644 index 0000000000..f264e1f6ab --- /dev/null +++ b/image/test/browser/browser.toml @@ -0,0 +1,27 @@ +[DEFAULT] +support-files = [ + "animated.gif", + "animated2.gif", + "big.png", + "head.js", + "image.html", + "imageX2.html", + "browser_docshell_type_editor/**" +] + +["browser_bug666317.js"] +skip-if = ["true"] # Bug 1207012 - Permaorange from an uncaught exception that isn't actually turning the suite orange until it hits beta, Bug 948194 - Decoded Images seem to not be discarded on memory-pressure notification + +["browser_bug1869938.js"] +support-files = ["helper1869938.html"] + +["browser_docshell_type_editor.js"] + +["browser_image.js"] +skip-if = ["true"] # Bug 987616 + +["browser_mozicon_file.js"] + +["browser_offscreen_image_in_out_of_process_iframe.js"] +https_first_disabled = true +support-files = ["empty.html"] diff --git a/image/test/browser/browser_bug1869938.js b/image/test/browser/browser_bug1869938.js new file mode 100644 index 0000000000..39956d8601 --- /dev/null +++ b/image/test/browser/browser_bug1869938.js @@ -0,0 +1,87 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +/* + * This test opens a private browsing window, then opens a content page in it + * that sets a favicon that is a data uri containing a svg file, which + * contains an image element that refers to a data uri containing a png image. + * This tests that we don't hit an assert when loading the png in the favicon + * in the parent process with this setup. + */ + +function waitForLinkAvailable(browser, win) { + let resolve, reject; + + let listener = { + onLinkIconAvailable(b, dataURI, iconURI) { + // Ignore icons for other browsers or empty icons. + if (browser !== b || !iconURI) { + return; + } + + win.gBrowser.removeTabsProgressListener(listener); + resolve(iconURI); + }, + }; + + let promise = new Promise((res, rej) => { + resolve = res; + reject = rej; + + win.gBrowser.addTabsProgressListener(listener); + }); + + promise.cancel = () => { + win.gBrowser.removeTabsProgressListener(listener); + + reject(); + }; + + return promise; +} + +add_task(async function test() { + function httpURL(filename) { + let chromeURL = getRootDirectory(gTestPath) + filename; + return chromeURL.replace( + "chrome://mochitests/content/", + "http://mochi.test:8888/" + ); + } + + let win = await BrowserTestUtils.openNewBrowserWindow({ private: true }); + + const pageUrl = httpURL("helper1869938.html"); + + let tab = (win.gBrowser.selectedTab = BrowserTestUtils.addTab( + win.gBrowser, + "about:blank" + )); + + await BrowserTestUtils.browserLoaded(tab.linkedBrowser); + + let faviconPromise = waitForLinkAvailable(tab.linkedBrowser, win); + + BrowserTestUtils.startLoadingURIString(tab.linkedBrowser, pageUrl); + + await BrowserTestUtils.browserLoaded(tab.linkedBrowser); + + await new Promise(resolve => { + waitForFocus(resolve, win); + }); + + await faviconPromise; + + // do a couple rafs here to ensure its loaded and displayed + await new Promise(r => requestAnimationFrame(r)); + await new Promise(r => requestAnimationFrame(r)); + + await BrowserTestUtils.closeWindow(win); + + win = null; + tab = null; + faviconPromise = null; + + ok(true, "we got here and didn't crash/assert"); +}); diff --git a/image/test/browser/browser_bug666317.js b/image/test/browser/browser_bug666317.js new file mode 100644 index 0000000000..7f58c61c56 --- /dev/null +++ b/image/test/browser/browser_bug666317.js @@ -0,0 +1,138 @@ +waitForExplicitFinish(); + +var pageSource = + "" + + '' + + ""; + +var oldDiscardingPref, oldTab, newTab; +var prefBranch = Services.prefs.getBranch("image.mem."); + +var gWaitingForDiscard = false; +var gScriptedObserver; +var gClonedRequest; + +function ImageObserver(decodeCallback, discardCallback) { + this.decodeComplete = function onDecodeComplete(aRequest) { + decodeCallback(); + }; + + this.discard = function onDiscard(request) { + if (!gWaitingForDiscard) { + return; + } + + this.synchronous = false; + discardCallback(); + }; + + this.synchronous = true; +} + +function currentRequest() { + let img = gBrowser + .getBrowserForTab(newTab) + .contentWindow.document.getElementById("testImg"); + return img.getRequest(Ci.nsIImageLoadingContent.CURRENT_REQUEST); +} + +function isImgDecoded() { + let request = currentRequest(); + return !!(request.imageStatus & Ci.imgIRequest.STATUS_DECODE_COMPLETE); +} + +// Ensure that the image is decoded by drawing it to a canvas. +function forceDecodeImg() { + let doc = gBrowser.getBrowserForTab(newTab).contentWindow.document; + let img = doc.getElementById("testImg"); + let canvas = doc.createElement("canvas"); + let ctx = canvas.getContext("2d"); + ctx.drawImage(img, 0, 0); +} + +function runAfterAsyncEvents(aCallback) { + function handlePostMessage(aEvent) { + if (aEvent.data == "next") { + window.removeEventListener("message", handlePostMessage); + aCallback(); + } + } + + window.addEventListener("message", handlePostMessage); + + // We'll receive the 'message' event after everything else that's currently in + // the event queue (which is a stronger guarantee than setTimeout, because + // setTimeout events may be coalesced). This lets us ensure that we run + // aCallback *after* any asynchronous events are delivered. + window.postMessage("next", "*"); +} + +function test() { + // Enable the discarding pref. + oldDiscardingPref = prefBranch.getBoolPref("discardable"); + prefBranch.setBoolPref("discardable", true); + + // Create and focus a new tab. + oldTab = gBrowser.selectedTab; + newTab = BrowserTestUtils.addTab(gBrowser, "data:text/html," + pageSource); + gBrowser.selectedTab = newTab; + + // Run step2 after the tab loads. + gBrowser.getBrowserForTab(newTab).addEventListener("pageshow", step2); +} + +function step2() { + // Create the image observer. + var observer = new ImageObserver( + () => runAfterAsyncEvents(step3), // DECODE_COMPLETE + () => runAfterAsyncEvents(step5) + ); // DISCARD + gScriptedObserver = Cc["@mozilla.org/image/tools;1"] + .getService(Ci.imgITools) + .createScriptedObserver(observer); + + // Clone the current imgIRequest with our new observer. + var request = currentRequest(); + gClonedRequest = request.clone(gScriptedObserver); + + // Check that the image is decoded. + forceDecodeImg(); + + // The DECODE_COMPLETE notification is delivered asynchronously. ImageObserver will + // eventually call step3. +} + +function step3() { + ok(isImgDecoded(), "Image should initially be decoded."); + + // Focus the old tab, then fire a memory-pressure notification. This should + // cause the decoded image in the new tab to be discarded. + gBrowser.selectedTab = oldTab; + + // Allow time to process the tab change. + runAfterAsyncEvents(step4); +} + +function step4() { + gWaitingForDiscard = true; + + var os = Services.obs; + os.notifyObservers(null, "memory-pressure", "heap-minimize"); + + // The DISCARD notification is delivered asynchronously. ImageObserver will + // eventually call step5. (Or else, sadly, the test will time out.) +} + +function step5() { + ok(true, "Image should be discarded."); + + // And we're done. + gBrowser.removeTab(newTab); + prefBranch.setBoolPref("discardable", oldDiscardingPref); + + gClonedRequest.cancelAndForgetObserver(0); + + finish(); +} diff --git a/image/test/browser/browser_docshell_type_editor.js b/image/test/browser/browser_docshell_type_editor.js new file mode 100644 index 0000000000..baa89c0f07 --- /dev/null +++ b/image/test/browser/browser_docshell_type_editor.js @@ -0,0 +1,134 @@ +"use strict"; + +const SIMPLE_HTML = "data:text/html,"; + +/** + * Returns the directory where the chrome.manifest file for the test can be found. + * + * @return nsIFile of the manifest directory + */ +function getManifestDir() { + let path = getTestFilePath("browser_docshell_type_editor"); + let file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile); + file.initWithPath(path); + return file; +} + +// The following URI is *not* accessible to content, hence loading that URI +// from an unprivileged site should be blocked. If docshell is of appType +// APP_TYPE_EDITOR however the load should be allowed. +// >> chrome://test1/skin/privileged.png + +add_task(async function () { + info("docshell of appType APP_TYPE_EDITOR can access privileged images."); + + // Load a temporary manifest adding a route to a privileged image + let manifestDir = getManifestDir(); + Components.manager.addBootstrappedManifestLocation(manifestDir); + + await BrowserTestUtils.withNewTab( + { + gBrowser, + url: SIMPLE_HTML, + }, + async function (browser) { + await SpecialPowers.spawn(browser, [], async function () { + let rootDocShell = docShell.sameTypeRootTreeItem.QueryInterface( + Ci.nsIDocShell + ); + let defaultAppType = rootDocShell.appType; + + rootDocShell.appType = Ci.nsIDocShell.APP_TYPE_EDITOR; + + is( + rootDocShell.appType, + Ci.nsIDocShell.APP_TYPE_EDITOR, + "sanity check: appType after update should be type editor" + ); + + return new Promise(resolve => { + let doc = content.document; + let image = doc.createElement("img"); + image.onload = function () { + ok(true, "APP_TYPE_EDITOR is allowed to load privileged image"); + // restore appType of rootDocShell before moving on to the next test + rootDocShell.appType = defaultAppType; + resolve(); + }; + image.onerror = function () { + ok(false, "APP_TYPE_EDITOR is allowed to load privileged image"); + // restore appType of rootDocShell before moving on to the next test + rootDocShell.appType = defaultAppType; + resolve(); + }; + doc.body.appendChild(image); + image.src = "chrome://test1/skin/privileged.png"; + }); + }); + } + ); + + Components.manager.removeBootstrappedManifestLocation(manifestDir); +}); + +add_task(async function () { + info( + "docshell of appType APP_TYPE_UNKNOWN can *not* access privileged images." + ); + + // Load a temporary manifest adding a route to a privileged image + let manifestDir = getManifestDir(); + Components.manager.addBootstrappedManifestLocation(manifestDir); + + await BrowserTestUtils.withNewTab( + { + gBrowser, + url: SIMPLE_HTML, + }, + async function (browser) { + await SpecialPowers.spawn(browser, [], async function () { + let rootDocShell = docShell.sameTypeRootTreeItem.QueryInterface( + Ci.nsIDocShell + ); + let defaultAppType = rootDocShell.appType; + + rootDocShell.appType = Ci.nsIDocShell.APP_TYPE_UNKNOWN; + + is( + rootDocShell.appType, + Ci.nsIDocShell.APP_TYPE_UNKNOWN, + "sanity check: appType of docshell should be unknown" + ); + + return new Promise(resolve => { + let doc = content.document; + let image = doc.createElement("img"); + image.onload = function () { + ok( + false, + "APP_TYPE_UNKNOWN is *not* allowed to access privileged image" + ); + // restore appType of rootDocShell before moving on to the next test + rootDocShell.appType = defaultAppType; + resolve(); + }; + image.onerror = function () { + ok( + true, + "APP_TYPE_UNKNOWN is *not* allowed to access privileged image" + ); + // restore appType of rootDocShell before moving on to the next test + rootDocShell.appType = defaultAppType; + resolve(); + }; + doc.body.appendChild(image); + // Set the src via wrappedJSObject so the load is triggered with + // the content page's principal rather than ours. + image.wrappedJSObject.src = "chrome://test1/skin/privileged.png"; + }); + }); + } + ); + + Components.manager.removeBootstrappedManifestLocation(manifestDir); +}); diff --git a/image/test/browser/browser_docshell_type_editor/chrome.manifest b/image/test/browser/browser_docshell_type_editor/chrome.manifest new file mode 100644 index 0000000000..85510a8af9 --- /dev/null +++ b/image/test/browser/browser_docshell_type_editor/chrome.manifest @@ -0,0 +1 @@ +skin test1 test img/ \ No newline at end of file diff --git a/image/test/browser/browser_docshell_type_editor/img/privileged.png b/image/test/browser/browser_docshell_type_editor/img/privileged.png new file mode 100644 index 0000000000..2bf7b7e828 Binary files /dev/null and b/image/test/browser/browser_docshell_type_editor/img/privileged.png differ diff --git a/image/test/browser/browser_image.js b/image/test/browser/browser_image.js new file mode 100644 index 0000000000..0ae55df640 --- /dev/null +++ b/image/test/browser/browser_image.js @@ -0,0 +1,261 @@ +waitForExplicitFinish(); +requestLongerTimeout(2); // see bug 660123 -- this test is slow on Mac. + +// A hold on the current timer, so it doesn't get GCed out from +// under us +var gTimer; + +// Browsing to a new URL - pushing us into the bfcache - should cause +// animations to stop, and resume when we return +/* global yield */ +function testBFCache() { + function theTest() { + var abort = false; + var chances, gImage, gFrames; + gBrowser.selectedTab = BrowserTestUtils.addTab( + gBrowser, + TESTROOT + "image.html" + ); + gBrowser.selectedBrowser.addEventListener( + "pageshow", + function () { + var window = gBrowser.contentWindow; + // If false, we are in an optimized build, and we abort this and + // all further tests + if ( + !actOnMozImage(window.document, "img1", function (image) { + gImage = image; + gFrames = gImage.framesNotified; + }) + ) { + gBrowser.removeCurrentTab(); + abort = true; + } + goer.next(); + }, + { capture: true, once: true } + ); + yield; + if (abort) { + finish(); + yield; // optimized build + } + + // Let animation run for a bit + chances = 120; + do { + gTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); + gTimer.initWithCallback( + function () { + if (gImage.framesNotified >= 20) { + goer.send(true); + } else { + chances--; + goer.send(chances == 0); // maybe if we wait a bit, it will happen + } + }, + 500, + Ci.nsITimer.TYPE_ONE_SHOT + ); + } while (!yield); + is(chances > 0, true, "Must have animated a few frames so far"); + + // Browse elsewhere; push our animating page into the bfcache + gBrowser.loadURI(Services.io.newURI("about:blank")); + + // Wait a bit for page to fully load, then wait a while and + // see that no animation occurs. + gTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); + gTimer.initWithCallback( + function () { + gFrames = gImage.framesNotified; + gTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); + gTimer.initWithCallback( + function () { + // Might have a few stray frames, until other page totally loads + var additionalFrames = gImage.framesNotified - gFrames; + is( + additionalFrames == 0, + true, + "Must have not animated in bfcache! Got " + + additionalFrames + + " additional frames" + ); + goer.next(); + }, + 4000, + Ci.nsITimer.TYPE_ONE_SHOT + ); // 4 seconds - expect 40 frames + }, + 0, + Ci.nsITimer.TYPE_ONE_SHOT + ); // delay of 0 - wait for next event loop + yield; + + // Go back + gBrowser.goBack(); + + chances = 120; + do { + gTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); + gTimer.initWithCallback( + function () { + if (gImage.framesNotified - gFrames >= 20) { + goer.send(true); + } else { + chances--; + goer.send(chances == 0); // maybe if we wait a bit, it will happen + } + }, + 500, + Ci.nsITimer.TYPE_ONE_SHOT + ); + } while (!yield); + is(chances > 0, true, "Must have animated once out of bfcache!"); + + // Finally, check that the css background image has essentially the same + // # of frames, implying that it animated at the same times as the regular + // image. We can easily retrieve regular images through their HTML image + // elements, which is what we did before. For the background image, we + // create a regular image now, and read the current frame count. + var doc = gBrowser.selectedBrowser.contentWindow.document; + var div = doc.getElementById("background_div"); + div.innerHTML += ''; + actOnMozImage(doc, "img3", function (image) { + is( + Math.abs(image.framesNotified - gImage.framesNotified) / + gImage.framesNotified < + 0.5, + true, + "Must have also animated the background image, and essentially the same # of frames. " + + "Regular image got " + + gImage.framesNotified + + " frames but background image got " + + image.framesNotified + ); + }); + + gBrowser.removeCurrentTab(); + + nextTest(); + } + + var goer = theTest(); + goer.next(); +} + +// Check that imgContainers are shared on the same page and +// between tabs +function testSharedContainers() { + function theTest() { + var gImages = []; + var gFrames; + + gBrowser.selectedTab = BrowserTestUtils.addTab( + gBrowser, + TESTROOT + "image.html" + ); + gBrowser.selectedBrowser.addEventListener( + "pageshow", + function () { + actOnMozImage(gBrowser.contentDocument, "img1", function (image) { + gImages[0] = image; + gFrames = image.framesNotified; // May in theory have frames from last test + // in this counter - so subtract them out + }); + goer.next(); + }, + { capture: true, once: true } + ); + yield; + + // Load next tab somewhat later + gTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); + gTimer.initWithCallback( + function () { + goer.next(); + }, + 1500, + Ci.nsITimer.TYPE_ONE_SHOT + ); + yield; + + gBrowser.selectedTab = BrowserTestUtils.addTab( + gBrowser, + TESTROOT + "imageX2.html" + ); + gBrowser.selectedBrowser.addEventListener( + "pageshow", + function () { + [1, 2].forEach(function (i) { + actOnMozImage(gBrowser.contentDocument, "img" + i, function (image) { + gImages[i] = image; + }); + }); + goer.next(); + }, + { capture: true, once: true } + ); + yield; + + var chances = 120; + do { + gTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); + gTimer.initWithCallback( + function () { + if (gImages[0].framesNotified - gFrames >= 10) { + goer.send(true); + } else { + chances--; + goer.send(chances == 0); // maybe if we wait a bit, it will happen + } + }, + 500, + Ci.nsITimer.TYPE_ONE_SHOT + ); + } while (!yield); + is( + chances > 0, + true, + "Must have been animating while showing several images" + ); + + // Check they all have the same frame counts + var theFrames = null; + [0, 1, 2].forEach(function (i) { + var frames = gImages[i].framesNotified; + if (theFrames == null) { + theFrames = frames; + } else { + is( + theFrames, + frames, + "Sharing the same imgContainer means *exactly* the same frame counts!" + ); + } + }); + + gBrowser.removeCurrentTab(); + gBrowser.removeCurrentTab(); + + nextTest(); + } + + var goer = theTest(); + goer.next(); +} + +var tests = [testBFCache, testSharedContainers]; + +function nextTest() { + if (!tests.length) { + finish(); + return; + } + tests.shift()(); +} + +function test() { + ignoreAllUncaughtExceptions(); + nextTest(); +} diff --git a/image/test/browser/browser_mozicon_file.js b/image/test/browser/browser_mozicon_file.js new file mode 100644 index 0000000000..8e01e0484d --- /dev/null +++ b/image/test/browser/browser_mozicon_file.js @@ -0,0 +1,12 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +"use strict"; + +add_task(async function test_mozicon_file_no_sandbox() { + assertFileProcess(); + await createMozIconInFile("txt"); + await createMozIconInFile("exe"); + await createMozIconInFile("non-existent-bidule"); +}); diff --git a/image/test/browser/browser_mozicon_file_sandbox_headless.js b/image/test/browser/browser_mozicon_file_sandbox_headless.js new file mode 100644 index 0000000000..08e8689904 --- /dev/null +++ b/image/test/browser/browser_mozicon_file_sandbox_headless.js @@ -0,0 +1,13 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +"use strict"; + +add_task(async function test_mozicon_file_with_sandbox() { + assertFileProcess(); + assertSandboxHeadless(); + await createMozIconInFile("txt"); + await createMozIconInFile("exe"); + await createMozIconInFile("non-existent-bidule"); +}); diff --git a/image/test/browser/browser_offscreen_image_in_out_of_process_iframe.js b/image/test/browser/browser_offscreen_image_in_out_of_process_iframe.js new file mode 100644 index 0000000000..b431902eb7 --- /dev/null +++ b/image/test/browser/browser_offscreen_image_in_out_of_process_iframe.js @@ -0,0 +1,164 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +"use strict"; + +const DIRPATH = getRootDirectory(gTestPath).replace( + "chrome://mochitests/content/", + "" +); +const parentPATH = DIRPATH + "empty.html"; +const iframePATH = DIRPATH + "empty.html"; + +const parentURL = `http://example.com/${parentPATH}`; +const iframeURL = `http://example.org/${iframePATH}`; + +add_task(async function setup_pref() { + await SpecialPowers.pushPrefEnv({ + set: [ + // To avoid throttling requestAnimationFrame callbacks in invisible + // iframes + ["layout.throttled_frame_rate", 60], + ], + }); +}); + +add_task(async function () { + const win = await BrowserTestUtils.openNewBrowserWindow({ + fission: true, + }); + + try { + const browser = win.gBrowser.selectedTab.linkedBrowser; + + BrowserTestUtils.startLoadingURIString(browser, parentURL); + await BrowserTestUtils.browserLoaded(browser, false, parentURL); + + async function setup(url) { + const scroller = content.document.createElement("div"); + scroller.style = "width: 300px; height: 300px; overflow: scroll;"; + scroller.setAttribute("id", "scroller"); + content.document.body.appendChild(scroller); + + // Make a space bigger than display port. + const spacer = content.document.createElement("div"); + spacer.style = "width: 100%; height: 10000px;"; + scroller.appendChild(spacer); + + const iframe = content.document.createElement("iframe"); + scroller.appendChild(iframe); + + iframe.contentWindow.location = url; + await new Promise(resolve => { + iframe.addEventListener("load", resolve, { once: true }); + }); + + return iframe.browsingContext; + } + + async function setupImage() { + const img = content.document.createElement("img"); + // This GIF is a 100ms interval animation. + img.setAttribute("src", "animated.gif"); + img.setAttribute("id", "img"); + content.document.body.appendChild(img); + + const spacer = content.document.createElement("div"); + spacer.style = "width: 100%; height: 10000px;"; + content.document.body.appendChild(spacer); + await new Promise(resolve => { + img.addEventListener("load", resolve, { once: true }); + }); + } + + // Returns the count of frameUpdate during |time| (in ms) period. + async function observeFrameUpdate(time) { + function ImageDecoderObserverStub() { + this.sizeAvailable = function sizeAvailable(aRequest) {}; + this.frameComplete = function frameComplete(aRequest) {}; + this.decodeComplete = function decodeComplete(aRequest) {}; + this.loadComplete = function loadComplete(aRequest) {}; + this.frameUpdate = function frameUpdate(aRequest) {}; + this.discard = function discard(aRequest) {}; + this.isAnimated = function isAnimated(aRequest) {}; + this.hasTransparency = function hasTransparency(aRequest) {}; + } + + // Start from the callback of setTimeout. + await new Promise(resolve => content.window.setTimeout(resolve, 0)); + + let frameCount = 0; + const observer = new ImageDecoderObserverStub(); + observer.frameUpdate = () => { + frameCount++; + }; + observer.loadComplete = () => { + // Ignore the frameUpdate callback along with loadComplete. It seems + // a frameUpdate sometimes happens with a loadComplete when attatching + // observer in fission world. + frameCount--; + }; + + const gObserver = SpecialPowers.Cc["@mozilla.org/image/tools;1"] + .getService(SpecialPowers.Ci.imgITools) + .createScriptedObserver(observer); + const img = content.document.getElementById("img"); + + SpecialPowers.wrap(img).addObserver(gObserver); + await new Promise(resolve => content.window.setTimeout(resolve, time)); + SpecialPowers.wrap(img).removeObserver(gObserver); + + return frameCount; + } + + // Setup an iframe which is initially scrolled out. + const iframe = await SpecialPowers.spawn(browser, [iframeURL], setup); + + // Setup a 100ms interval animated GIF image in the iframe. + await SpecialPowers.spawn(iframe, [], setupImage); + + let frameCount = await SpecialPowers.spawn( + iframe, + [1000], + observeFrameUpdate + ); + // Bug 1577084. + if (frameCount == 0) { + is(frameCount, 0, "no frameupdates"); + } else { + todo_is(frameCount, 0, "no frameupdates"); + } + + // Scroll the iframe into view. + await SpecialPowers.spawn(browser, [], async () => { + const scroller = content.document.getElementById("scroller"); + scroller.scrollTo({ left: 0, top: 9800, behavior: "smooth" }); + await new Promise(resolve => content.window.setTimeout(resolve, 1000)); + }); + + await new Promise(resolve => requestAnimationFrame(resolve)); + + frameCount = await SpecialPowers.spawn(iframe, [1000], observeFrameUpdate); + ok(frameCount > 0, "There should be frameUpdate(s)"); + + await new Promise(resolve => requestAnimationFrame(resolve)); + + await SpecialPowers.spawn(iframe, [], async () => { + const img = content.document.getElementById("img"); + // Move the image outside of the scroll port. 'position: absolute' causes + // a relow on the image element. + img.style = "position: absolute; top: 9000px;"; + await new Promise(resolve => + content.window.requestAnimationFrame(resolve) + ); + }); + + await new Promise(resolve => requestAnimationFrame(resolve)); + + frameCount = await SpecialPowers.spawn(iframe, [1000], observeFrameUpdate); + is(frameCount, 0, "No frameUpdate should happen"); + } finally { + await BrowserTestUtils.closeWindow(win); + } +}); diff --git a/image/test/browser/browser_sandbox_headless.toml b/image/test/browser/browser_sandbox_headless.toml new file mode 100644 index 0000000000..bf9517c3af --- /dev/null +++ b/image/test/browser/browser_sandbox_headless.toml @@ -0,0 +1,6 @@ +[DEFAULT] +support-files = ["head.js"] +prefs = ["security.sandbox.content.headless=true"] +run-if = ["os == 'linux'"] # the pref is only used on linux + +["browser_mozicon_file_sandbox_headless.js"] diff --git a/image/test/browser/empty.html b/image/test/browser/empty.html new file mode 100644 index 0000000000..a31dad3630 --- /dev/null +++ b/image/test/browser/empty.html @@ -0,0 +1,2 @@ + + diff --git a/image/test/browser/head.js b/image/test/browser/head.js new file mode 100644 index 0000000000..29fc67a1a7 --- /dev/null +++ b/image/test/browser/head.js @@ -0,0 +1,136 @@ +const RELATIVE_DIR = "image/test/browser/"; +const TESTROOT = "http://example.com/browser/" + RELATIVE_DIR; +const TESTROOT2 = "http://example.org/browser/" + RELATIVE_DIR; + +var chrome_root = getRootDirectory(gTestPath); +const CHROMEROOT = chrome_root; + +function getImageLoading(doc, id) { + return doc.getElementById(id); +} + +// Tries to get the Moz debug image, imgIContainerDebug. Only works +// in a debug build. If we succeed, we call func(). +function actOnMozImage(doc, id, func) { + var imgContainer = getImageLoading(doc, id).getRequest( + Ci.nsIImageLoadingContent.CURRENT_REQUEST + ).image; + var mozImage; + try { + mozImage = imgContainer.QueryInterface(Ci.imgIContainerDebug); + } catch (e) { + return false; + } + func(mozImage); + return true; +} + +function assertPrefVal(name, val) { + let boolValue = Services.prefs.getBoolPref(name); + ok(boolValue === val, `pref ${name} is set to ${val}`); + if (boolValue !== val) { + throw Error(`pref ${name} is not set to ${val}`); + } +} + +function assertFileProcess() { + // Ensure that the file content process is enabled. + assertPrefVal("browser.tabs.remote.separateFileUriProcess", true); +} + +function assertSandboxHeadless() { + assertPrefVal("security.sandbox.content.headless", true); +} + +function getPage() { + let filePage = undefined; + switch (Services.appinfo.OS) { + case "WINNT": + filePage = "file:///C:/"; + break; + case "Darwin": + filePage = "file:///tmp/"; + break; + case "Linux": + filePage = "file:///tmp/"; + break; + default: + throw new Error("Unsupported operating system"); + } + return filePage; +} + +function getSize() { + let iconSize = undefined; + switch (Services.appinfo.OS) { + case "WINNT": + iconSize = 32; + break; + case "Darwin": + iconSize = 128; + break; + case "Linux": + iconSize = 128; + break; + default: + throw new Error("Unsupported operating system"); + } + return iconSize; +} + +async function createMozIconInFile(ext, expectSuccess = true) { + const kPAGE = getPage(); + const kSize = expectSuccess ? getSize() : 24; // we get 24x24 when failing, + // e.g. when remoting is + // disabled and the sandbox + // headless is enabled + + // open a tab in a file content process + let fileTab = await BrowserTestUtils.addTab(gBrowser, kPAGE, { + preferredRemoteType: "file", + }); + + // get the browser for the file content process tab + let fileBrowser = gBrowser.getBrowserForTab(fileTab); + + let checkIcon = async (_ext, _kSize, _expectSuccess) => { + const img = content.document.createElement("img"); + let waitLoad = new Promise(resolve => { + // only listen to successfull load event if we expect the image to + // actually load, e.g. with remoting disabled and sandbox headless + // enabled we dont expect it to work, and we will wait for onerror below + // to trigger. + if (_expectSuccess) { + img.addEventListener("load", resolve, { once: true }); + } + img.onerror = () => { + // With remoting enabled, + // Verified to work by forcing early `return NS_ERROR_NOT_AVAILABLE;` + // within `nsIconChannel::GetIcon(nsIURI* aURI, ByteBuf* aDataOut)` + // + // With remoting disabled and sandbox headless enabled, this should be + // the default path, since we don't add the "load" event listener. + ok(!_expectSuccess, "Error while loading moz-icon"); + resolve(); + }; + }); + img.setAttribute("src", `moz-icon://.${_ext}?size=${_kSize}`); + img.setAttribute("id", `moz-icon-${_ext}-${_kSize}`); + content.document.body.appendChild(img); + + await waitLoad; + + const icon = content.document.getElementById(`moz-icon-${_ext}-${_kSize}`); + ok(icon !== null, `got a valid ${_ext} moz-icon`); + is(icon.width, _kSize, `${_kSize} px width ${_ext} moz-icon`); + is(icon.height, _kSize, `${_kSize} px height ${_ext} moz-icon`); + }; + + await BrowserTestUtils.browserLoaded(fileBrowser); + await SpecialPowers.spawn( + fileBrowser, + [ext, kSize, expectSuccess], + checkIcon + ); + await BrowserTestUtils.removeTab(fileTab); +} diff --git a/image/test/browser/helper1869938.html b/image/test/browser/helper1869938.html new file mode 100644 index 0000000000..3e13963c92 --- /dev/null +++ b/image/test/browser/helper1869938.html @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/image/test/browser/image.html b/image/test/browser/image.html new file mode 100644 index 0000000000..3831ab68a4 --- /dev/null +++ b/image/test/browser/image.html @@ -0,0 +1,23 @@ + + + + + Imagelib2 animation tests + + + + +

Page with image

+ +
+ + diff --git a/image/test/browser/imageX2.html b/image/test/browser/imageX2.html new file mode 100644 index 0000000000..4ce953bfac --- /dev/null +++ b/image/test/browser/imageX2.html @@ -0,0 +1,14 @@ + + + + + Imagelib2 animation tests + + +

Page with images

+ +
+ + + diff --git a/image/test/crashtests/1205923-1.html b/image/test/crashtests/1205923-1.html new file mode 100644 index 0000000000..456fc51b6e --- /dev/null +++ b/image/test/crashtests/1205923-1.html @@ -0,0 +1,36 @@ + + + + + + diff --git a/image/test/crashtests/1210745-1.gif b/image/test/crashtests/1210745-1.gif new file mode 100644 index 0000000000..92bcf72224 Binary files /dev/null and b/image/test/crashtests/1210745-1.gif differ diff --git a/image/test/crashtests/1212954-1.svg b/image/test/crashtests/1212954-1.svg new file mode 100644 index 0000000000..83dd7b9c7f --- /dev/null +++ b/image/test/crashtests/1212954-1.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + diff --git a/image/test/crashtests/1235605.gif b/image/test/crashtests/1235605.gif new file mode 100644 index 0000000000..e7c3ea0b87 Binary files /dev/null and b/image/test/crashtests/1235605.gif differ diff --git a/image/test/crashtests/1241728-1.html b/image/test/crashtests/1241728-1.html new file mode 100644 index 0000000000..126c02e624 --- /dev/null +++ b/image/test/crashtests/1241728-1.html @@ -0,0 +1,17 @@ + + + + + + + + \ No newline at end of file diff --git a/image/test/crashtests/1241729-1.bmp b/image/test/crashtests/1241729-1.bmp new file mode 100644 index 0000000000..e6f36d0398 Binary files /dev/null and b/image/test/crashtests/1241729-1.bmp differ diff --git a/image/test/crashtests/1241729-1.html b/image/test/crashtests/1241729-1.html new file mode 100644 index 0000000000..47f23134b4 --- /dev/null +++ b/image/test/crashtests/1241729-1.html @@ -0,0 +1,5 @@ + + + + + diff --git a/image/test/crashtests/1242093-1.html b/image/test/crashtests/1242093-1.html new file mode 100644 index 0000000000..3eab166efd --- /dev/null +++ b/image/test/crashtests/1242093-1.html @@ -0,0 +1,22 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/image/test/crashtests/1242778-1.png b/image/test/crashtests/1242778-1.png new file mode 100644 index 0000000000..4504d54e45 Binary files /dev/null and b/image/test/crashtests/1242778-1.png differ diff --git a/image/test/crashtests/1249576-1.png b/image/test/crashtests/1249576-1.png new file mode 100644 index 0000000000..637dafbc2b Binary files /dev/null and b/image/test/crashtests/1249576-1.png differ diff --git a/image/test/crashtests/1251091-1.html b/image/test/crashtests/1251091-1.html new file mode 100644 index 0000000000..520a393b43 --- /dev/null +++ b/image/test/crashtests/1251091-1.html @@ -0,0 +1,51 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/image/test/crashtests/1251091-1.png b/image/test/crashtests/1251091-1.png new file mode 100644 index 0000000000..078b19a569 Binary files /dev/null and b/image/test/crashtests/1251091-1.png differ diff --git a/image/test/crashtests/1253362-1.html b/image/test/crashtests/1253362-1.html new file mode 100644 index 0000000000..fdee850aab --- /dev/null +++ b/image/test/crashtests/1253362-1.html @@ -0,0 +1,11 @@ + + + + + + + +
+ + + diff --git a/image/test/crashtests/1262549-1.gif b/image/test/crashtests/1262549-1.gif new file mode 100644 index 0000000000..7cb2e769d2 Binary files /dev/null and b/image/test/crashtests/1262549-1.gif differ diff --git a/image/test/crashtests/1277397-1.jpg b/image/test/crashtests/1277397-1.jpg new file mode 100644 index 0000000000..54f21182b6 Binary files /dev/null and b/image/test/crashtests/1277397-1.jpg differ diff --git a/image/test/crashtests/1277397-2.jpg b/image/test/crashtests/1277397-2.jpg new file mode 100644 index 0000000000..f9fc8744e8 Binary files /dev/null and b/image/test/crashtests/1277397-2.jpg differ diff --git a/image/test/crashtests/1355898-1.html b/image/test/crashtests/1355898-1.html new file mode 100644 index 0000000000..2df55b34ac --- /dev/null +++ b/image/test/crashtests/1355898-1.html @@ -0,0 +1,45 @@ + + + + + + + + + Your browser doesn't appear to support the <canvas> element. + + + \ No newline at end of file diff --git a/image/test/crashtests/1375842-1.html b/image/test/crashtests/1375842-1.html new file mode 100644 index 0000000000..457966a1b9 --- /dev/null +++ b/image/test/crashtests/1375842-1.html @@ -0,0 +1,16 @@ + + + + + + + + + + + diff --git a/image/test/crashtests/1413762-1.gif b/image/test/crashtests/1413762-1.gif new file mode 100644 index 0000000000..5dd10b8f25 Binary files /dev/null and b/image/test/crashtests/1413762-1.gif differ diff --git a/image/test/crashtests/1443232-1.gif b/image/test/crashtests/1443232-1.gif new file mode 100644 index 0000000000..198519e7c0 Binary files /dev/null and b/image/test/crashtests/1443232-1.gif differ diff --git a/image/test/crashtests/1443232-1.html b/image/test/crashtests/1443232-1.html new file mode 100644 index 0000000000..a7302e9e16 --- /dev/null +++ b/image/test/crashtests/1443232-1.html @@ -0,0 +1,30 @@ + + + +
+ + + diff --git a/image/test/crashtests/1509998.gif b/image/test/crashtests/1509998.gif new file mode 100644 index 0000000000..05b141ba5f Binary files /dev/null and b/image/test/crashtests/1509998.gif differ diff --git a/image/test/crashtests/1526717-1.html b/image/test/crashtests/1526717-1.html new file mode 100644 index 0000000000..b120340416 --- /dev/null +++ b/image/test/crashtests/1526717-1.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/image/test/crashtests/1526717-1.png b/image/test/crashtests/1526717-1.png new file mode 100644 index 0000000000..5ac5b32744 Binary files /dev/null and b/image/test/crashtests/1526717-1.png differ diff --git a/image/test/crashtests/1629490-1-iframe.html b/image/test/crashtests/1629490-1-iframe.html new file mode 100644 index 0000000000..2d20e28eed --- /dev/null +++ b/image/test/crashtests/1629490-1-iframe.html @@ -0,0 +1 @@ + diff --git a/image/test/crashtests/1629490-1.html b/image/test/crashtests/1629490-1.html new file mode 100644 index 0000000000..f35568ca4e --- /dev/null +++ b/image/test/crashtests/1629490-1.html @@ -0,0 +1,49 @@ + + + + + +
+ +
+ + + + diff --git a/image/test/crashtests/1634839-1-iframe.html b/image/test/crashtests/1634839-1-iframe.html new file mode 100644 index 0000000000..07c1b6545e --- /dev/null +++ b/image/test/crashtests/1634839-1-iframe.html @@ -0,0 +1 @@ + diff --git a/image/test/crashtests/1634839-1.html b/image/test/crashtests/1634839-1.html new file mode 100644 index 0000000000..865f83645f --- /dev/null +++ b/image/test/crashtests/1634839-1.html @@ -0,0 +1,51 @@ + + + + + +
+ +
+ + + + diff --git a/image/test/crashtests/1634839-2-iframe.html b/image/test/crashtests/1634839-2-iframe.html new file mode 100644 index 0000000000..6907844499 --- /dev/null +++ b/image/test/crashtests/1634839-2-iframe.html @@ -0,0 +1 @@ + diff --git a/image/test/crashtests/1634839-2.html b/image/test/crashtests/1634839-2.html new file mode 100644 index 0000000000..d3629421fb --- /dev/null +++ b/image/test/crashtests/1634839-2.html @@ -0,0 +1,51 @@ + + + + + +
+ +
+ + + + diff --git a/image/test/crashtests/1676172-1-iframe.html b/image/test/crashtests/1676172-1-iframe.html new file mode 100644 index 0000000000..c989c579bb --- /dev/null +++ b/image/test/crashtests/1676172-1-iframe.html @@ -0,0 +1,13 @@ + + + + + diff --git a/image/test/crashtests/1676172-1.gif b/image/test/crashtests/1676172-1.gif new file mode 100644 index 0000000000..c5635218d5 Binary files /dev/null and b/image/test/crashtests/1676172-1.gif differ diff --git a/image/test/crashtests/1676172-1.html b/image/test/crashtests/1676172-1.html new file mode 100644 index 0000000000..08374a4772 --- /dev/null +++ b/image/test/crashtests/1676172-1.html @@ -0,0 +1,57 @@ + + + + + + + + + diff --git a/image/test/crashtests/1763581-1-iframe.html b/image/test/crashtests/1763581-1-iframe.html new file mode 100644 index 0000000000..6064183b9e --- /dev/null +++ b/image/test/crashtests/1763581-1-iframe.html @@ -0,0 +1,15 @@ + + + + + + + + + diff --git a/image/test/crashtests/1763581-1.gif b/image/test/crashtests/1763581-1.gif new file mode 100644 index 0000000000..237d6a1722 Binary files /dev/null and b/image/test/crashtests/1763581-1.gif differ diff --git a/image/test/crashtests/1763581-1.html b/image/test/crashtests/1763581-1.html new file mode 100644 index 0000000000..167f541a24 --- /dev/null +++ b/image/test/crashtests/1763581-1.html @@ -0,0 +1,28 @@ + + + + + + + + + + diff --git a/image/test/crashtests/1763581-1.sjs b/image/test/crashtests/1763581-1.sjs new file mode 100644 index 0000000000..9fb70dd463 --- /dev/null +++ b/image/test/crashtests/1763581-1.sjs @@ -0,0 +1,71 @@ + +function getFileStream(filename) +{ + // Get the location of this sjs file, and then use that to figure out where + // to find where our other files are. + var self = Components.classes["@mozilla.org/file/local;1"] + .createInstance(Components.interfaces.nsIFile); + self.initWithPath(getState("__LOCATION__")); + var file = self.parent; + file.append(filename); + + var fileStream = Components.classes['@mozilla.org/network/file-input-stream;1'] + .createInstance(Components.interfaces.nsIFileInputStream); + fileStream.init(file, 1, 0, false); + + return fileStream; +} + +// stolen from file_blocked_script.sjs +function setGlobalState(data, key) { + x = { + data, + QueryInterface: ChromeUtils.generateQI([]), + }; + x.wrappedJSObject = x; + setObjectState(key, x); +} + +function getGlobalState(key) { + var data; + getObjectState(key, function(x) { + data = x && x.wrappedJSObject.data; + }); + return data; +} + +const DELAY_MS = 100; +let gTimer; + +function handleRequest(request, response) { + let count = getGlobalState("count"); + if (count == null) { + count = 0; + } + + if (count > 0) { + response.processAsync(); + + gTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); + gTimer.init( + () => { + response.setStatusLine(request.httpVersion, 304, "Not Modified"); + response.finish(); + }, + DELAY_MS, + Ci.nsITimer.TYPE_ONE_SHOT + ); + + return; + } + + response.setStatusLine(request.httpVersion, 200, "OK"); + response.setHeader("Content-Type", "image/gif", false); + + var inputStream = getFileStream("1763581-1.gif"); + response.bodyOutputStream.writeFrom(inputStream, inputStream.available()); + inputStream.close(); + + count++; + setGlobalState(count, "count"); +} diff --git a/image/test/crashtests/1765871-1.jpg b/image/test/crashtests/1765871-1.jpg new file mode 100644 index 0000000000..11460a62c3 Binary files /dev/null and b/image/test/crashtests/1765871-1.jpg differ diff --git a/image/test/crashtests/1814553.avif b/image/test/crashtests/1814553.avif new file mode 100644 index 0000000000..7e2f040c53 Binary files /dev/null and b/image/test/crashtests/1814553.avif differ diff --git a/image/test/crashtests/1814561.avif b/image/test/crashtests/1814561.avif new file mode 100644 index 0000000000..33ad44d2a3 Binary files /dev/null and b/image/test/crashtests/1814561.avif differ diff --git a/image/test/crashtests/1814677.avif b/image/test/crashtests/1814677.avif new file mode 100644 index 0000000000..b91d4f955b Binary files /dev/null and b/image/test/crashtests/1814677.avif differ diff --git a/image/test/crashtests/1814708.avif b/image/test/crashtests/1814708.avif new file mode 100644 index 0000000000..21a39cfa4d Binary files /dev/null and b/image/test/crashtests/1814708.avif differ diff --git a/image/test/crashtests/1814741.avif b/image/test/crashtests/1814741.avif new file mode 100644 index 0000000000..842eaea1c1 Binary files /dev/null and b/image/test/crashtests/1814741.avif differ diff --git a/image/test/crashtests/1814774.avif b/image/test/crashtests/1814774.avif new file mode 100644 index 0000000000..77ffba7af2 Binary files /dev/null and b/image/test/crashtests/1814774.avif differ diff --git a/image/test/crashtests/1817108.avif b/image/test/crashtests/1817108.avif new file mode 100644 index 0000000000..a06b923ee4 Binary files /dev/null and b/image/test/crashtests/1817108.avif differ diff --git a/image/test/crashtests/1848717-1.avif b/image/test/crashtests/1848717-1.avif new file mode 100644 index 0000000000..10c9eb26f8 Binary files /dev/null and b/image/test/crashtests/1848717-1.avif differ diff --git a/image/test/crashtests/1852649.webp b/image/test/crashtests/1852649.webp new file mode 100644 index 0000000000..2d702587b6 Binary files /dev/null and b/image/test/crashtests/1852649.webp differ diff --git a/image/test/crashtests/1862059-1.html b/image/test/crashtests/1862059-1.html new file mode 100644 index 0000000000..75aec190af --- /dev/null +++ b/image/test/crashtests/1862059-1.html @@ -0,0 +1,15 @@ + + + + diff --git a/image/test/crashtests/1862059-1.svg b/image/test/crashtests/1862059-1.svg new file mode 100644 index 0000000000..af025a1d18 --- /dev/null +++ b/image/test/crashtests/1862059-1.svg @@ -0,0 +1,43 @@ +--BOUNDARYOMG +Content-Type: image/svg+xml; charset=utf-8 + +--BOUNDARYOMG +Content-Type: image/svg+xml; charset=utf-8 + +--BOUNDARYOMG +Content-Type: image/svg+xml; charset=utf-8 + +--BOUNDARYOMG +Content-Type: image/svg+xml; charset=utf-8 + +--BOUNDARYOMG +Content-Type: image/svg+xml; charset=utf-8 + +--BOUNDARYOMG +Content-Type: image/svg+xml; charset=utf-8 + +--BOUNDARYOMG +Content-Type: image/svg+xml; charset=utf-8 + +--BOUNDARYOMG +Content-Type: image/svg+xml; charset=utf-8 + +--BOUNDARYOMG +Content-Type: image/svg+xml; charset=utf-8 + +--BOUNDARYOMG +Content-Type: image/svg+xml; charset=utf-8 + +--BOUNDARYOMG +Content-Type: image/svg+xml; charset=utf-8 + +--BOUNDARYOMG +Content-Type: image/svg+xml; charset=utf-8 + +--BOUNDARYOMG +Content-Type: image/svg+xml; charset=utf-8 + +--BOUNDARYOMG +Content-Type: image/svg+xml; charset=utf-8 + + \ No newline at end of file diff --git a/image/test/crashtests/1862059-1.svg^headers^ b/image/test/crashtests/1862059-1.svg^headers^ new file mode 100644 index 0000000000..f5e846508e --- /dev/null +++ b/image/test/crashtests/1862059-1.svg^headers^ @@ -0,0 +1,3 @@ +HTTP 200 OK +Content-Type: multipart/x-mixed-replace;boundary=BOUNDARYOMG +Cache-Control: no-cache diff --git a/image/test/crashtests/256-height.ico b/image/test/crashtests/256-height.ico new file mode 100644 index 0000000000..6a3c5c1944 Binary files /dev/null and b/image/test/crashtests/256-height.ico differ diff --git a/image/test/crashtests/256-width.ico b/image/test/crashtests/256-width.ico new file mode 100644 index 0000000000..a82983ce4f Binary files /dev/null and b/image/test/crashtests/256-width.ico differ diff --git a/image/test/crashtests/463696.bmp b/image/test/crashtests/463696.bmp new file mode 100644 index 0000000000..ec80d54126 Binary files /dev/null and b/image/test/crashtests/463696.bmp differ diff --git a/image/test/crashtests/523528-1.gif b/image/test/crashtests/523528-1.gif new file mode 100644 index 0000000000..abadca7ad2 Binary files /dev/null and b/image/test/crashtests/523528-1.gif differ diff --git a/image/test/crashtests/523528-2.gif b/image/test/crashtests/523528-2.gif new file mode 100644 index 0000000000..5be3bd46f6 Binary files /dev/null and b/image/test/crashtests/523528-2.gif differ diff --git a/image/test/crashtests/570451.png b/image/test/crashtests/570451.png new file mode 100644 index 0000000000..c49f2d11f1 Binary files /dev/null and b/image/test/crashtests/570451.png differ diff --git a/image/test/crashtests/694165-1.xhtml b/image/test/crashtests/694165-1.xhtml new file mode 100644 index 0000000000..1e340a0f2f --- /dev/null +++ b/image/test/crashtests/694165-1.xhtml @@ -0,0 +1,510 @@ + + +]> + + + + diff --git a/image/test/crashtests/732319-1.html b/image/test/crashtests/732319-1.html new file mode 100644 index 0000000000..b9d9c6de87 --- /dev/null +++ b/image/test/crashtests/732319-1.html @@ -0,0 +1,2 @@ + + diff --git a/image/test/crashtests/83804-1.gif b/image/test/crashtests/83804-1.gif new file mode 100644 index 0000000000..3967c703f6 Binary files /dev/null and b/image/test/crashtests/83804-1.gif differ diff --git a/image/test/crashtests/844403-1.html b/image/test/crashtests/844403-1.html new file mode 100644 index 0000000000..ef207c0f9f --- /dev/null +++ b/image/test/crashtests/844403-1.html @@ -0,0 +1,10 @@ + + + diff --git a/image/test/crashtests/856616.gif b/image/test/crashtests/856616.gif new file mode 100644 index 0000000000..0fac811014 Binary files /dev/null and b/image/test/crashtests/856616.gif differ diff --git a/image/test/crashtests/89341-1.gif b/image/test/crashtests/89341-1.gif new file mode 100644 index 0000000000..14b3892d17 Binary files /dev/null and b/image/test/crashtests/89341-1.gif differ diff --git a/image/test/crashtests/944353.jpg b/image/test/crashtests/944353.jpg new file mode 100644 index 0000000000..fd81c58263 Binary files /dev/null and b/image/test/crashtests/944353.jpg differ diff --git a/image/test/crashtests/colormap-range.gif b/image/test/crashtests/colormap-range.gif new file mode 100644 index 0000000000..887add653f Binary files /dev/null and b/image/test/crashtests/colormap-range.gif differ diff --git a/image/test/crashtests/crashtests.list b/image/test/crashtests/crashtests.list new file mode 100644 index 0000000000..93dec82954 --- /dev/null +++ b/image/test/crashtests/crashtests.list @@ -0,0 +1,83 @@ +# Bug 668068 - Maximum (256) width and height icons that we currently interpret as 0-width and 0-height. +load 256-height.ico +load 256-width.ico + +load 83804-1.gif +load 89341-1.gif +load 463696.bmp +load 570451.png +# Bug 1390704 - Skip on debug because it triggers a quadratic behavior that makes it take +# so much time that it can trip on the reftest timeout of 5 minutes. +skip-if(Android||isDebugBuild||ThreadSanitizer) load 694165-1.xhtml +load 732319-1.html +load 844403-1.html +load 856616.gif +skip-if(wayland&&isDebugBuild) skip-if(ThreadSanitizer) load 944353.jpg # wayland: bug 1857023 +load 1205923-1.html +# Ensure we handle detecting that an image is animated, then failing to decode +# it. (See bug 1210745.) +load 1210745-1.gif +load 1212954-1.svg +load 1235605.gif +load 1241728-1.html +load 1241729-1.html +load 1242093-1.html +load 1242778-1.png +load 1249576-1.png +load 1253362-1.html +skip-if(Android&&browserIsRemote) load 1355898-1.html # bug 1507207 +load 1375842-1.html +load 1413762-1.gif +pref(image.downscale-during-decode.enabled,true) load 1443232-1.html +load colormap-range.gif +HTTP load delayedframe.sjs # A 3-frame animated GIF with an inordinate delay between the second and third frame + +# Animated gifs with a very large canvas, but tiny actual content. +load delaytest.html?523528-1.gif +load delaytest.html?523528-2.gif + +load delaytest.html?1262549-1.gif +load delaytest.html?1277397-1.jpg +load delaytest.html?1277397-2.jpg + +# Bug 1160801 - Ensure that we handle invalid disposal types. +load invalid-disposal-method-1.gif +load invalid-disposal-method-2.gif +load invalid-disposal-method-3.gif + +load invalid-icc-profile.jpg # This would have exposed the leak discovered in bug 642902 + +# Ensure we handle ICO directory entries which specify the wrong size for the contained resource. +load invalid_ico_height.ico +load invalid_ico_width.ico + +# Bug 525326 - Test image sizes of 65535x65535 which is larger than we allow) +load invalid-size.gif +load invalid-size-second-frame.gif + +load multiple-png-hassize.ico # Bug 863958 - This icon's size is such that it leads to multiple writes to the PNG decoder after we've gotten our size. +skip-if(ThreadSanitizer) asserts(0-2) load ownerdiscard.html # Bug 1323672, bug 807211 +load truncated-second-frame.png # Bug 863975 + +# Bug 1509998 - Ensure that we handle empty frame rects in animated images. +load 1509998.gif + +load 1526717-1.html +skip-if(ThreadSanitizer) pref(widget.windows.window_occlusion_tracking.enabled,false) load 1629490-1.html # Bug 1819154 + +pref(widget.windows.window_occlusion_tracking.enabled,false) HTTP load 1634839-1.html # Bug 1819154 +pref(widget.windows.window_occlusion_tracking.enabled,false) HTTP load 1634839-2.html # Bug 1819154 +pref(image.animated.decode-on-demand.batch-size,1) pref(image.animated.decode-on-demand.threshold-kb,0) HTTP load 1676172-1.html +pref(browser.soft_reload.only_force_validate_top_level_document,false) HTTP load 1763581-1.html +load 1765871-1.jpg + +load 1814561.avif +load 1814708.avif +load 1814553.avif +load 1814677.avif +load 1814741.avif +load 1814774.avif +load 1817108.avif +load 1848717-1.avif +load 1852649.webp +pref(widget.windows.window_occlusion_tracking.enabled,false) HTTP load 1862059-1.html diff --git a/image/test/crashtests/delayedframe.sjs b/image/test/crashtests/delayedframe.sjs new file mode 100644 index 0000000000..0cd7ce97e9 --- /dev/null +++ b/image/test/crashtests/delayedframe.sjs @@ -0,0 +1,44 @@ +function getFileStream(filename) +{ + // Get the location of this sjs file, and then use that to figure out where + // to find where our other files are. + var self = Components.classes["@mozilla.org/file/local;1"] + .createInstance(Components.interfaces.nsIFile); + self.initWithPath(getState("__LOCATION__")); + var file = self.parent; + file.append(filename); + dump(file.path + "\n"); + + var fileStream = Components.classes['@mozilla.org/network/file-input-stream;1'] + .createInstance(Components.interfaces.nsIFileInputStream); + fileStream.init(file, 1, 0, false); + + return fileStream; +} + +var gTimer; + +function handleRequest(request, response) +{ + response.processAsync(); + response.setStatusLine(request.httpVersion, 200, "OK"); + response.setHeader("Content-Type", "image/gif", false); + + var firststream = getFileStream("threeframes-start.gif"); + response.bodyOutputStream.writeFrom(firststream, firststream.available()) + firststream.close(); + + gTimer = Components.classes["@mozilla.org/timer;1"].createInstance(Components.interfaces.nsITimer); + gTimer.initWithCallback(function() + { + var secondstream = getFileStream("threeframes-end.gif"); + response.bodyOutputStream.writeFrom(secondstream, secondstream.available()) + secondstream.close(); + response.finish(); + + // This time needs to be longer than the animation timer in + // threeframes-start.gif. That's specified as 100ms; just use 5 seconds as + // a reasonable upper bound. Since this is just a crashtest, timeouts + // aren't a big deal. + }, 5 * 1000 /* milliseconds */, Components.interfaces.nsITimer.TYPE_ONE_SHOT); +} diff --git a/image/test/crashtests/delaytest.html b/image/test/crashtests/delaytest.html new file mode 100644 index 0000000000..fb368c1e90 --- /dev/null +++ b/image/test/crashtests/delaytest.html @@ -0,0 +1,59 @@ + + + +Delayed image reftest wrapper + + + + + + + diff --git a/image/test/crashtests/discardframe.htm b/image/test/crashtests/discardframe.htm new file mode 100644 index 0000000000..5ced0029c5 --- /dev/null +++ b/image/test/crashtests/discardframe.htm @@ -0,0 +1 @@ + diff --git a/image/test/crashtests/finite-apng.png b/image/test/crashtests/finite-apng.png new file mode 100644 index 0000000000..778613d851 Binary files /dev/null and b/image/test/crashtests/finite-apng.png differ diff --git a/image/test/crashtests/ie.png b/image/test/crashtests/ie.png new file mode 100644 index 0000000000..74c4a1a323 Binary files /dev/null and b/image/test/crashtests/ie.png differ diff --git a/image/test/crashtests/invalid-disposal-method-1.gif b/image/test/crashtests/invalid-disposal-method-1.gif new file mode 100644 index 0000000000..30c61de188 Binary files /dev/null and b/image/test/crashtests/invalid-disposal-method-1.gif differ diff --git a/image/test/crashtests/invalid-disposal-method-2.gif b/image/test/crashtests/invalid-disposal-method-2.gif new file mode 100644 index 0000000000..66158d81a9 Binary files /dev/null and b/image/test/crashtests/invalid-disposal-method-2.gif differ diff --git a/image/test/crashtests/invalid-disposal-method-3.gif b/image/test/crashtests/invalid-disposal-method-3.gif new file mode 100644 index 0000000000..0da0723773 Binary files /dev/null and b/image/test/crashtests/invalid-disposal-method-3.gif differ diff --git a/image/test/crashtests/invalid-icc-profile.jpg b/image/test/crashtests/invalid-icc-profile.jpg new file mode 100644 index 0000000000..938c7713ce Binary files /dev/null and b/image/test/crashtests/invalid-icc-profile.jpg differ diff --git a/image/test/crashtests/invalid-size-second-frame.gif b/image/test/crashtests/invalid-size-second-frame.gif new file mode 100644 index 0000000000..22005ae4ca Binary files /dev/null and b/image/test/crashtests/invalid-size-second-frame.gif differ diff --git a/image/test/crashtests/invalid-size.gif b/image/test/crashtests/invalid-size.gif new file mode 100644 index 0000000000..665ca9b5dc Binary files /dev/null and b/image/test/crashtests/invalid-size.gif differ diff --git a/image/test/crashtests/invalid_ico_height.ico b/image/test/crashtests/invalid_ico_height.ico new file mode 100644 index 0000000000..50d6842278 Binary files /dev/null and b/image/test/crashtests/invalid_ico_height.ico differ diff --git a/image/test/crashtests/invalid_ico_width.ico b/image/test/crashtests/invalid_ico_width.ico new file mode 100644 index 0000000000..4ace07c16f Binary files /dev/null and b/image/test/crashtests/invalid_ico_width.ico differ diff --git a/image/test/crashtests/multiple-png-hassize.ico b/image/test/crashtests/multiple-png-hassize.ico new file mode 100644 index 0000000000..6944220018 Binary files /dev/null and b/image/test/crashtests/multiple-png-hassize.ico differ diff --git a/image/test/crashtests/out2.gif b/image/test/crashtests/out2.gif new file mode 100644 index 0000000000..f062c7f20c Binary files /dev/null and b/image/test/crashtests/out2.gif differ diff --git a/image/test/crashtests/ownerdiscard.html b/image/test/crashtests/ownerdiscard.html new file mode 100644 index 0000000000..2e5be86023 --- /dev/null +++ b/image/test/crashtests/ownerdiscard.html @@ -0,0 +1,48 @@ + + + +
+ + +
+ + + diff --git a/image/test/crashtests/rainbow.gif b/image/test/crashtests/rainbow.gif new file mode 100644 index 0000000000..72a7816928 Binary files /dev/null and b/image/test/crashtests/rainbow.gif differ diff --git a/image/test/crashtests/threeframes-end.gif b/image/test/crashtests/threeframes-end.gif new file mode 100644 index 0000000000..baf6a418c2 Binary files /dev/null and b/image/test/crashtests/threeframes-end.gif differ diff --git a/image/test/crashtests/threeframes-start.gif b/image/test/crashtests/threeframes-start.gif new file mode 100644 index 0000000000..bc641a3166 Binary files /dev/null and b/image/test/crashtests/threeframes-start.gif differ diff --git a/image/test/crashtests/truncated-second-frame.png b/image/test/crashtests/truncated-second-frame.png new file mode 100644 index 0000000000..0aef5e44de Binary files /dev/null and b/image/test/crashtests/truncated-second-frame.png differ diff --git a/image/test/crashtests/unsized-svg.svg b/image/test/crashtests/unsized-svg.svg new file mode 100644 index 0000000000..714efc7ef0 --- /dev/null +++ b/image/test/crashtests/unsized-svg.svg @@ -0,0 +1 @@ + diff --git a/image/test/fuzzing/TestDecoders.cpp b/image/test/fuzzing/TestDecoders.cpp new file mode 100644 index 0000000000..c5c0dcdb27 --- /dev/null +++ b/image/test/fuzzing/TestDecoders.cpp @@ -0,0 +1,181 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "gtest/gtest.h" + +#include "Common.h" +#include "imgIContainer.h" +#include "imgITools.h" +#include "ImageOps.h" +#include "mozilla/gfx/2D.h" +#include "mozilla/Preferences.h" +#include "nsComponentManagerUtils.h" +#include "nsCOMPtr.h" +#include "nsIInputStream.h" +#include "nsIRunnable.h" +#include "nsIThread.h" +#include "mozilla/RefPtr.h" +#include "nsString.h" +#include "nsThreadUtils.h" + +#include "FuzzingInterfaceStream.h" + +using namespace mozilla; +using namespace mozilla::gfx; +using namespace mozilla::image; + +// Prevents x being optimized away if it has no side-effects. +// If optimized away, tools like ASan wouldn't be able to detect +// faulty memory accesses. +#define DUMMY_IF(x) \ + if (x) { \ + volatile int v; \ + v = 0; \ + (void)v; \ + } + +class DecodeToSurfaceRunnableFuzzing : public Runnable { + public: + DecodeToSurfaceRunnableFuzzing(RefPtr& aSurface, + nsIInputStream* aInputStream, + const char* mimeType) + : mozilla::Runnable("DecodeToSurfaceRunnableFuzzing"), + mSurface(aSurface), + mInputStream(aInputStream), + mMimeType(mimeType) {} + + NS_IMETHOD Run() override { + Go(); + return NS_OK; + } + + void Go() { + mSurface = ImageOps::DecodeToSurface(mInputStream.forget(), mMimeType, + imgIContainer::DECODE_FLAGS_DEFAULT); + if (!mSurface) return; + + if (mSurface->GetType() == SurfaceType::DATA) { + if (mSurface->GetFormat() == SurfaceFormat::OS_RGBX || + mSurface->GetFormat() == SurfaceFormat::OS_RGBA) { + DUMMY_IF(IntSize(1, 1) == mSurface->GetSize()); + DUMMY_IF(IsSolidColor(mSurface, BGRAColor::Green(), 1)); + } + } + } + + private: + RefPtr& mSurface; + nsCOMPtr mInputStream; + nsAutoCString mMimeType; +}; + +static int RunDecodeToSurfaceFuzzing(nsCOMPtr inputStream, + const char* mimeType) { + uint64_t len; + inputStream->Available(&len); + if (len <= 0) { + return 0; + } + + // Ensure CMS state is initialized on the main thread. + gfxPlatform::GetCMSMode(); + + nsCOMPtr thread; + nsresult rv = + NS_NewNamedThread("Decoder Test", getter_AddRefs(thread), nullptr); + MOZ_RELEASE_ASSERT(NS_SUCCEEDED(rv)); + + // We run the DecodeToSurface tests off-main-thread to ensure that + // DecodeToSurface doesn't require any other main-thread-only code. + RefPtr surface; + nsCOMPtr runnable = + new DecodeToSurfaceRunnableFuzzing(surface, inputStream, mimeType); + NS_DispatchAndSpinEventLoopUntilComplete("RunDecodeToSurfaceFuzzing"_ns, + thread, runnable.forget()); + + thread->Shutdown(); + + // Explicitly release the SourceSurface on the main thread. + surface = nullptr; + + return 0; +} + +static int RunDecodeToSurfaceFuzzingJPEG(nsCOMPtr inputStream) { + return RunDecodeToSurfaceFuzzing(inputStream, "image/jpeg"); +} + +static int RunDecodeToSurfaceFuzzingGIF(nsCOMPtr inputStream) { + return RunDecodeToSurfaceFuzzing(inputStream, "image/gif"); +} + +static int RunDecodeToSurfaceFuzzingICO(nsCOMPtr inputStream) { + return RunDecodeToSurfaceFuzzing(inputStream, "image/ico"); +} + +static int RunDecodeToSurfaceFuzzingBMP(nsCOMPtr inputStream) { + return RunDecodeToSurfaceFuzzing(inputStream, "image/bmp"); +} + +static int RunDecodeToSurfaceFuzzingPNG(nsCOMPtr inputStream) { + return RunDecodeToSurfaceFuzzing(inputStream, "image/png"); +} + +static int RunDecodeToSurfaceFuzzingWebP(nsCOMPtr inputStream) { + return RunDecodeToSurfaceFuzzing(inputStream, "image/webp"); +} + +static int RunDecodeToSurfaceFuzzingAVIF(nsCOMPtr inputStream) { + return RunDecodeToSurfaceFuzzing(inputStream, "image/avif"); +} + +#ifdef MOZ_JXL +static int RunDecodeToSurfaceFuzzingJXL(nsCOMPtr inputStream) { + return RunDecodeToSurfaceFuzzing(inputStream, "image/jxl"); +} +#endif + +int FuzzingInitImage(int* argc, char*** argv) { + Preferences::SetBool("image.avif.sequence.enabled", true); + Preferences::SetBool("image.mem.max_legal_imgframe_size_kb", 65536); +#ifdef MOZ_JXL + Preferences::SetBool("image.jxl.enabled", true); +#endif + + nsCOMPtr imgTools = + do_CreateInstance("@mozilla.org/image/tools;1"); + if (imgTools == nullptr) { + std::cerr << "Initializing image tools failed" << std::endl; + return 1; + } + + return 0; +} + +MOZ_FUZZING_INTERFACE_STREAM(FuzzingInitImage, RunDecodeToSurfaceFuzzingJPEG, + ImageJPEG); + +MOZ_FUZZING_INTERFACE_STREAM(FuzzingInitImage, RunDecodeToSurfaceFuzzingGIF, + ImageGIF); + +MOZ_FUZZING_INTERFACE_STREAM(FuzzingInitImage, RunDecodeToSurfaceFuzzingICO, + ImageICO); + +MOZ_FUZZING_INTERFACE_STREAM(FuzzingInitImage, RunDecodeToSurfaceFuzzingBMP, + ImageBMP); + +MOZ_FUZZING_INTERFACE_STREAM(FuzzingInitImage, RunDecodeToSurfaceFuzzingPNG, + ImagePNG); + +MOZ_FUZZING_INTERFACE_STREAM(FuzzingInitImage, RunDecodeToSurfaceFuzzingWebP, + ImageWebP); + +MOZ_FUZZING_INTERFACE_STREAM(FuzzingInitImage, RunDecodeToSurfaceFuzzingAVIF, + ImageAVIF); + +#ifdef MOZ_JXL +MOZ_FUZZING_INTERFACE_STREAM(FuzzingInitImage, RunDecodeToSurfaceFuzzingJXL, + ImageJXL); +#endif diff --git a/image/test/fuzzing/moz.build b/image/test/fuzzing/moz.build new file mode 100644 index 0000000000..24af56396f --- /dev/null +++ b/image/test/fuzzing/moz.build @@ -0,0 +1,24 @@ +# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +Library("FuzzingImage") + +SOURCES += [ + "TestDecoders.cpp", +] + +FINAL_LIBRARY = "xul-gtest" + +include("/ipc/chromium/chromium-config.mozbuild") + +LOCAL_INCLUDES += [ + "/dom/base", + "/gfx/2d", + "/image", + "/image/test/gtest", +] + +LOCAL_INCLUDES += CONFIG["SKIA_INCLUDES"] diff --git a/image/test/gtest/Common.cpp b/image/test/gtest/Common.cpp new file mode 100644 index 0000000000..c3eaaebefc --- /dev/null +++ b/image/test/gtest/Common.cpp @@ -0,0 +1,1072 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "Common.h" + +#include + +#include "gfxPlatform.h" + +#include "ImageFactory.h" +#include "imgITools.h" +#include "mozilla/Preferences.h" +#include "nsComponentManagerUtils.h" +#include "nsDirectoryServiceDefs.h" +#include "nsIFile.h" +#include "nsIInputStream.h" +#include "nsIProperties.h" +#include "nsNetUtil.h" +#include "mozilla/RefPtr.h" +#include "nsStreamUtils.h" +#include "nsString.h" + +namespace mozilla { +namespace image { + +using namespace gfx; + +using std::vector; + +static bool sImageLibInitialized = false; + +AutoInitializeImageLib::AutoInitializeImageLib() { + if (MOZ_LIKELY(sImageLibInitialized)) { + return; + } + + EXPECT_TRUE(NS_IsMainThread()); + sImageLibInitialized = true; + + // Ensure AVIF is enabled to run decoder tests. + nsresult rv = Preferences::SetBool("image.avif.enabled", true); + EXPECT_TRUE(rv == NS_OK); + rv = Preferences::SetBool("image.avif.sequence.enabled", true); + EXPECT_TRUE(rv == NS_OK); + +#ifdef MOZ_JXL + // Ensure JXL is enabled to run decoder tests. + rv = Preferences::SetBool("image.jxl.enabled", true); + EXPECT_TRUE(rv == NS_OK); +#endif + + // Ensure that ImageLib services are initialized. + nsCOMPtr imgTools = + do_CreateInstance("@mozilla.org/image/tools;1"); + EXPECT_TRUE(imgTools != nullptr); + + // Ensure gfxPlatform is initialized. + gfxPlatform::GetPlatform(); + + // Ensure we always color manage images with gtests. + gfxPlatform::SetCMSModeOverride(CMSMode::All); + + // Depending on initialization order, it is possible that our pref changes + // have not taken effect yet because there are pending gfx-related events on + // the main thread. + SpinPendingEvents(); +} + +void ImageBenchmarkBase::SetUp() { + nsCOMPtr inputStream = LoadFile(mTestCase.mPath); + ASSERT_TRUE(inputStream != nullptr); + + // Figure out how much data we have. + uint64_t length; + nsresult rv = inputStream->Available(&length); + ASSERT_NS_SUCCEEDED(rv); + + // Write the data into a SourceBuffer. + mSourceBuffer = new SourceBuffer(); + mSourceBuffer->ExpectLength(length); + rv = mSourceBuffer->AppendFromInputStream(inputStream, length); + ASSERT_NS_SUCCEEDED(rv); + mSourceBuffer->Complete(NS_OK); +} + +void ImageBenchmarkBase::TearDown() {} + +/////////////////////////////////////////////////////////////////////////////// +// General Helpers +/////////////////////////////////////////////////////////////////////////////// + +// These macros work like gtest's ASSERT_* macros, except that they can be used +// in functions that return values. +#define ASSERT_TRUE_OR_RETURN(e, rv) \ + EXPECT_TRUE(e); \ + if (!(e)) { \ + return rv; \ + } + +#define ASSERT_EQ_OR_RETURN(a, b, rv) \ + EXPECT_EQ(a, b); \ + if ((a) != (b)) { \ + return rv; \ + } + +#define ASSERT_GE_OR_RETURN(a, b, rv) \ + EXPECT_GE(a, b); \ + if (!((a) >= (b))) { \ + return rv; \ + } + +#define ASSERT_LE_OR_RETURN(a, b, rv) \ + EXPECT_LE(a, b); \ + if (!((a) <= (b))) { \ + return rv; \ + } + +#define ASSERT_LT_OR_RETURN(a, b, rv) \ + EXPECT_LT(a, b); \ + if (!((a) < (b))) { \ + return rv; \ + } + +void SpinPendingEvents() { + nsCOMPtr mainThread = do_GetMainThread(); + EXPECT_TRUE(mainThread != nullptr); + + bool processed; + do { + processed = false; + nsresult rv = mainThread->ProcessNextEvent(false, &processed); + EXPECT_NS_SUCCEEDED(rv); + } while (processed); +} + +already_AddRefed LoadFile(const char* aRelativePath) { + nsresult rv; + + nsCOMPtr dirService = + do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID); + ASSERT_TRUE_OR_RETURN(dirService != nullptr, nullptr); + + // Retrieve the current working directory. + nsCOMPtr file; + rv = dirService->Get(NS_OS_CURRENT_WORKING_DIR, NS_GET_IID(nsIFile), + getter_AddRefs(file)); + ASSERT_TRUE_OR_RETURN(NS_SUCCEEDED(rv), nullptr); + // Construct the final path by appending the working path to the current + // working directory. + file->AppendNative(nsDependentCString(aRelativePath)); + + // Construct an input stream for the requested file. + nsCOMPtr inputStream; + rv = NS_NewLocalFileInputStream(getter_AddRefs(inputStream), file); + ASSERT_TRUE_OR_RETURN(NS_SUCCEEDED(rv), nullptr); + + // Ensure the resulting input stream is buffered. + if (!NS_InputStreamIsBuffered(inputStream)) { + nsCOMPtr bufStream; + rv = NS_NewBufferedInputStream(getter_AddRefs(bufStream), + inputStream.forget(), 1024); + ASSERT_TRUE_OR_RETURN(NS_SUCCEEDED(rv), nullptr); + inputStream = bufStream; + } + + return inputStream.forget(); +} + +bool IsSolidColor(SourceSurface* aSurface, BGRAColor aColor, + uint8_t aFuzz /* = 0 */) { + IntSize size = aSurface->GetSize(); + return RectIsSolidColor(aSurface, IntRect(0, 0, size.width, size.height), + aColor, aFuzz); +} + +bool RowsAreSolidColor(SourceSurface* aSurface, int32_t aStartRow, + int32_t aRowCount, BGRAColor aColor, + uint8_t aFuzz /* = 0 */) { + IntSize size = aSurface->GetSize(); + return RectIsSolidColor( + aSurface, IntRect(0, aStartRow, size.width, aRowCount), aColor, aFuzz); +} + +bool RectIsSolidColor(SourceSurface* aSurface, const IntRect& aRect, + BGRAColor aColor, uint8_t aFuzz /* = 0 */) { + IntSize surfaceSize = aSurface->GetSize(); + IntRect rect = + aRect.Intersect(IntRect(0, 0, surfaceSize.width, surfaceSize.height)); + + RefPtr dataSurface = aSurface->GetDataSurface(); + ASSERT_TRUE_OR_RETURN(dataSurface != nullptr, false); + + DataSourceSurface::ScopedMap mapping(dataSurface, + DataSourceSurface::MapType::READ); + ASSERT_TRUE_OR_RETURN(mapping.IsMapped(), false); + ASSERT_EQ_OR_RETURN(mapping.GetStride(), surfaceSize.width * 4, false); + + uint8_t* data = mapping.GetData(); + ASSERT_TRUE_OR_RETURN(data != nullptr, false); + + BGRAColor pmColor = aColor.Premultiply(); + uint32_t expectedPixel = pmColor.AsPixel(); + + int32_t rowLength = mapping.GetStride(); + for (int32_t row = rect.Y(); row < rect.YMost(); ++row) { + for (int32_t col = rect.X(); col < rect.XMost(); ++col) { + int32_t i = row * rowLength + col * 4; + uint32_t gotPixel = *reinterpret_cast(data + i); + if (expectedPixel != gotPixel) { + BGRAColor gotColor = BGRAColor::FromPixel(gotPixel); + if (abs(pmColor.mBlue - gotColor.mBlue) > aFuzz || + abs(pmColor.mGreen - gotColor.mGreen) > aFuzz || + abs(pmColor.mRed - gotColor.mRed) > aFuzz || + abs(pmColor.mAlpha - gotColor.mAlpha) > aFuzz) { + EXPECT_EQ(expectedPixel, gotPixel) + << "Color mismatch for rectangle from " << aRect.TopLeft() + << " to " << aRect.BottomRight() << ": " + << "got rgba(" << static_cast(gotColor.mRed) << ", " + << static_cast(gotColor.mGreen) << ", " + << static_cast(gotColor.mBlue) << ", " + << static_cast(gotColor.mAlpha) << "), " + << "expected rgba(" << static_cast(pmColor.mRed) << ", " + << static_cast(pmColor.mGreen) << ", " + << static_cast(pmColor.mBlue) << ", " + << static_cast(pmColor.mAlpha) << ")"; + return false; + } + } + } + } + + return true; +} + +bool RowHasPixels(SourceSurface* aSurface, int32_t aRow, + const vector& aPixels) { + ASSERT_GE_OR_RETURN(aRow, 0, false); + + IntSize surfaceSize = aSurface->GetSize(); + ASSERT_EQ_OR_RETURN(aPixels.size(), size_t(surfaceSize.width), false); + ASSERT_LT_OR_RETURN(aRow, surfaceSize.height, false); + + RefPtr dataSurface = aSurface->GetDataSurface(); + ASSERT_TRUE_OR_RETURN(dataSurface, false); + + DataSourceSurface::ScopedMap mapping(dataSurface, + DataSourceSurface::MapType::READ); + ASSERT_TRUE_OR_RETURN(mapping.IsMapped(), false); + ASSERT_EQ_OR_RETURN(mapping.GetStride(), surfaceSize.width * 4, false); + + uint8_t* data = mapping.GetData(); + ASSERT_TRUE_OR_RETURN(data != nullptr, false); + + int32_t rowLength = mapping.GetStride(); + for (int32_t col = 0; col < surfaceSize.width; ++col) { + int32_t i = aRow * rowLength + col * 4; + uint32_t gotPixelData = *reinterpret_cast(data + i); + BGRAColor gotPixel = BGRAColor::FromPixel(gotPixelData); + EXPECT_EQ(aPixels[col].mBlue, gotPixel.mBlue); + EXPECT_EQ(aPixels[col].mGreen, gotPixel.mGreen); + EXPECT_EQ(aPixels[col].mRed, gotPixel.mRed); + EXPECT_EQ(aPixels[col].mAlpha, gotPixel.mAlpha); + ASSERT_EQ_OR_RETURN(aPixels[col].AsPixel(), gotPixelData, false); + } + + return true; +} + +/////////////////////////////////////////////////////////////////////////////// +// SurfacePipe Helpers +/////////////////////////////////////////////////////////////////////////////// + +already_AddRefed CreateTrivialDecoder() { + DecoderType decoderType = DecoderFactory::GetDecoderType("image/gif"); + auto sourceBuffer = MakeNotNull>(); + RefPtr decoder = DecoderFactory::CreateAnonymousDecoder( + decoderType, sourceBuffer, Nothing(), DefaultDecoderFlags(), + DefaultSurfaceFlags()); + return decoder.forget(); +} + +void AssertCorrectPipelineFinalState(SurfaceFilter* aFilter, + const IntRect& aInputSpaceRect, + const IntRect& aOutputSpaceRect) { + EXPECT_TRUE(aFilter->IsSurfaceFinished()); + Maybe invalidRect = aFilter->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isSome()); + EXPECT_EQ(aInputSpaceRect, invalidRect->mInputSpaceRect.ToUnknownRect()); + EXPECT_EQ(aOutputSpaceRect, invalidRect->mOutputSpaceRect.ToUnknownRect()); +} + +void CheckGeneratedImage(Decoder* aDecoder, const IntRect& aRect, + uint8_t aFuzz /* = 0 */) { + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + CheckGeneratedSurface(surface, aRect, BGRAColor::Green(), + BGRAColor::Transparent(), aFuzz); +} + +void CheckGeneratedSurface(SourceSurface* aSurface, const IntRect& aRect, + const BGRAColor& aInnerColor, + const BGRAColor& aOuterColor, + uint8_t aFuzz /* = 0 */) { + const IntSize surfaceSize = aSurface->GetSize(); + + // This diagram shows how the surface is divided into regions that the code + // below tests for the correct content. The output rect is the bounds of the + // region labeled 'C'. + // + // +---------------------------+ + // | A | + // +---------+--------+--------+ + // | B | C | D | + // +---------+--------+--------+ + // | E | + // +---------------------------+ + + // Check that the output rect itself is the inner color. (Region 'C'.) + EXPECT_TRUE(RectIsSolidColor(aSurface, aRect, aInnerColor, aFuzz)); + + // Check that the area above the output rect is the outer color. (Region 'A'.) + EXPECT_TRUE(RectIsSolidColor(aSurface, + IntRect(0, 0, surfaceSize.width, aRect.Y()), + aOuterColor, aFuzz)); + + // Check that the area to the left of the output rect is the outer color. + // (Region 'B'.) + EXPECT_TRUE(RectIsSolidColor(aSurface, + IntRect(0, aRect.Y(), aRect.X(), aRect.YMost()), + aOuterColor, aFuzz)); + + // Check that the area to the right of the output rect is the outer color. + // (Region 'D'.) + const int32_t widthOnRight = surfaceSize.width - aRect.XMost(); + EXPECT_TRUE(RectIsSolidColor( + aSurface, IntRect(aRect.XMost(), aRect.Y(), widthOnRight, aRect.YMost()), + aOuterColor, aFuzz)); + + // Check that the area below the output rect is the outer color. (Region 'E'.) + const int32_t heightBelow = surfaceSize.height - aRect.YMost(); + EXPECT_TRUE(RectIsSolidColor( + aSurface, IntRect(0, aRect.YMost(), surfaceSize.width, heightBelow), + aOuterColor, aFuzz)); +} + +void CheckWritePixels(Decoder* aDecoder, SurfaceFilter* aFilter, + const Maybe& aOutputRect /* = Nothing() */, + const Maybe& aInputRect /* = Nothing() */, + const Maybe& aInputWriteRect /* = Nothing() */, + const Maybe& aOutputWriteRect /* = Nothing() */, + uint8_t aFuzz /* = 0 */) { + CheckTransformedWritePixels(aDecoder, aFilter, BGRAColor::Green(), + BGRAColor::Green(), aOutputRect, aInputRect, + aInputWriteRect, aOutputWriteRect, aFuzz); +} + +void CheckTransformedWritePixels( + Decoder* aDecoder, SurfaceFilter* aFilter, const BGRAColor& aInputColor, + const BGRAColor& aOutputColor, + const Maybe& aOutputRect /* = Nothing() */, + const Maybe& aInputRect /* = Nothing() */, + const Maybe& aInputWriteRect /* = Nothing() */, + const Maybe& aOutputWriteRect /* = Nothing() */, + uint8_t aFuzz /* = 0 */) { + IntRect outputRect = aOutputRect.valueOr(IntRect(0, 0, 100, 100)); + IntRect inputRect = aInputRect.valueOr(IntRect(0, 0, 100, 100)); + IntRect inputWriteRect = aInputWriteRect.valueOr(inputRect); + IntRect outputWriteRect = aOutputWriteRect.valueOr(outputRect); + + // Fill the image. + int32_t count = 0; + auto result = aFilter->WritePixels([&] { + ++count; + return AsVariant(aInputColor.AsPixel()); + }); + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(inputWriteRect.Width() * inputWriteRect.Height(), count); + + AssertCorrectPipelineFinalState(aFilter, inputRect, outputRect); + + // Attempt to write more data and make sure nothing changes. + const int32_t oldCount = count; + result = aFilter->WritePixels([&] { + ++count; + return AsVariant(aInputColor.AsPixel()); + }); + EXPECT_EQ(oldCount, count); + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_TRUE(aFilter->IsSurfaceFinished()); + Maybe invalidRect = aFilter->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isNothing()); + + // Attempt to advance to the next row and make sure nothing changes. + aFilter->AdvanceRow(); + EXPECT_TRUE(aFilter->IsSurfaceFinished()); + invalidRect = aFilter->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isNothing()); + + // Check that the generated image is correct. + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + CheckGeneratedSurface(surface, outputWriteRect, aOutputColor, + BGRAColor::Transparent(), aFuzz); +} + +/////////////////////////////////////////////////////////////////////////////// +// Test Data +/////////////////////////////////////////////////////////////////////////////// + +ImageTestCase GreenPNGTestCase() { + return ImageTestCase("green.png", "image/png", IntSize(100, 100)); +} + +ImageTestCase GreenGIFTestCase() { + return ImageTestCase("green.gif", "image/gif", IntSize(100, 100)); +} + +ImageTestCase GreenJPGTestCase() { + return ImageTestCase("green.jpg", "image/jpeg", IntSize(100, 100), + TEST_CASE_IS_FUZZY); +} + +ImageTestCase GreenBMPTestCase() { + return ImageTestCase("green.bmp", "image/bmp", IntSize(100, 100)); +} + +ImageTestCase GreenICOTestCase() { + // This ICO contains a 32-bit BMP, and we use a BMP's alpha data by default + // when the BMP is embedded in an ICO, so it's transparent. + return ImageTestCase("green.ico", "image/x-icon", IntSize(100, 100), + TEST_CASE_IS_TRANSPARENT); +} + +ImageTestCase GreenIconTestCase() { + return ImageTestCase("green.icon", "image/icon", IntSize(100, 100), + TEST_CASE_IS_TRANSPARENT); +} + +ImageTestCase GreenWebPTestCase() { + return ImageTestCase("green.webp", "image/webp", IntSize(100, 100)); +} + +ImageTestCase GreenAVIFTestCase() { + return ImageTestCase("green.avif", "image/avif", IntSize(100, 100)); +} + +ImageTestCase NonzeroReservedAVIFTestCase() { + auto testCase = ImageTestCase("hdlr-nonzero-reserved-bug-1727033.avif", + "image/avif", IntSize(1, 1)); + testCase.mColor = BGRAColor(0x00, 0x00, 0x00, 0xFF); + return testCase; +} + +ImageTestCase MultipleColrAVIFTestCase() { + auto testCase = ImageTestCase("valid-avif-colr-nclx-and-prof.avif", + "image/avif", IntSize(1, 1)); + testCase.mColor = BGRAColor(0x00, 0x00, 0x00, 0xFF); + return testCase; +} + +ImageTestCase Transparent10bit420AVIFTestCase() { + auto testCase = + ImageTestCase("transparent-green-50pct-10bit-yuv420.avif", "image/avif", + IntSize(100, 100), TEST_CASE_IS_TRANSPARENT); + testCase.mColor = BGRAColor(0x00, 0xFF, 0x00, 0x80); + return testCase; +} + +ImageTestCase Transparent10bit422AVIFTestCase() { + auto testCase = + ImageTestCase("transparent-green-50pct-10bit-yuv422.avif", "image/avif", + IntSize(100, 100), TEST_CASE_IS_TRANSPARENT); + testCase.mColor = BGRAColor(0x00, 0xFF, 0x00, 0x80); + return testCase; +} + +ImageTestCase Transparent10bit444AVIFTestCase() { + auto testCase = + ImageTestCase("transparent-green-50pct-10bit-yuv444.avif", "image/avif", + IntSize(100, 100), TEST_CASE_IS_TRANSPARENT); + testCase.mColor = BGRAColor(0x00, 0xFF, 0x00, 0x80); + return testCase; +} + +ImageTestCase Transparent12bit420AVIFTestCase() { + auto testCase = + ImageTestCase("transparent-green-50pct-12bit-yuv420.avif", "image/avif", + IntSize(100, 100), TEST_CASE_IS_TRANSPARENT); + testCase.mColor = BGRAColor(0x00, 0xFF, 0x00, 0x80); + return testCase; +} + +ImageTestCase Transparent12bit422AVIFTestCase() { + auto testCase = + ImageTestCase("transparent-green-50pct-12bit-yuv422.avif", "image/avif", + IntSize(100, 100), TEST_CASE_IS_TRANSPARENT); + testCase.mColor = BGRAColor(0x00, 0xFF, 0x00, 0x80); + return testCase; +} + +ImageTestCase Transparent12bit444AVIFTestCase() { + auto testCase = + ImageTestCase("transparent-green-50pct-12bit-yuv444.avif", "image/avif", + IntSize(100, 100), TEST_CASE_IS_TRANSPARENT); + testCase.mColor = BGRAColor(0x00, 0xFF, 0x00, 0x80); + return testCase; +} + +ImageTestCase Transparent8bit420AVIFTestCase() { + auto testCase = + ImageTestCase("transparent-green-50pct-8bit-yuv420.avif", "image/avif", + IntSize(100, 100), TEST_CASE_IS_TRANSPARENT); + // Small error is expected + testCase.mColor = BGRAColor(0x02, 0xFF, 0x00, 0x80); + return testCase; +} + +ImageTestCase Transparent8bit422AVIFTestCase() { + auto testCase = + ImageTestCase("transparent-green-50pct-8bit-yuv422.avif", "image/avif", + IntSize(100, 100), TEST_CASE_IS_TRANSPARENT); + // Small error is expected + testCase.mColor = BGRAColor(0x02, 0xFF, 0x00, 0x80); + return testCase; +} + +ImageTestCase Transparent8bit444AVIFTestCase() { + auto testCase = + ImageTestCase("transparent-green-50pct-8bit-yuv444.avif", "image/avif", + IntSize(100, 100), TEST_CASE_IS_TRANSPARENT); + // Small error is expected + testCase.mColor = BGRAColor(0x02, 0xFF, 0x00, 0x80); + return testCase; +} + +ImageTestCase Gray8bitLimitedRangeBT601AVIFTestCase() { + auto testCase = ImageTestCase("gray-235-8bit-limited-range-bt601.avif", + "image/avif", IntSize(100, 100)); + testCase.mColor = BGRAColor(0xEB, 0xEB, 0xEB, 0xFF); + return testCase; +} + +ImageTestCase Gray8bitLimitedRangeBT709AVIFTestCase() { + auto testCase = ImageTestCase("gray-235-8bit-limited-range-bt709.avif", + "image/avif", IntSize(100, 100)); + testCase.mColor = BGRAColor(0xEB, 0xEB, 0xEB, 0xFF); + return testCase; +} + +ImageTestCase Gray8bitLimitedRangeBT2020AVIFTestCase() { + auto testCase = ImageTestCase("gray-235-8bit-limited-range-bt2020.avif", + "image/avif", IntSize(100, 100)); + testCase.mColor = BGRAColor(0xEB, 0xEB, 0xEB, 0xFF); + return testCase; +} + +ImageTestCase Gray8bitFullRangeBT601AVIFTestCase() { + auto testCase = ImageTestCase("gray-235-8bit-full-range-bt601.avif", + "image/avif", IntSize(100, 100)); + testCase.mColor = BGRAColor(0xEB, 0xEB, 0xEB, 0xFF); + return testCase; +} + +ImageTestCase Gray8bitFullRangeBT709AVIFTestCase() { + auto testCase = ImageTestCase("gray-235-8bit-full-range-bt709.avif", + "image/avif", IntSize(100, 100)); + testCase.mColor = BGRAColor(0xEB, 0xEB, 0xEB, 0xFF); + return testCase; +} + +ImageTestCase Gray8bitFullRangeBT2020AVIFTestCase() { + auto testCase = ImageTestCase("gray-235-8bit-full-range-bt2020.avif", + "image/avif", IntSize(100, 100)); + testCase.mColor = BGRAColor(0xEB, 0xEB, 0xEB, 0xFF); + return testCase; +} + +ImageTestCase Gray10bitLimitedRangeBT601AVIFTestCase() { + auto testCase = ImageTestCase("gray-235-10bit-limited-range-bt601.avif", + "image/avif", IntSize(100, 100)); + // Small error is expected + testCase.mColor = BGRAColor(0xEA, 0xEA, 0xEA, 0xFF); + return testCase; +} + +ImageTestCase Gray10bitLimitedRangeBT709AVIFTestCase() { + auto testCase = ImageTestCase("gray-235-10bit-limited-range-bt709.avif", + "image/avif", IntSize(100, 100)); + // Small error is expected + testCase.mColor = BGRAColor(0xEA, 0xEA, 0xEA, 0xFF); + return testCase; +} + +ImageTestCase Gray10bitLimitedRangeBT2020AVIFTestCase() { + auto testCase = ImageTestCase("gray-235-10bit-limited-range-bt2020.avif", + "image/avif", IntSize(100, 100)); + // Small error is expected + testCase.mColor = BGRAColor(0xEA, 0xEA, 0xEA, 0xFF); + return testCase; +} + +ImageTestCase Gray10bitFullRangeBT601AVIFTestCase() { + auto testCase = ImageTestCase("gray-235-10bit-full-range-bt601.avif", + "image/avif", IntSize(100, 100)); + testCase.mColor = BGRAColor(0xEB, 0xEB, 0xEB, 0xFF); + return testCase; +} + +ImageTestCase Gray10bitFullRangeBT709AVIFTestCase() { + auto testCase = ImageTestCase("gray-235-10bit-full-range-bt709.avif", + "image/avif", IntSize(100, 100)); + testCase.mColor = BGRAColor(0xEB, 0xEB, 0xEB, 0xFF); + return testCase; +} + +ImageTestCase Gray10bitFullRangeBT2020AVIFTestCase() { + auto testCase = ImageTestCase("gray-235-10bit-full-range-bt2020.avif", + "image/avif", IntSize(100, 100)); + testCase.mColor = BGRAColor(0xEB, 0xEB, 0xEB, 0xFF); + return testCase; +} + +ImageTestCase Gray12bitLimitedRangeBT601AVIFTestCase() { + auto testCase = ImageTestCase("gray-235-12bit-limited-range-bt601.avif", + "image/avif", IntSize(100, 100)); + // Small error is expected + testCase.mColor = BGRAColor(0xEA, 0xEA, 0xEA, 0xFF); + return testCase; +} + +ImageTestCase Gray12bitLimitedRangeBT709AVIFTestCase() { + auto testCase = ImageTestCase("gray-235-12bit-limited-range-bt709.avif", + "image/avif", IntSize(100, 100)); + // Small error is expected + testCase.mColor = BGRAColor(0xEA, 0xEA, 0xEA, 0xFF); + return testCase; +} + +ImageTestCase Gray12bitLimitedRangeBT2020AVIFTestCase() { + auto testCase = ImageTestCase("gray-235-12bit-limited-range-bt2020.avif", + "image/avif", IntSize(100, 100)); + // Small error is expected + testCase.mColor = BGRAColor(0xEA, 0xEA, 0xEA, 0xFF); + return testCase; +} + +ImageTestCase Gray12bitFullRangeBT601AVIFTestCase() { + auto testCase = ImageTestCase("gray-235-12bit-full-range-bt601.avif", + "image/avif", IntSize(100, 100)); + testCase.mColor = BGRAColor(0xEB, 0xEB, 0xEB, 0xFF); + return testCase; +} + +ImageTestCase Gray12bitFullRangeBT709AVIFTestCase() { + auto testCase = ImageTestCase("gray-235-12bit-full-range-bt709.avif", + "image/avif", IntSize(100, 100)); + testCase.mColor = BGRAColor(0xEB, 0xEB, 0xEB, 0xFF); + return testCase; +} + +ImageTestCase Gray12bitFullRangeBT2020AVIFTestCase() { + auto testCase = ImageTestCase("gray-235-12bit-full-range-bt2020.avif", + "image/avif", IntSize(100, 100)); + testCase.mColor = BGRAColor(0xEB, 0xEB, 0xEB, 0xFF); + return testCase; +} + +ImageTestCase Gray8bitLimitedRangeGrayscaleAVIFTestCase() { + auto testCase = ImageTestCase("gray-235-8bit-limited-range-grayscale.avif", + "image/avif", IntSize(100, 100)); + testCase.mColor = BGRAColor(0xEB, 0xEB, 0xEB, 0xFF); + return testCase; +} + +ImageTestCase Gray8bitFullRangeGrayscaleAVIFTestCase() { + auto testCase = ImageTestCase("gray-235-8bit-full-range-grayscale.avif", + "image/avif", IntSize(100, 100)); + testCase.mColor = BGRAColor(0xEB, 0xEB, 0xEB, 0xFF); + return testCase; +} + +ImageTestCase Gray10bitLimitedRangeGrayscaleAVIFTestCase() { + auto testCase = ImageTestCase("gray-235-10bit-limited-range-grayscale.avif", + "image/avif", IntSize(100, 100)); + // Small error is expected + testCase.mColor = BGRAColor(0xEA, 0xEA, 0xEA, 0xFF); + return testCase; +} + +ImageTestCase Gray10bitFullRangeGrayscaleAVIFTestCase() { + auto testCase = ImageTestCase("gray-235-10bit-full-range-grayscale.avif", + "image/avif", IntSize(100, 100)); + testCase.mColor = BGRAColor(0xEB, 0xEB, 0xEB, 0xFF); + return testCase; +} + +ImageTestCase Gray12bitLimitedRangeGrayscaleAVIFTestCase() { + auto testCase = ImageTestCase("gray-235-12bit-limited-range-grayscale.avif", + "image/avif", IntSize(100, 100)); + // Small error is expected + testCase.mColor = BGRAColor(0xEA, 0xEA, 0xEA, 0xFF); + return testCase; +} + +ImageTestCase Gray12bitFullRangeGrayscaleAVIFTestCase() { + auto testCase = ImageTestCase("gray-235-12bit-full-range-grayscale.avif", + "image/avif", IntSize(100, 100)); + testCase.mColor = BGRAColor(0xEB, 0xEB, 0xEB, 0xFF); + return testCase; +} + +ImageTestCase StackCheckAVIFTestCase() { + return ImageTestCase("stackcheck.avif", "image/avif", IntSize(4096, 2924), + TEST_CASE_IGNORE_OUTPUT); +} + +// Add TEST_CASE_IGNORE_OUTPUT since this isn't a solid green image and we just +// want to test that it decodes correctly. +ImageTestCase MultiLayerAVIFTestCase() { + return ImageTestCase("multilayer.avif", "image/avif", IntSize(1280, 720), + TEST_CASE_IGNORE_OUTPUT); +} + +ImageTestCase LargeWebPTestCase() { + return ImageTestCase("large.webp", "image/webp", IntSize(1200, 660), + TEST_CASE_IGNORE_OUTPUT); +} + +ImageTestCase LargeAVIFTestCase() { + return ImageTestCase("large.avif", "image/avif", IntSize(1200, 660), + TEST_CASE_IGNORE_OUTPUT); +} + +ImageTestCase GreenWebPIccSrgbTestCase() { + return ImageTestCase("green.icc_srgb.webp", "image/webp", IntSize(100, 100)); +} + +ImageTestCase GreenFirstFrameAnimatedGIFTestCase() { + return ImageTestCase("first-frame-green.gif", "image/gif", IntSize(100, 100), + TEST_CASE_IS_ANIMATED); +} + +ImageTestCase GreenFirstFrameAnimatedPNGTestCase() { + return ImageTestCase("first-frame-green.png", "image/png", IntSize(100, 100), + TEST_CASE_IS_TRANSPARENT | TEST_CASE_IS_ANIMATED); +} + +ImageTestCase GreenFirstFrameAnimatedWebPTestCase() { + return ImageTestCase("first-frame-green.webp", "image/webp", + IntSize(100, 100), TEST_CASE_IS_ANIMATED); +} + +ImageTestCase GreenFirstFrameAnimatedAVIFTestCase() { + return ImageTestCase("first-frame-green.avif", "image/avif", + IntSize(100, 100), TEST_CASE_IS_ANIMATED); +} + +ImageTestCase BlendAnimatedGIFTestCase() { + return ImageTestCase("blend.gif", "image/gif", IntSize(100, 100), + TEST_CASE_IS_ANIMATED); +} + +ImageTestCase BlendAnimatedPNGTestCase() { + return ImageTestCase("blend.png", "image/png", IntSize(100, 100), + TEST_CASE_IS_TRANSPARENT | TEST_CASE_IS_ANIMATED); +} + +ImageTestCase BlendAnimatedWebPTestCase() { + return ImageTestCase("blend.webp", "image/webp", IntSize(100, 100), + TEST_CASE_IS_TRANSPARENT | TEST_CASE_IS_ANIMATED); +} + +ImageTestCase BlendAnimatedAVIFTestCase() { + return ImageTestCase("blend.avif", "image/avif", IntSize(100, 100), + TEST_CASE_IS_TRANSPARENT | TEST_CASE_IS_ANIMATED); +} + +ImageTestCase CorruptTestCase() { + return ImageTestCase("corrupt.jpg", "image/jpeg", IntSize(100, 100), + TEST_CASE_HAS_ERROR); +} + +ImageTestCase CorruptBMPWithTruncatedHeader() { + // This BMP has a header which is truncated right between the BIH and the + // bitfields, which is a particularly error-prone place w.r.t. the BMP decoder + // state machine. + return ImageTestCase("invalid-truncated-metadata.bmp", "image/bmp", + IntSize(100, 100), TEST_CASE_HAS_ERROR); +} + +ImageTestCase CorruptICOWithBadBMPWidthTestCase() { + // This ICO contains a BMP icon which has a width that doesn't match the size + // listed in the corresponding ICO directory entry. + return ImageTestCase("corrupt-with-bad-bmp-width.ico", "image/x-icon", + IntSize(100, 100), TEST_CASE_HAS_ERROR); +} + +ImageTestCase CorruptICOWithBadBMPHeightTestCase() { + // This ICO contains a BMP icon which has a height that doesn't match the size + // listed in the corresponding ICO directory entry. + return ImageTestCase("corrupt-with-bad-bmp-height.ico", "image/x-icon", + IntSize(100, 100), TEST_CASE_HAS_ERROR); +} + +ImageTestCase CorruptICOWithBadBppTestCase() { + // This test case is an ICO with a BPP (15) in the ICO header which differs + // from that in the BMP header itself (1). It should ignore the ICO BPP when + // the BMP BPP is available and thus correctly decode the image. + return ImageTestCase("corrupt-with-bad-ico-bpp.ico", "image/x-icon", + IntSize(100, 100), TEST_CASE_IS_TRANSPARENT); +} + +ImageTestCase CorruptAVIFTestCase() { + return ImageTestCase("bug-1655846.avif", "image/avif", IntSize(100, 100), + TEST_CASE_HAS_ERROR); +} + +ImageTestCase TransparentAVIFTestCase() { + return ImageTestCase("transparent.avif", "image/avif", IntSize(1200, 1200), + TEST_CASE_IS_TRANSPARENT); +} + +ImageTestCase TransparentPNGTestCase() { + return ImageTestCase("transparent.png", "image/png", IntSize(32, 32), + TEST_CASE_IS_TRANSPARENT); +} + +ImageTestCase TransparentGIFTestCase() { + return ImageTestCase("transparent.gif", "image/gif", IntSize(16, 16), + TEST_CASE_IS_TRANSPARENT); +} + +ImageTestCase TransparentWebPTestCase() { + ImageTestCase test("transparent.webp", "image/webp", IntSize(100, 100), + TEST_CASE_IS_TRANSPARENT); + test.mColor = BGRAColor::Transparent(); + return test; +} + +ImageTestCase TransparentNoAlphaHeaderWebPTestCase() { + ImageTestCase test("transparent-no-alpha-header.webp", "image/webp", + IntSize(100, 100), TEST_CASE_IS_FUZZY); + test.mColor = BGRAColor(0x00, 0x00, 0x00, 0xFF); // black + return test; +} + +ImageTestCase FirstFramePaddingGIFTestCase() { + return ImageTestCase("transparent.gif", "image/gif", IntSize(16, 16), + TEST_CASE_IS_TRANSPARENT); +} + +ImageTestCase TransparentIfWithinICOBMPTestCase(TestCaseFlags aFlags) { + // This is a BMP that is only transparent when decoded as if it is within an + // ICO file. (Note: aFlags needs to be set to TEST_CASE_DEFAULT_FLAGS or + // TEST_CASE_IS_TRANSPARENT accordingly.) + return ImageTestCase("transparent-if-within-ico.bmp", "image/bmp", + IntSize(32, 32), aFlags); +} + +ImageTestCase RLE4BMPTestCase() { + return ImageTestCase("rle4.bmp", "image/bmp", IntSize(320, 240), + TEST_CASE_IS_TRANSPARENT); +} + +ImageTestCase RLE8BMPTestCase() { + return ImageTestCase("rle8.bmp", "image/bmp", IntSize(32, 32), + TEST_CASE_IS_TRANSPARENT); +} + +ImageTestCase NoFrameDelayGIFTestCase() { + // This is an invalid (or at least, questionably valid) GIF that's animated + // even though it specifies a frame delay of zero. It's animated, but it's not + // marked TEST_CASE_IS_ANIMATED because the metadata decoder can't detect that + // it's animated. + return ImageTestCase("no-frame-delay.gif", "image/gif", IntSize(100, 100)); +} + +ImageTestCase ExtraImageSubBlocksAnimatedGIFTestCase() { + // This is a corrupt GIF that has extra image sub blocks between the first and + // second frame. + return ImageTestCase("animated-with-extra-image-sub-blocks.gif", "image/gif", + IntSize(100, 100)); +} + +ImageTestCase DownscaledPNGTestCase() { + // This testcase (and all the other "downscaled") testcases) consists of 25 + // lines of green, followed by 25 lines of red, followed by 25 lines of green, + // followed by 25 more lines of red. It's intended that tests downscale it + // from 100x100 to 20x20, so we specify a 20x20 output size. + return ImageTestCase("downscaled.png", "image/png", IntSize(100, 100), + IntSize(20, 20)); +} + +ImageTestCase DownscaledGIFTestCase() { + return ImageTestCase("downscaled.gif", "image/gif", IntSize(100, 100), + IntSize(20, 20)); +} + +ImageTestCase DownscaledJPGTestCase() { + return ImageTestCase("downscaled.jpg", "image/jpeg", IntSize(100, 100), + IntSize(20, 20)); +} + +ImageTestCase DownscaledBMPTestCase() { + return ImageTestCase("downscaled.bmp", "image/bmp", IntSize(100, 100), + IntSize(20, 20)); +} + +ImageTestCase DownscaledICOTestCase() { + return ImageTestCase("downscaled.ico", "image/x-icon", IntSize(100, 100), + IntSize(20, 20), TEST_CASE_IS_TRANSPARENT); +} + +ImageTestCase DownscaledIconTestCase() { + return ImageTestCase("downscaled.icon", "image/icon", IntSize(100, 100), + IntSize(20, 20), TEST_CASE_IS_TRANSPARENT); +} + +ImageTestCase DownscaledWebPTestCase() { + return ImageTestCase("downscaled.webp", "image/webp", IntSize(100, 100), + IntSize(20, 20)); +} + +ImageTestCase DownscaledAVIFTestCase() { + return ImageTestCase("downscaled.avif", "image/avif", IntSize(100, 100), + IntSize(20, 20)); +} + +ImageTestCase DownscaledTransparentICOWithANDMaskTestCase() { + // This test case is an ICO with AND mask transparency. We want to ensure that + // we can downscale it without crashing or triggering ASAN failures, but its + // content isn't simple to verify, so for now we don't check the output. + return ImageTestCase("transparent-ico-with-and-mask.ico", "image/x-icon", + IntSize(32, 32), IntSize(20, 20), + TEST_CASE_IS_TRANSPARENT | TEST_CASE_IGNORE_OUTPUT); +} + +ImageTestCase TruncatedSmallGIFTestCase() { + return ImageTestCase("green-1x1-truncated.gif", "image/gif", IntSize(1, 1), + TEST_CASE_IS_TRANSPARENT); +} + +ImageTestCase LargeICOWithBMPTestCase() { + return ImageTestCase("green-large-bmp.ico", "image/x-icon", IntSize(256, 256), + TEST_CASE_IS_TRANSPARENT); +} + +ImageTestCase LargeICOWithPNGTestCase() { + return ImageTestCase("green-large-png.ico", "image/x-icon", IntSize(512, 512), + TEST_CASE_IS_TRANSPARENT); +} + +ImageTestCase GreenMultipleSizesICOTestCase() { + return ImageTestCase("green-multiple-sizes.ico", "image/x-icon", + IntSize(256, 256)); +} + +ImageTestCase PerfGrayJPGTestCase() { + return ImageTestCase("perf_gray.jpg", "image/jpeg", IntSize(1000, 1000)); +} + +ImageTestCase PerfCmykJPGTestCase() { + return ImageTestCase("perf_cmyk.jpg", "image/jpeg", IntSize(1000, 1000)); +} + +ImageTestCase PerfYCbCrJPGTestCase() { + return ImageTestCase("perf_ycbcr.jpg", "image/jpeg", IntSize(1000, 1000)); +} + +ImageTestCase PerfRgbPNGTestCase() { + return ImageTestCase("perf_srgb.png", "image/png", IntSize(1000, 1000)); +} + +ImageTestCase PerfRgbAlphaPNGTestCase() { + return ImageTestCase("perf_srgb_alpha.png", "image/png", IntSize(1000, 1000), + TEST_CASE_IS_TRANSPARENT); +} + +ImageTestCase PerfGrayPNGTestCase() { + return ImageTestCase("perf_gray.png", "image/png", IntSize(1000, 1000)); +} + +ImageTestCase PerfGrayAlphaPNGTestCase() { + return ImageTestCase("perf_gray_alpha.png", "image/png", IntSize(1000, 1000), + TEST_CASE_IS_TRANSPARENT); +} + +ImageTestCase PerfRgbLosslessWebPTestCase() { + return ImageTestCase("perf_srgb_lossless.webp", "image/webp", + IntSize(1000, 1000)); +} + +ImageTestCase PerfRgbAlphaLosslessWebPTestCase() { + return ImageTestCase("perf_srgb_alpha_lossless.webp", "image/webp", + IntSize(1000, 1000), TEST_CASE_IS_TRANSPARENT); +} + +ImageTestCase PerfRgbLossyWebPTestCase() { + return ImageTestCase("perf_srgb_lossy.webp", "image/webp", + IntSize(1000, 1000)); +} + +ImageTestCase PerfRgbAlphaLossyWebPTestCase() { + return ImageTestCase("perf_srgb_alpha_lossy.webp", "image/webp", + IntSize(1000, 1000), TEST_CASE_IS_TRANSPARENT); +} + +ImageTestCase PerfRgbGIFTestCase() { + return ImageTestCase("perf_srgb.gif", "image/gif", IntSize(1000, 1000)); +} + +#ifdef MOZ_JXL +ImageTestCase GreenJXLTestCase() { + return ImageTestCase("green.jxl", "image/jxl", IntSize(100, 100)); +} + +ImageTestCase DownscaledJXLTestCase() { + return ImageTestCase("downscaled.jxl", "image/jxl", IntSize(100, 100), + IntSize(20, 20)); +} + +ImageTestCase LargeJXLTestCase() { + return ImageTestCase("large.jxl", "image/jxl", IntSize(1200, 660), + TEST_CASE_IGNORE_OUTPUT); +} + +ImageTestCase TransparentJXLTestCase() { + return ImageTestCase("transparent.jxl", "image/jxl", IntSize(1200, 1200), + TEST_CASE_IS_TRANSPARENT); +} +#endif + +ImageTestCase ExifResolutionTestCase() { + return ImageTestCase("exif_resolution.jpg", "image/jpeg", IntSize(100, 50)); +} + +RefPtr TestCaseToDecodedImage(const ImageTestCase& aTestCase) { + RefPtr image = ImageFactory::CreateAnonymousImage( + nsDependentCString(aTestCase.mMimeType)); + MOZ_RELEASE_ASSERT(!image->HasError()); + + nsCOMPtr inputStream = LoadFile(aTestCase.mPath); + MOZ_RELEASE_ASSERT(inputStream); + + // Figure out how much data we have. + uint64_t length; + nsresult rv = inputStream->Available(&length); + MOZ_RELEASE_ASSERT(NS_SUCCEEDED(rv)); + + // Write the data into the image. + rv = image->OnImageDataAvailable(nullptr, inputStream, 0, + static_cast(length)); + MOZ_RELEASE_ASSERT(NS_SUCCEEDED(rv)); + + // Let the image know we've sent all the data. + rv = image->OnImageDataComplete(nullptr, NS_OK, true); + MOZ_RELEASE_ASSERT(NS_SUCCEEDED(rv)); + + RefPtr tracker = image->GetProgressTracker(); + tracker->SyncNotifyProgress(FLAG_LOAD_COMPLETE); + + // Use GetFrame() to force a sync decode of the image. + RefPtr surface = image->GetFrame( + imgIContainer::FRAME_CURRENT, imgIContainer::FLAG_SYNC_DECODE); + Unused << surface; + return image; +} + +} // namespace image +} // namespace mozilla diff --git a/image/test/gtest/Common.h b/image/test/gtest/Common.h new file mode 100644 index 0000000000..bd6ae64a42 --- /dev/null +++ b/image/test/gtest/Common.h @@ -0,0 +1,600 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef mozilla_image_test_gtest_Common_h +#define mozilla_image_test_gtest_Common_h + +#include + +#include "gtest/gtest.h" + +#include "mozilla/Attributes.h" +#include "mozilla/gtest/MozAssertions.h" +#include "mozilla/Maybe.h" +#include "mozilla/UniquePtr.h" +#include "mozilla/gfx/2D.h" +#include "Decoder.h" +#include "gfxColor.h" +#include "gfxPlatform.h" +#include "nsCOMPtr.h" +#include "SurfaceFlags.h" +#include "SurfacePipe.h" +#include "SurfacePipeFactory.h" + +class nsIInputStream; + +namespace mozilla { +namespace image { + +/////////////////////////////////////////////////////////////////////////////// +// Types +/////////////////////////////////////////////////////////////////////////////// + +struct BGRAColor { + BGRAColor() : BGRAColor(0, 0, 0, 0) {} + + BGRAColor(uint8_t aBlue, uint8_t aGreen, uint8_t aRed, uint8_t aAlpha, + bool aPremultiplied = false, bool asRGB = true) + : mBlue(aBlue), + mGreen(aGreen), + mRed(aRed), + mAlpha(aAlpha), + mPremultiplied(aPremultiplied), + msRGB(asRGB) {} + + static BGRAColor Green() { return BGRAColor(0x00, 0xFF, 0x00, 0xFF); } + static BGRAColor Red() { return BGRAColor(0x00, 0x00, 0xFF, 0xFF); } + static BGRAColor Blue() { return BGRAColor(0xFF, 0x00, 0x00, 0xFF); } + static BGRAColor Transparent() { return BGRAColor(0x00, 0x00, 0x00, 0x00); } + + static BGRAColor FromPixel(uint32_t aPixel) { + uint8_t r, g, b, a; + r = (aPixel >> gfx::SurfaceFormatBit::OS_R) & 0xFF; + g = (aPixel >> gfx::SurfaceFormatBit::OS_G) & 0xFF; + b = (aPixel >> gfx::SurfaceFormatBit::OS_B) & 0xFF; + a = (aPixel >> gfx::SurfaceFormatBit::OS_A) & 0xFF; + return BGRAColor(b, g, r, a, true); + } + + BGRAColor DeviceColor() const { + MOZ_ASSERT(!mPremultiplied); + if (msRGB) { + gfx::DeviceColor color = gfx::ToDeviceColor( + gfx::sRGBColor(float(mRed) / 255.0f, float(mGreen) / 255.0f, + float(mBlue) / 255.0f, 1.0)); + return BGRAColor(uint8_t(color.b * 255.0f), uint8_t(color.g * 255.0f), + uint8_t(color.r * 255.0f), mAlpha, mPremultiplied, + /* asRGB */ false); + } + return *this; + } + + BGRAColor sRGBColor() const { + MOZ_ASSERT(msRGB); + MOZ_ASSERT(!mPremultiplied); + return *this; + } + + BGRAColor Premultiply() const { + if (!mPremultiplied) { + return BGRAColor(gfxPreMultiply(mBlue, mAlpha), + gfxPreMultiply(mGreen, mAlpha), + gfxPreMultiply(mRed, mAlpha), mAlpha, true); + } + return *this; + } + + uint32_t AsPixel() const { + if (!mPremultiplied) { + return gfxPackedPixel(mAlpha, mRed, mGreen, mBlue); + } + return gfxPackedPixelNoPreMultiply(mAlpha, mRed, mGreen, mBlue); + } + + uint8_t mBlue; + uint8_t mGreen; + uint8_t mRed; + uint8_t mAlpha; + bool mPremultiplied; + bool msRGB; +}; + +enum TestCaseFlags { + TEST_CASE_DEFAULT_FLAGS = 0, + TEST_CASE_IS_FUZZY = 1 << 0, + TEST_CASE_HAS_ERROR = 1 << 1, + TEST_CASE_IS_TRANSPARENT = 1 << 2, + TEST_CASE_IS_ANIMATED = 1 << 3, + TEST_CASE_IGNORE_OUTPUT = 1 << 4, + TEST_CASE_ASSUME_SRGB_OUTPUT = 1 << 5, +}; + +struct ImageTestCase { + ImageTestCase(const char* aPath, const char* aMimeType, gfx::IntSize aSize, + uint32_t aFlags = TEST_CASE_DEFAULT_FLAGS) + : mPath(aPath), + mMimeType(aMimeType), + mSize(aSize), + mOutputSize(aSize), + mFlags(aFlags), + mSurfaceFlags(DefaultSurfaceFlags()), + mColor(BGRAColor::Green()) {} + + ImageTestCase(const char* aPath, const char* aMimeType, gfx::IntSize aSize, + gfx::IntSize aOutputSize, + uint32_t aFlags = TEST_CASE_DEFAULT_FLAGS) + : mPath(aPath), + mMimeType(aMimeType), + mSize(aSize), + mOutputSize(aOutputSize), + mFlags(aFlags), + mSurfaceFlags(DefaultSurfaceFlags()), + mColor(BGRAColor::Green()) {} + + ImageTestCase WithSurfaceFlags(SurfaceFlags aSurfaceFlags) const { + ImageTestCase self = *this; + self.mSurfaceFlags = aSurfaceFlags; + return self; + } + + ImageTestCase WithFlags(uint32_t aFlags) const { + ImageTestCase self = *this; + self.mFlags = aFlags; + return self; + } + + BGRAColor ChooseColor(const BGRAColor& aColor) const { + // If we are forcing the output to be sRGB via the surface flag, or the + // test case is marked as assuming sRGB (used when the image itself is not + // explicitly tagged, and as a result, imagelib won't perform any color + // conversion), we should use the sRGB presentation of the color. + if ((mSurfaceFlags & SurfaceFlags::TO_SRGB_COLORSPACE) || + (mFlags & TEST_CASE_ASSUME_SRGB_OUTPUT)) { + return aColor.sRGBColor(); + } + return aColor.DeviceColor(); + } + + BGRAColor Color() const { return ChooseColor(mColor); } + + uint8_t Fuzz() const { + // If we are using device space, there can easily be off by 1 channel errors + // depending on the color profile and how the rounding went. + if (mFlags & TEST_CASE_IS_FUZZY || + !(mSurfaceFlags & SurfaceFlags::TO_SRGB_COLORSPACE)) { + return 1; + } + return 0; + } + + const char* mPath; + const char* mMimeType; + gfx::IntSize mSize; + gfx::IntSize mOutputSize; + uint32_t mFlags; + SurfaceFlags mSurfaceFlags; + BGRAColor mColor; +}; + +/////////////////////////////////////////////////////////////////////////////// +// General Helpers +/////////////////////////////////////////////////////////////////////////////// + +/** + * A RAII class that ensure that ImageLib services are available. Any tests that + * require ImageLib to be initialized (for example, any test that uses the + * SurfaceCache; see image::EnsureModuleInitialized() for the full list) can + * use this class to ensure that ImageLib services are available. Failure to do + * so can result in strange, non-deterministic failures. + */ +class AutoInitializeImageLib { + public: + AutoInitializeImageLib(); +}; + +/** + * A test fixture class used for benchmark tests. It preloads the image data + * from disk to avoid including that in the timing. + */ +class ImageBenchmarkBase : public ::testing::Test { + protected: + ImageBenchmarkBase(const ImageTestCase& aTestCase) : mTestCase(aTestCase) {} + + void SetUp() override; + void TearDown() override; + + AutoInitializeImageLib mInit; + ImageTestCase mTestCase; + RefPtr mSourceBuffer; +}; + +/// Spins on the main thread to process any pending events. +void SpinPendingEvents(); + +/// Loads a file from the current directory. @return an nsIInputStream for it. +already_AddRefed LoadFile(const char* aRelativePath); + +/** + * @returns true if every pixel of @aSurface is @aColor. + * + * If @aFuzz is nonzero, a tolerance of @aFuzz is allowed in each color + * component. This may be necessary for tests that involve JPEG images or + * downscaling. + */ +bool IsSolidColor(gfx::SourceSurface* aSurface, BGRAColor aColor, + uint8_t aFuzz = 0); + +/** + * @returns true if every pixel in the range of rows specified by @aStartRow and + * @aRowCount of @aSurface is @aColor. + * + * If @aFuzz is nonzero, a tolerance of @aFuzz is allowed in each color + * component. This may be necessary for tests that involve JPEG images or + * downscaling. + */ +bool RowsAreSolidColor(gfx::SourceSurface* aSurface, int32_t aStartRow, + int32_t aRowCount, BGRAColor aColor, uint8_t aFuzz = 0); + +/** + * @returns true if every pixel in the rect specified by @aRect is @aColor. + * + * If @aFuzz is nonzero, a tolerance of @aFuzz is allowed in each color + * component. This may be necessary for tests that involve JPEG images or + * downscaling. + */ +bool RectIsSolidColor(gfx::SourceSurface* aSurface, const gfx::IntRect& aRect, + BGRAColor aColor, uint8_t aFuzz = 0); + +/** + * @returns true if the pixels in @aRow of @aSurface match the pixels given in + * @aPixels. + */ +bool RowHasPixels(gfx::SourceSurface* aSurface, int32_t aRow, + const std::vector& aPixels); + +// ExpectNoResume is an IResumable implementation for use by tests that expect +// Resume() to never get called. +class ExpectNoResume final : public IResumable { + public: + NS_INLINE_DECL_THREADSAFE_REFCOUNTING(ExpectNoResume, override) + + void Resume() override { FAIL() << "Resume() should not get called"; } + + private: + ~ExpectNoResume() override {} +}; + +// CountResumes is an IResumable implementation for use by tests that expect +// Resume() to get called a certain number of times. +class CountResumes : public IResumable { + public: + NS_INLINE_DECL_THREADSAFE_REFCOUNTING(CountResumes, override) + + CountResumes() : mCount(0) {} + + void Resume() override { mCount++; } + uint32_t Count() const { return mCount; } + + private: + ~CountResumes() override {} + + uint32_t mCount; +}; + +/////////////////////////////////////////////////////////////////////////////// +// SurfacePipe Helpers +/////////////////////////////////////////////////////////////////////////////// + +/** + * Creates a decoder with no data associated with, suitable for testing code + * that requires a decoder to initialize or to allocate surfaces but doesn't + * actually need the decoder to do any decoding. + * + * XXX(seth): We only need this because SurfaceSink defer to the decoder for + * surface allocation. Once all decoders use SurfacePipe we won't need to do + * that anymore and we can remove this function. + */ +already_AddRefed CreateTrivialDecoder(); + +/** + * Creates a pipeline of SurfaceFilters from a list of Config structs and passes + * it to the provided lambda @aFunc. Assertions that the pipeline is constructly + * correctly and cleanup of any allocated surfaces is handled automatically. + * + * @param aDecoder The decoder to use for allocating surfaces. + * @param aFunc The lambda function to pass the filter pipeline to. + * @param aConfigs The configuration for the pipeline. + */ +template +void WithFilterPipeline(Decoder* aDecoder, Func aFunc, bool aFinish, + const Configs&... aConfigs) { + auto pipe = MakeUnique::Type>(); + nsresult rv = pipe->Configure(aConfigs...); + ASSERT_NS_SUCCEEDED(rv); + + aFunc(aDecoder, pipe.get()); + + if (aFinish) { + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + if (currentFrame) { + currentFrame->Finish(); + } + } +} + +template +void WithFilterPipeline(Decoder* aDecoder, Func aFunc, + const Configs&... aConfigs) { + WithFilterPipeline(aDecoder, aFunc, true, aConfigs...); +} + +/** + * Creates a pipeline of SurfaceFilters from a list of Config structs and + * asserts that configuring it fails. Cleanup of any allocated surfaces is + * handled automatically. + * + * @param aDecoder The decoder to use for allocating surfaces. + * @param aConfigs The configuration for the pipeline. + */ +template +void AssertConfiguringPipelineFails(Decoder* aDecoder, + const Configs&... aConfigs) { + auto pipe = MakeUnique::Type>(); + nsresult rv = pipe->Configure(aConfigs...); + + // Callers expect configuring the pipeline to fail. + ASSERT_NS_FAILED(rv); + + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + if (currentFrame) { + currentFrame->Finish(); + } +} + +/** + * Asserts that the provided filter pipeline is in the correct final state, + * which is to say, the entire surface has been written to (IsSurfaceFinished() + * returns true) and the invalid rects are as expected. + * + * @param aFilter The filter pipeline to check. + * @param aInputSpaceRect The expect invalid rect, in input space. + * @param aoutputSpaceRect The expect invalid rect, in output space. + */ +void AssertCorrectPipelineFinalState(SurfaceFilter* aFilter, + const gfx::IntRect& aInputSpaceRect, + const gfx::IntRect& aOutputSpaceRect); + +/** + * Checks a generated image for correctness. Reports any unexpected deviation + * from the expected image as GTest failures. + * + * @param aDecoder The decoder which contains the image. The decoder's current + * frame will be checked. + * @param aRect The region in the space of the output surface that the filter + * pipeline will actually write to. It's expected that pixels in + * this region are green, while pixels outside this region are + * transparent. + * @param aFuzz The amount of fuzz to use in pixel comparisons. + */ +void CheckGeneratedImage(Decoder* aDecoder, const gfx::IntRect& aRect, + uint8_t aFuzz = 0); + +/** + * Checks a generated surface for correctness. Reports any unexpected deviation + * from the expected image as GTest failures. + * + * @param aSurface The surface to check. + * @param aRect The region in the space of the output surface that the filter + * pipeline will actually write to. + * @param aInnerColor Check that pixels inside of aRect are this color. + * @param aOuterColor Check that pixels outside of aRect are this color. + * @param aFuzz The amount of fuzz to use in pixel comparisons. + */ +void CheckGeneratedSurface(gfx::SourceSurface* aSurface, + const gfx::IntRect& aRect, + const BGRAColor& aInnerColor, + const BGRAColor& aOuterColor, uint8_t aFuzz = 0); + +/** + * Tests the result of calling WritePixels() using the provided SurfaceFilter + * pipeline. The pipeline must be a normal (i.e., non-paletted) pipeline. + * + * The arguments are specified in the an order intended to minimize the number + * of arguments that most test cases need to pass. + * + * @param aDecoder The decoder whose current frame will be written to. + * @param aFilter The SurfaceFilter pipeline to use. + * @param aOutputRect The region in the space of the output surface that will be + * invalidated by the filter pipeline. Defaults to + * (0, 0, 100, 100). + * @param aInputRect The region in the space of the input image that will be + * invalidated by the filter pipeline. Defaults to + * (0, 0, 100, 100). + * @param aInputWriteRect The region in the space of the input image that the + * filter pipeline will allow writes to. Note the + * difference from @aInputRect: @aInputRect is the actual + * region invalidated, while @aInputWriteRect is the + * region that is written to. These can differ in cases + * where the input is not clipped to the size of the + * image. Defaults to the entire input rect. + * @param aOutputWriteRect The region in the space of the output surface that + * the filter pipeline will actually write to. It's + * expected that pixels in this region are green, while + * pixels outside this region are transparent. Defaults + * to the entire output rect. + */ +void CheckWritePixels(Decoder* aDecoder, SurfaceFilter* aFilter, + const Maybe& aOutputRect = Nothing(), + const Maybe& aInputRect = Nothing(), + const Maybe& aInputWriteRect = Nothing(), + const Maybe& aOutputWriteRect = Nothing(), + uint8_t aFuzz = 0); + +/** + * Tests the result of calling WritePixels() using the provided SurfaceFilter + * pipeline. Allows for control over the input color to write, and the expected + * output color. + * @see CheckWritePixels() for documentation of the arguments. + */ +void CheckTransformedWritePixels( + Decoder* aDecoder, SurfaceFilter* aFilter, const BGRAColor& aInputColor, + const BGRAColor& aOutputColor, + const Maybe& aOutputRect = Nothing(), + const Maybe& aInputRect = Nothing(), + const Maybe& aInputWriteRect = Nothing(), + const Maybe& aOutputWriteRect = Nothing(), uint8_t aFuzz = 0); + +/////////////////////////////////////////////////////////////////////////////// +// Decoder Helpers +/////////////////////////////////////////////////////////////////////////////// + +// Friend class of Decoder to access internals for tests. +class MOZ_STACK_CLASS DecoderTestHelper final { + public: + explicit DecoderTestHelper(Decoder* aDecoder) : mDecoder(aDecoder) {} + + void PostIsAnimated(FrameTimeout aTimeout) { + mDecoder->PostIsAnimated(aTimeout); + } + + void PostFrameStop(Opacity aOpacity) { mDecoder->PostFrameStop(aOpacity); } + + private: + Decoder* mDecoder; +}; + +/////////////////////////////////////////////////////////////////////////////// +// Test Data +/////////////////////////////////////////////////////////////////////////////// + +ImageTestCase GreenPNGTestCase(); +ImageTestCase GreenGIFTestCase(); +ImageTestCase GreenJPGTestCase(); +ImageTestCase GreenBMPTestCase(); +ImageTestCase GreenICOTestCase(); +ImageTestCase GreenIconTestCase(); +ImageTestCase GreenWebPTestCase(); +ImageTestCase GreenAVIFTestCase(); + +ImageTestCase NonzeroReservedAVIFTestCase(); +ImageTestCase MultipleColrAVIFTestCase(); +ImageTestCase Transparent10bit420AVIFTestCase(); +ImageTestCase Transparent10bit422AVIFTestCase(); +ImageTestCase Transparent10bit444AVIFTestCase(); +ImageTestCase Transparent12bit420AVIFTestCase(); +ImageTestCase Transparent12bit422AVIFTestCase(); +ImageTestCase Transparent12bit444AVIFTestCase(); +ImageTestCase Transparent8bit420AVIFTestCase(); +ImageTestCase Transparent8bit422AVIFTestCase(); +ImageTestCase Transparent8bit444AVIFTestCase(); + +ImageTestCase Gray8bitLimitedRangeBT601AVIFTestCase(); +ImageTestCase Gray8bitLimitedRangeBT709AVIFTestCase(); +ImageTestCase Gray8bitLimitedRangeBT2020AVIFTestCase(); +ImageTestCase Gray8bitFullRangeBT601AVIFTestCase(); +ImageTestCase Gray8bitFullRangeBT709AVIFTestCase(); +ImageTestCase Gray8bitFullRangeBT2020AVIFTestCase(); +ImageTestCase Gray10bitLimitedRangeBT601AVIFTestCase(); +ImageTestCase Gray10bitLimitedRangeBT709AVIFTestCase(); +ImageTestCase Gray10bitLimitedRangeBT2020AVIFTestCase(); +ImageTestCase Gray10bitFullRangeBT601AVIFTestCase(); +ImageTestCase Gray10bitFullRangeBT709AVIFTestCase(); +ImageTestCase Gray10bitFullRangeBT2020AVIFTestCase(); +ImageTestCase Gray12bitLimitedRangeBT601AVIFTestCase(); +ImageTestCase Gray12bitLimitedRangeBT709AVIFTestCase(); +ImageTestCase Gray12bitLimitedRangeBT2020AVIFTestCase(); +ImageTestCase Gray12bitFullRangeBT601AVIFTestCase(); +ImageTestCase Gray12bitFullRangeBT709AVIFTestCase(); +ImageTestCase Gray12bitFullRangeBT2020AVIFTestCase(); +ImageTestCase Gray8bitLimitedRangeGrayscaleAVIFTestCase(); +ImageTestCase Gray8bitFullRangeGrayscaleAVIFTestCase(); +ImageTestCase Gray10bitLimitedRangeGrayscaleAVIFTestCase(); +ImageTestCase Gray10bitFullRangeGrayscaleAVIFTestCase(); +ImageTestCase Gray12bitLimitedRangeGrayscaleAVIFTestCase(); +ImageTestCase Gray12bitFullRangeGrayscaleAVIFTestCase(); + +ImageTestCase StackCheckAVIFTestCase(); + +ImageTestCase LargeWebPTestCase(); +ImageTestCase GreenWebPIccSrgbTestCase(); + +ImageTestCase GreenFirstFrameAnimatedGIFTestCase(); +ImageTestCase GreenFirstFrameAnimatedPNGTestCase(); +ImageTestCase GreenFirstFrameAnimatedWebPTestCase(); +ImageTestCase GreenFirstFrameAnimatedAVIFTestCase(); + +ImageTestCase BlendAnimatedGIFTestCase(); +ImageTestCase BlendAnimatedPNGTestCase(); +ImageTestCase BlendAnimatedWebPTestCase(); +ImageTestCase BlendAnimatedAVIFTestCase(); + +ImageTestCase CorruptTestCase(); +ImageTestCase CorruptBMPWithTruncatedHeader(); +ImageTestCase CorruptICOWithBadBMPWidthTestCase(); +ImageTestCase CorruptICOWithBadBMPHeightTestCase(); +ImageTestCase CorruptICOWithBadBppTestCase(); + +ImageTestCase TransparentPNGTestCase(); +ImageTestCase TransparentGIFTestCase(); +ImageTestCase TransparentWebPTestCase(); +ImageTestCase TransparentNoAlphaHeaderWebPTestCase(); +ImageTestCase FirstFramePaddingGIFTestCase(); +ImageTestCase TransparentIfWithinICOBMPTestCase(TestCaseFlags aFlags); +ImageTestCase NoFrameDelayGIFTestCase(); +ImageTestCase ExtraImageSubBlocksAnimatedGIFTestCase(); + +ImageTestCase TransparentBMPWhenBMPAlphaEnabledTestCase(); +ImageTestCase RLE4BMPTestCase(); +ImageTestCase RLE8BMPTestCase(); + +ImageTestCase DownscaledPNGTestCase(); +ImageTestCase DownscaledGIFTestCase(); +ImageTestCase DownscaledJPGTestCase(); +ImageTestCase DownscaledBMPTestCase(); +ImageTestCase DownscaledICOTestCase(); +ImageTestCase DownscaledIconTestCase(); +ImageTestCase DownscaledWebPTestCase(); +ImageTestCase DownscaledTransparentICOWithANDMaskTestCase(); + +ImageTestCase TruncatedSmallGIFTestCase(); + +ImageTestCase LargeICOWithBMPTestCase(); +ImageTestCase LargeICOWithPNGTestCase(); +ImageTestCase GreenMultipleSizesICOTestCase(); + +ImageTestCase PerfGrayJPGTestCase(); +ImageTestCase PerfCmykJPGTestCase(); +ImageTestCase PerfYCbCrJPGTestCase(); +ImageTestCase PerfRgbPNGTestCase(); +ImageTestCase PerfRgbAlphaPNGTestCase(); +ImageTestCase PerfGrayPNGTestCase(); +ImageTestCase PerfGrayAlphaPNGTestCase(); +ImageTestCase PerfRgbLosslessWebPTestCase(); +ImageTestCase PerfRgbAlphaLosslessWebPTestCase(); +ImageTestCase PerfRgbLossyWebPTestCase(); +ImageTestCase PerfRgbAlphaLossyWebPTestCase(); +ImageTestCase PerfRgbGIFTestCase(); + +ImageTestCase CorruptAVIFTestCase(); +ImageTestCase DownscaledAVIFTestCase(); +ImageTestCase LargeAVIFTestCase(); +ImageTestCase MultiLayerAVIFTestCase(); +ImageTestCase TransparentAVIFTestCase(); + +#ifdef MOZ_JXL +ImageTestCase GreenJXLTestCase(); +ImageTestCase DownscaledJXLTestCase(); +ImageTestCase LargeJXLTestCase(); +ImageTestCase TransparentJXLTestCase(); +#endif + +ImageTestCase ExifResolutionTestCase(); + +RefPtr TestCaseToDecodedImage(const ImageTestCase&); + +} // namespace image +} // namespace mozilla + +#endif // mozilla_image_test_gtest_Common_h diff --git a/image/test/gtest/TestADAM7InterpolatingFilter.cpp b/image/test/gtest/TestADAM7InterpolatingFilter.cpp new file mode 100644 index 0000000000..b2ae6b5a58 --- /dev/null +++ b/image/test/gtest/TestADAM7InterpolatingFilter.cpp @@ -0,0 +1,595 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=8 sts=2 et sw=2 tw=80: */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include +#include + +#include "gtest/gtest.h" + +#include "mozilla/gfx/2D.h" +#include "mozilla/Maybe.h" +#include "Common.h" +#include "Decoder.h" +#include "DecoderFactory.h" +#include "SourceBuffer.h" +#include "SurfaceFilters.h" +#include "SurfacePipe.h" + +using namespace mozilla; +using namespace mozilla::gfx; +using namespace mozilla::image; + +using std::generate; +using std::vector; + +template +void WithADAM7InterpolatingFilter(const IntSize& aSize, Func aFunc) { + RefPtr decoder = CreateTrivialDecoder(); + ASSERT_TRUE(bool(decoder)); + + WithFilterPipeline( + decoder, std::forward(aFunc), ADAM7InterpolatingConfig{}, + SurfaceConfig{decoder, aSize, SurfaceFormat::OS_RGBA, false}); +} + +void AssertConfiguringADAM7InterpolatingFilterFails(const IntSize& aSize) { + RefPtr decoder = CreateTrivialDecoder(); + ASSERT_TRUE(bool(decoder)); + + AssertConfiguringPipelineFails( + decoder, ADAM7InterpolatingConfig{}, + SurfaceConfig{decoder, aSize, SurfaceFormat::OS_RGBA, false}); +} + +uint8_t InterpolateByte(uint8_t aByteA, uint8_t aByteB, float aWeight) { + return uint8_t(aByteA * aWeight + aByteB * (1.0f - aWeight)); +} + +BGRAColor InterpolateColors(BGRAColor aColor1, BGRAColor aColor2, + float aWeight) { + return BGRAColor(InterpolateByte(aColor1.mBlue, aColor2.mBlue, aWeight), + InterpolateByte(aColor1.mGreen, aColor2.mGreen, aWeight), + InterpolateByte(aColor1.mRed, aColor2.mRed, aWeight), + InterpolateByte(aColor1.mAlpha, aColor2.mAlpha, aWeight)); +} + +enum class ShouldInterpolate { eYes, eNo }; + +BGRAColor HorizontallyInterpolatedPixel(uint32_t aCol, uint32_t aWidth, + const vector& aWeights, + ShouldInterpolate aShouldInterpolate, + const vector& aColors) { + // We cycle through the vector of weights forever. + float weight = aWeights[aCol % aWeights.size()]; + + // Find the columns of the two final pixels for this set of weights. + uint32_t finalPixel1 = aCol - aCol % aWeights.size(); + uint32_t finalPixel2 = finalPixel1 + aWeights.size(); + + // If |finalPixel2| is past the end of the row, that means that there is no + // final pixel after the pixel at |finalPixel1|. In that case, we just want to + // duplicate |finalPixel1|'s color until the end of the row. We can do that by + // setting |finalPixel2| equal to |finalPixel1| so that the interpolation has + // no effect. + if (finalPixel2 >= aWidth) { + finalPixel2 = finalPixel1; + } + + // We cycle through the vector of colors forever (subject to the above + // constraint about the end of the row). + BGRAColor color1 = aColors[finalPixel1 % aColors.size()]; + BGRAColor color2 = aColors[finalPixel2 % aColors.size()]; + + // If we're not interpolating, we treat all pixels which aren't final as + // transparent. Since the number of weights we have is equal to the stride + // between final pixels, we can check if |aCol| is a final pixel by checking + // whether |aCol| is a multiple of |aWeights.size()|. + if (aShouldInterpolate == ShouldInterpolate::eNo) { + return aCol % aWeights.size() == 0 ? color1 : BGRAColor::Transparent(); + } + + // Interpolate. + return InterpolateColors(color1, color2, weight); +} + +vector& InterpolationWeights(int32_t aStride) { + // Precalculated interpolation weights. These are used to interpolate + // between final pixels or between important rows. Although no interpolation + // is actually applied to the previous final pixel or important row value, + // the arrays still start with 1.0f, which is always skipped, primarily + // because otherwise |stride1Weights| would have zero elements. + static vector stride8Weights = {1.0f, 7 / 8.0f, 6 / 8.0f, + 5 / 8.0f, 4 / 8.0f, 3 / 8.0f, + 2 / 8.0f, 1 / 8.0f}; + static vector stride4Weights = {1.0f, 3 / 4.0f, 2 / 4.0f, 1 / 4.0f}; + static vector stride2Weights = {1.0f, 1 / 2.0f}; + static vector stride1Weights = {1.0f}; + + switch (aStride) { + case 8: + return stride8Weights; + case 4: + return stride4Weights; + case 2: + return stride2Weights; + case 1: + return stride1Weights; + default: + MOZ_CRASH(); + } +} + +int32_t ImportantRowStride(uint8_t aPass) { + // The stride between important rows for each pass, with a dummy value for + // the nonexistent pass 0 and for pass 8, since the tests run an extra pass to + // make sure nothing breaks. + static int32_t strides[] = {1, 8, 8, 4, 4, 2, 2, 1, 1}; + + return strides[aPass]; +} + +size_t FinalPixelStride(uint8_t aPass) { + // The stride between the final pixels in important rows for each pass, with + // a dummy value for the nonexistent pass 0 and for pass 8, since the tests + // run an extra pass to make sure nothing breaks. + static size_t strides[] = {1, 8, 4, 4, 2, 2, 1, 1, 1}; + + return strides[aPass]; +} + +bool IsImportantRow(int32_t aRow, uint8_t aPass) { + return aRow % ImportantRowStride(aPass) == 0; +} + +/** + * ADAM7 breaks up the image into 8x8 blocks. On each of the 7 passes, a new + * set of pixels in each block receives their final values, according to the + * following pattern: + * + * 1 6 4 6 2 6 4 6 + * 7 7 7 7 7 7 7 7 + * 5 6 5 6 5 6 5 6 + * 7 7 7 7 7 7 7 7 + * 3 6 4 6 3 6 4 6 + * 7 7 7 7 7 7 7 7 + * 5 6 5 6 5 6 5 6 + * 7 7 7 7 7 7 7 7 + * + * This function produces a row of pixels @aWidth wide, suitable for testing + * horizontal interpolation on pass @aPass. The pattern of pixels used is + * determined by @aPass and @aRow, which determine which pixels are final + * according to the table above, and @aColors, from which the pixel values + * are selected. + * + * There are two different behaviors: if |eNo| is passed for + * @aShouldInterpolate, non-final pixels are treated as transparent. If |eNo| + * is passed, non-final pixels get interpolated in from the surrounding final + * pixels. The intention is that |eNo| is passed to generate input which will + * be run through ADAM7InterpolatingFilter, and |eYes| is passed to generate + * reference data to check that the filter is performing horizontal + * interpolation correctly. + * + * This function does not perform vertical interpolation. Rows which aren't on + * the current pass are filled with transparent pixels. + * + * @return a vector representing a row of pixels. + */ +vector ADAM7HorizontallyInterpolatedRow( + uint8_t aPass, uint32_t aRow, uint32_t aWidth, + ShouldInterpolate aShouldInterpolate, const vector& aColors) { + EXPECT_GT(aPass, 0); + EXPECT_LE(aPass, 8); + EXPECT_GT(aColors.size(), 0u); + + vector result(aWidth); + + if (IsImportantRow(aRow, aPass)) { + vector& weights = InterpolationWeights(FinalPixelStride(aPass)); + + // Compute the horizontally interpolated row. + uint32_t col = 0; + generate(result.begin(), result.end(), [&] { + return HorizontallyInterpolatedPixel(col++, aWidth, weights, + aShouldInterpolate, aColors); + }); + } else { + // This is an unimportant row; just make the entire thing transparent. + generate(result.begin(), result.end(), + [] { return BGRAColor::Transparent(); }); + } + + EXPECT_EQ(result.size(), size_t(aWidth)); + + return result; +} + +WriteState WriteUninterpolatedPixels(SurfaceFilter* aFilter, + const IntSize& aSize, uint8_t aPass, + const vector& aColors) { + WriteState result = WriteState::NEED_MORE_DATA; + + for (int32_t row = 0; row < aSize.height; ++row) { + // Compute uninterpolated pixels for this row. + vector pixels = ADAM7HorizontallyInterpolatedRow( + aPass, row, aSize.width, ShouldInterpolate::eNo, aColors); + + // Write them to the surface. + auto pixelIterator = pixels.cbegin(); + result = aFilter->WritePixelsToRow( + [&] { return AsVariant((*pixelIterator++).AsPixel()); }); + + if (result != WriteState::NEED_MORE_DATA) { + break; + } + } + + return result; +} + +bool CheckHorizontallyInterpolatedImage(image::Decoder* aDecoder, + const IntSize& aSize, uint8_t aPass, + const vector& aColors) { + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + + for (int32_t row = 0; row < aSize.height; ++row) { + if (!IsImportantRow(row, aPass)) { + continue; // Don't check rows which aren't important on this pass. + } + + // Compute the expected pixels, *with* interpolation to match what the + // filter should have done. + vector expectedPixels = ADAM7HorizontallyInterpolatedRow( + aPass, row, aSize.width, ShouldInterpolate::eYes, aColors); + + if (!RowHasPixels(surface, row, expectedPixels)) { + return false; + } + } + + return true; +} + +void CheckHorizontalInterpolation(const IntSize& aSize, + const vector& aColors) { + const IntRect surfaceRect(IntPoint(0, 0), aSize); + + WithADAM7InterpolatingFilter( + aSize, [&](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + // We check horizontal interpolation behavior for each pass + // individually. In addition to the normal 7 passes that ADAM7 includes, + // we also check an eighth pass to verify that nothing breaks if extra + // data is written. + for (uint8_t pass = 1; pass <= 8; ++pass) { + // Write our color pattern to the surface. We don't perform any + // interpolation when writing to the filter so that we can check that + // the filter itself *does*. + WriteState result = + WriteUninterpolatedPixels(aFilter, aSize, pass, aColors); + + EXPECT_EQ(WriteState::FINISHED, result); + AssertCorrectPipelineFinalState(aFilter, surfaceRect, surfaceRect); + + // Check that the generated image matches the expected pattern, with + // interpolation applied. + EXPECT_TRUE(CheckHorizontallyInterpolatedImage(aDecoder, aSize, pass, + aColors)); + + // Prepare for the next pass. + aFilter->ResetToFirstRow(); + } + }); +} + +BGRAColor ADAM7RowColor(int32_t aRow, uint8_t aPass, + const vector& aColors) { + EXPECT_LT(0, aPass); + EXPECT_GE(8, aPass); + EXPECT_LT(0u, aColors.size()); + + // If this is an important row, select the color from the provided vector of + // colors, which we cycle through infinitely. If not, just fill the row with + // transparent pixels. + return IsImportantRow(aRow, aPass) ? aColors[aRow % aColors.size()] + : BGRAColor::Transparent(); +} + +WriteState WriteRowColorPixels(SurfaceFilter* aFilter, const IntSize& aSize, + uint8_t aPass, + const vector& aColors) { + WriteState result = WriteState::NEED_MORE_DATA; + + for (int32_t row = 0; row < aSize.height; ++row) { + const uint32_t color = ADAM7RowColor(row, aPass, aColors).AsPixel(); + + // Fill the surface with |color| pixels. + result = + aFilter->WritePixelsToRow([&] { return AsVariant(color); }); + + if (result != WriteState::NEED_MORE_DATA) { + break; + } + } + + return result; +} + +bool CheckVerticallyInterpolatedImage(image::Decoder* aDecoder, + const IntSize& aSize, uint8_t aPass, + const vector& aColors) { + vector& weights = InterpolationWeights(ImportantRowStride(aPass)); + + for (int32_t row = 0; row < aSize.height; ++row) { + // Vertically interpolation takes place between two important rows. The + // separation between the important rows is determined by the stride of this + // pass. When there is no "next" important row because we'd run off the + // bottom of the image, we use the same row for both. This matches + // ADAM7InterpolatingFilter's behavior of duplicating the last important row + // since there isn't another important row to vertically interpolate it + // with. + const int32_t stride = ImportantRowStride(aPass); + const int32_t prevImportantRow = row - row % stride; + const int32_t maybeNextImportantRow = prevImportantRow + stride; + const int32_t nextImportantRow = maybeNextImportantRow < aSize.height + ? maybeNextImportantRow + : prevImportantRow; + + // Retrieve the colors for the important rows we're going to interpolate. + const BGRAColor prevImportantRowColor = + ADAM7RowColor(prevImportantRow, aPass, aColors); + const BGRAColor nextImportantRowColor = + ADAM7RowColor(nextImportantRow, aPass, aColors); + + // The weight we'll use for interpolation is also determined by the stride. + // A row halfway between two important rows should have pixels that have a + // 50% contribution from each of the important rows, for example. + const float weight = weights[row % stride]; + const BGRAColor interpolatedColor = + InterpolateColors(prevImportantRowColor, nextImportantRowColor, weight); + + // Generate a row of expected pixels. Every pixel in the row is always the + // same color since we're only testing vertical interpolation between + // solid-colored rows. + vector expectedPixels(aSize.width); + generate(expectedPixels.begin(), expectedPixels.end(), + [&] { return interpolatedColor; }); + + // Check that the pixels match. + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + if (!RowHasPixels(surface, row, expectedPixels)) { + return false; + } + } + + return true; +} + +void CheckVerticalInterpolation(const IntSize& aSize, + const vector& aColors) { + const IntRect surfaceRect(IntPoint(0, 0), aSize); + + WithADAM7InterpolatingFilter(aSize, [&](image::Decoder* aDecoder, + SurfaceFilter* aFilter) { + for (uint8_t pass = 1; pass <= 8; ++pass) { + // Write a pattern of rows to the surface. Important rows will receive a + // color selected from |aColors|; unimportant rows will be transparent. + WriteState result = WriteRowColorPixels(aFilter, aSize, pass, aColors); + + EXPECT_EQ(WriteState::FINISHED, result); + AssertCorrectPipelineFinalState(aFilter, surfaceRect, surfaceRect); + + // Check that the generated image matches the expected pattern, with + // interpolation applied. + EXPECT_TRUE( + CheckVerticallyInterpolatedImage(aDecoder, aSize, pass, aColors)); + + // Prepare for the next pass. + aFilter->ResetToFirstRow(); + } + }); +} + +void CheckInterpolation(const IntSize& aSize, + const vector& aColors) { + CheckHorizontalInterpolation(aSize, aColors); + CheckVerticalInterpolation(aSize, aColors); +} + +void CheckADAM7InterpolatingWritePixels(const IntSize& aSize) { + // This test writes 8 passes of green pixels (the seven ADAM7 passes, plus one + // extra to make sure nothing goes wrong if we write too much input) and + // verifies that the output is a solid green surface each time. Because all + // the pixels are the same color, interpolation doesn't matter; we test the + // correctness of the interpolation algorithm itself separately. + WithADAM7InterpolatingFilter( + aSize, [&](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + IntRect rect(IntPoint(0, 0), aSize); + + for (int32_t pass = 1; pass <= 8; ++pass) { + // We only actually write up to the last important row for each pass, + // because that row unambiguously determines the remaining rows. + const int32_t lastRow = aSize.height - 1; + const int32_t lastImportantRow = + lastRow - (lastRow % ImportantRowStride(pass)); + const IntRect inputWriteRect(0, 0, aSize.width, lastImportantRow + 1); + + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(rect), + /* aInputRect = */ Some(rect), + /* aInputWriteRect = */ Some(inputWriteRect)); + + aFilter->ResetToFirstRow(); + EXPECT_FALSE(aFilter->IsSurfaceFinished()); + Maybe invalidRect = aFilter->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isNothing()); + } + }); +} + +TEST(ImageADAM7InterpolatingFilter, WritePixels100_100) +{ CheckADAM7InterpolatingWritePixels(IntSize(100, 100)); } + +TEST(ImageADAM7InterpolatingFilter, WritePixels99_99) +{ CheckADAM7InterpolatingWritePixels(IntSize(99, 99)); } + +TEST(ImageADAM7InterpolatingFilter, WritePixels66_33) +{ CheckADAM7InterpolatingWritePixels(IntSize(66, 33)); } + +TEST(ImageADAM7InterpolatingFilter, WritePixels33_66) +{ CheckADAM7InterpolatingWritePixels(IntSize(33, 66)); } + +TEST(ImageADAM7InterpolatingFilter, WritePixels15_15) +{ CheckADAM7InterpolatingWritePixels(IntSize(15, 15)); } + +TEST(ImageADAM7InterpolatingFilter, WritePixels9_9) +{ CheckADAM7InterpolatingWritePixels(IntSize(9, 9)); } + +TEST(ImageADAM7InterpolatingFilter, WritePixels8_8) +{ CheckADAM7InterpolatingWritePixels(IntSize(8, 8)); } + +TEST(ImageADAM7InterpolatingFilter, WritePixels7_7) +{ CheckADAM7InterpolatingWritePixels(IntSize(7, 7)); } + +TEST(ImageADAM7InterpolatingFilter, WritePixels3_3) +{ CheckADAM7InterpolatingWritePixels(IntSize(3, 3)); } + +TEST(ImageADAM7InterpolatingFilter, WritePixels1_1) +{ CheckADAM7InterpolatingWritePixels(IntSize(1, 1)); } + +TEST(ImageADAM7InterpolatingFilter, TrivialInterpolation48_48) +{ CheckInterpolation(IntSize(48, 48), {BGRAColor::Green()}); } + +TEST(ImageADAM7InterpolatingFilter, InterpolationOutput33_17) +{ + // We check interpolation using irregular patterns to make sure that the + // interpolation will look different for different passes. + CheckInterpolation( + IntSize(33, 17), + {BGRAColor::Green(), BGRAColor::Red(), BGRAColor::Green(), + BGRAColor::Blue(), BGRAColor::Blue(), BGRAColor::Blue(), + BGRAColor::Red(), BGRAColor::Green(), BGRAColor::Red(), + BGRAColor::Red(), BGRAColor::Blue(), BGRAColor::Blue(), + BGRAColor::Green(), BGRAColor::Blue(), BGRAColor::Red(), + BGRAColor::Blue(), BGRAColor::Red(), BGRAColor::Green(), + BGRAColor::Blue(), BGRAColor::Red(), BGRAColor::Green(), + BGRAColor::Red(), BGRAColor::Red(), BGRAColor::Blue(), + BGRAColor::Blue(), BGRAColor::Blue(), BGRAColor::Red(), + BGRAColor::Green(), BGRAColor::Green(), BGRAColor::Blue(), + BGRAColor::Red(), BGRAColor::Blue()}); +} + +TEST(ImageADAM7InterpolatingFilter, InterpolationOutput32_16) +{ + CheckInterpolation( + IntSize(32, 16), + {BGRAColor::Green(), BGRAColor::Red(), BGRAColor::Green(), + BGRAColor::Blue(), BGRAColor::Blue(), BGRAColor::Blue(), + BGRAColor::Red(), BGRAColor::Green(), BGRAColor::Red(), + BGRAColor::Red(), BGRAColor::Blue(), BGRAColor::Blue(), + BGRAColor::Green(), BGRAColor::Blue(), BGRAColor::Red(), + BGRAColor::Blue(), BGRAColor::Red(), BGRAColor::Green(), + BGRAColor::Blue(), BGRAColor::Red(), BGRAColor::Green(), + BGRAColor::Red(), BGRAColor::Red(), BGRAColor::Blue(), + BGRAColor::Blue(), BGRAColor::Blue(), BGRAColor::Red(), + BGRAColor::Green(), BGRAColor::Green(), BGRAColor::Blue(), + BGRAColor::Red(), BGRAColor::Blue()}); +} + +TEST(ImageADAM7InterpolatingFilter, InterpolationOutput31_15) +{ + CheckInterpolation( + IntSize(31, 15), + {BGRAColor::Green(), BGRAColor::Red(), BGRAColor::Green(), + BGRAColor::Blue(), BGRAColor::Blue(), BGRAColor::Blue(), + BGRAColor::Red(), BGRAColor::Green(), BGRAColor::Red(), + BGRAColor::Red(), BGRAColor::Blue(), BGRAColor::Blue(), + BGRAColor::Green(), BGRAColor::Blue(), BGRAColor::Red(), + BGRAColor::Blue(), BGRAColor::Red(), BGRAColor::Green(), + BGRAColor::Blue(), BGRAColor::Red(), BGRAColor::Green(), + BGRAColor::Red(), BGRAColor::Red(), BGRAColor::Blue(), + BGRAColor::Blue(), BGRAColor::Blue(), BGRAColor::Red(), + BGRAColor::Green(), BGRAColor::Green(), BGRAColor::Blue(), + BGRAColor::Red(), BGRAColor::Blue()}); +} + +TEST(ImageADAM7InterpolatingFilter, InterpolationOutput17_33) +{ + CheckInterpolation(IntSize(17, 33), + {BGRAColor::Green(), BGRAColor::Red(), BGRAColor::Green(), + BGRAColor::Blue(), BGRAColor::Red(), BGRAColor::Green(), + BGRAColor::Blue(), BGRAColor::Red(), BGRAColor::Blue(), + BGRAColor::Blue(), BGRAColor::Red(), BGRAColor::Green(), + BGRAColor::Green(), BGRAColor::Red(), BGRAColor::Red(), + BGRAColor::Blue()}); +} + +TEST(ImageADAM7InterpolatingFilter, InterpolationOutput16_32) +{ + CheckInterpolation(IntSize(16, 32), + {BGRAColor::Green(), BGRAColor::Red(), BGRAColor::Green(), + BGRAColor::Blue(), BGRAColor::Red(), BGRAColor::Green(), + BGRAColor::Blue(), BGRAColor::Red(), BGRAColor::Blue(), + BGRAColor::Blue(), BGRAColor::Red(), BGRAColor::Green(), + BGRAColor::Green(), BGRAColor::Red(), BGRAColor::Red(), + BGRAColor::Blue()}); +} + +TEST(ImageADAM7InterpolatingFilter, InterpolationOutput15_31) +{ + CheckInterpolation(IntSize(15, 31), + {BGRAColor::Green(), BGRAColor::Red(), BGRAColor::Green(), + BGRAColor::Blue(), BGRAColor::Red(), BGRAColor::Green(), + BGRAColor::Blue(), BGRAColor::Red(), BGRAColor::Blue(), + BGRAColor::Blue(), BGRAColor::Red(), BGRAColor::Green(), + BGRAColor::Green(), BGRAColor::Red(), BGRAColor::Red(), + BGRAColor::Blue()}); +} + +TEST(ImageADAM7InterpolatingFilter, InterpolationOutput9_9) +{ + CheckInterpolation(IntSize(9, 9), + {BGRAColor::Blue(), BGRAColor::Blue(), BGRAColor::Red(), + BGRAColor::Green(), BGRAColor::Green(), BGRAColor::Red(), + BGRAColor::Red(), BGRAColor::Blue()}); +} + +TEST(ImageADAM7InterpolatingFilter, InterpolationOutput8_8) +{ + CheckInterpolation(IntSize(8, 8), + {BGRAColor::Blue(), BGRAColor::Blue(), BGRAColor::Red(), + BGRAColor::Green(), BGRAColor::Green(), BGRAColor::Red(), + BGRAColor::Red(), BGRAColor::Blue()}); +} + +TEST(ImageADAM7InterpolatingFilter, InterpolationOutput7_7) +{ + CheckInterpolation(IntSize(7, 7), + {BGRAColor::Blue(), BGRAColor::Blue(), BGRAColor::Red(), + BGRAColor::Green(), BGRAColor::Green(), BGRAColor::Red(), + BGRAColor::Red(), BGRAColor::Blue()}); +} + +TEST(ImageADAM7InterpolatingFilter, InterpolationOutput3_3) +{ + CheckInterpolation(IntSize(3, 3), {BGRAColor::Green(), BGRAColor::Red(), + BGRAColor::Blue(), BGRAColor::Red()}); +} + +TEST(ImageADAM7InterpolatingFilter, InterpolationOutput1_1) +{ CheckInterpolation(IntSize(1, 1), {BGRAColor::Blue()}); } + +TEST(ImageADAM7InterpolatingFilter, ADAM7InterpolationFailsFor0_0) +{ + // A 0x0 input size is invalid, so configuration should fail. + AssertConfiguringADAM7InterpolatingFilterFails(IntSize(0, 0)); +} + +TEST(ImageADAM7InterpolatingFilter, ADAM7InterpolationFailsForMinus1_Minus1) +{ + // A negative input size is invalid, so configuration should fail. + AssertConfiguringADAM7InterpolatingFilterFails(IntSize(-1, -1)); +} diff --git a/image/test/gtest/TestAnimationFrameBuffer.cpp b/image/test/gtest/TestAnimationFrameBuffer.cpp new file mode 100644 index 0000000000..78186e5066 --- /dev/null +++ b/image/test/gtest/TestAnimationFrameBuffer.cpp @@ -0,0 +1,895 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include + +#include "AnimationFrameBuffer.h" +#include "Common.h" +#include "gtest/gtest.h" + +using namespace mozilla; +using namespace mozilla::image; + +static already_AddRefed CreateEmptyFrame( + const gfx::IntSize& aSize = gfx::IntSize(1, 1), + const gfx::IntRect& aFrameRect = gfx::IntRect(0, 0, 1, 1), + bool aCanRecycle = true) { + RefPtr frame = new imgFrame(); + AnimationParams animParams{aFrameRect, FrameTimeout::Forever(), + /* aFrameNum */ 1, BlendMethod::OVER, + DisposalMethod::NOT_SPECIFIED}; + nsresult rv = + frame->InitForDecoder(aSize, mozilla::gfx::SurfaceFormat::OS_RGBA, false, + Some(animParams), aCanRecycle); + EXPECT_NS_SUCCEEDED(rv); + RawAccessFrameRef frameRef = frame->RawAccessRef(); + // Normally the blend animation filter would set the dirty rect, but since + // we aren't producing an actual animation here, we need to fake it. + frame->SetDirtyRect(aFrameRect); + frame->Finish(); + return frame.forget(); +} + +static bool ReinitForRecycle(RawAccessFrameRef& aFrame) { + if (!aFrame) { + return false; + } + + AnimationParams animParams{aFrame->GetRect(), FrameTimeout::Forever(), + /* aFrameNum */ 1, BlendMethod::OVER, + DisposalMethod::NOT_SPECIFIED}; + return NS_SUCCEEDED(aFrame->InitForDecoderRecycle(animParams)); +} + +static void PrepareForDiscardingQueue(AnimationFrameRetainedBuffer& aQueue) { + ASSERT_EQ(size_t(0), aQueue.Size()); + ASSERT_LT(size_t(1), aQueue.Batch()); + + AnimationFrameBuffer::InsertStatus status = aQueue.Insert(CreateEmptyFrame()); + EXPECT_EQ(AnimationFrameBuffer::InsertStatus::CONTINUE, status); + + while (true) { + status = aQueue.Insert(CreateEmptyFrame()); + bool restartDecoder = aQueue.AdvanceTo(aQueue.Size() - 1); + EXPECT_FALSE(restartDecoder); + + if (status == AnimationFrameBuffer::InsertStatus::DISCARD_CONTINUE) { + break; + } + EXPECT_EQ(AnimationFrameBuffer::InsertStatus::CONTINUE, status); + } + + EXPECT_EQ(aQueue.Threshold(), aQueue.Size()); +} + +static void VerifyDiscardingQueueContents( + AnimationFrameDiscardingQueue& aQueue) { + auto frames = aQueue.Display(); + for (auto i : frames) { + EXPECT_TRUE(i != nullptr); + } +} + +static void VerifyInsertInternal(AnimationFrameBuffer& aQueue, + imgFrame* aFrame) { + // Determine the frame index where we just inserted the frame. + size_t frameIndex; + if (aQueue.MayDiscard()) { + const AnimationFrameDiscardingQueue& queue = + *static_cast(&aQueue); + frameIndex = queue.PendingInsert() == 0 ? queue.Size() - 1 + : queue.PendingInsert() - 1; + } else { + ASSERT_FALSE(aQueue.SizeKnown()); + frameIndex = aQueue.Size() - 1; + } + + // Make sure we can get the frame from that index. + RefPtr frame = aQueue.Get(frameIndex, false); + EXPECT_EQ(aFrame, frame.get()); +} + +static void VerifyAdvance(AnimationFrameBuffer& aQueue, size_t aExpectedFrame, + bool aExpectedRestartDecoder) { + RefPtr oldFrame; + size_t totalRecycled; + if (aQueue.IsRecycling()) { + AnimationFrameRecyclingQueue& queue = + *static_cast(&aQueue); + oldFrame = queue.Get(queue.Displayed(), false); + totalRecycled = queue.Recycle().size(); + } + + bool restartDecoder = aQueue.AdvanceTo(aExpectedFrame); + EXPECT_EQ(aExpectedRestartDecoder, restartDecoder); + + if (aQueue.IsRecycling()) { + const AnimationFrameRecyclingQueue& queue = + *static_cast(&aQueue); + EXPECT_FALSE(queue.Recycle().back().mDirtyRect.IsEmpty()); + EXPECT_TRUE( + queue.Recycle().back().mDirtyRect.Contains(oldFrame->GetDirtyRect())); + EXPECT_EQ(totalRecycled + 1, queue.Recycle().size()); + EXPECT_EQ(oldFrame.get(), queue.Recycle().back().mFrame.get()); + } +} + +static void VerifyInsertAndAdvance( + AnimationFrameBuffer& aQueue, size_t aExpectedFrame, + AnimationFrameBuffer::InsertStatus aExpectedStatus) { + // Insert the decoded frame. + RefPtr frame = CreateEmptyFrame(); + AnimationFrameBuffer::InsertStatus status = + aQueue.Insert(RefPtr(frame)); + EXPECT_EQ(aExpectedStatus, status); + EXPECT_TRUE(aQueue.IsLastInsertedFrame(frame)); + VerifyInsertInternal(aQueue, frame); + + // Advance the display frame. + bool expectedRestartDecoder = + aExpectedStatus == AnimationFrameBuffer::InsertStatus::YIELD; + VerifyAdvance(aQueue, aExpectedFrame, expectedRestartDecoder); +} + +static void VerifyMarkComplete( + AnimationFrameBuffer& aQueue, bool aExpectedContinue, + const gfx::IntRect& aRefreshArea = gfx::IntRect(0, 0, 1, 1)) { + if (aQueue.IsRecycling() && !aQueue.SizeKnown()) { + const AnimationFrameRecyclingQueue& queue = + *static_cast(&aQueue); + EXPECT_EQ(queue.FirstFrame()->GetRect(), queue.FirstFrameRefreshArea()); + } + + bool keepDecoding = aQueue.MarkComplete(aRefreshArea); + EXPECT_EQ(aExpectedContinue, keepDecoding); + + if (aQueue.IsRecycling()) { + const AnimationFrameRecyclingQueue& queue = + *static_cast(&aQueue); + EXPECT_EQ(aRefreshArea, queue.FirstFrameRefreshArea()); + } +} + +static void VerifyInsert(AnimationFrameBuffer& aQueue, + AnimationFrameBuffer::InsertStatus aExpectedStatus) { + RefPtr frame = CreateEmptyFrame(); + AnimationFrameBuffer::InsertStatus status = + aQueue.Insert(RefPtr(frame)); + EXPECT_EQ(aExpectedStatus, status); + EXPECT_TRUE(aQueue.IsLastInsertedFrame(frame)); + VerifyInsertInternal(aQueue, frame); +} + +static void VerifyReset(AnimationFrameBuffer& aQueue, bool aExpectedContinue, + const imgFrame* aFirstFrame) { + bool keepDecoding = aQueue.Reset(); + EXPECT_EQ(aExpectedContinue, keepDecoding); + EXPECT_EQ(aQueue.Batch() * 2, aQueue.PendingDecode()); + EXPECT_EQ(aFirstFrame, aQueue.Get(0, true)); + + if (!aQueue.MayDiscard()) { + const AnimationFrameRetainedBuffer& queue = + *static_cast(&aQueue); + EXPECT_EQ(aFirstFrame, queue.Frames()[0].get()); + EXPECT_EQ(aFirstFrame, aQueue.Get(0, false)); + } else { + const AnimationFrameDiscardingQueue& queue = + *static_cast(&aQueue); + EXPECT_EQ(size_t(0), queue.PendingInsert()); + EXPECT_EQ(size_t(0), queue.Display().size()); + EXPECT_EQ(aFirstFrame, queue.FirstFrame()); + EXPECT_EQ(nullptr, aQueue.Get(0, false)); + } +} + +class ImageAnimationFrameBuffer : public ::testing::Test { + public: + ImageAnimationFrameBuffer() {} + + private: + AutoInitializeImageLib mInit; +}; + +TEST_F(ImageAnimationFrameBuffer, RetainedInitialState) { + const size_t kThreshold = 800; + const size_t kBatch = 100; + AnimationFrameRetainedBuffer buffer(kThreshold, kBatch, 0); + + EXPECT_EQ(kThreshold, buffer.Threshold()); + EXPECT_EQ(kBatch, buffer.Batch()); + EXPECT_EQ(size_t(0), buffer.Displayed()); + EXPECT_EQ(kBatch * 2, buffer.PendingDecode()); + EXPECT_EQ(size_t(0), buffer.PendingAdvance()); + EXPECT_FALSE(buffer.MayDiscard()); + EXPECT_FALSE(buffer.SizeKnown()); + EXPECT_EQ(size_t(0), buffer.Size()); +} + +TEST_F(ImageAnimationFrameBuffer, ThresholdTooSmall) { + const size_t kThreshold = 0; + const size_t kBatch = 10; + AnimationFrameRetainedBuffer buffer(kThreshold, kBatch, 0); + + EXPECT_EQ(kBatch * 2 + 1, buffer.Threshold()); + EXPECT_EQ(kBatch, buffer.Batch()); + EXPECT_EQ(kBatch * 2, buffer.PendingDecode()); + EXPECT_EQ(size_t(0), buffer.PendingAdvance()); +} + +TEST_F(ImageAnimationFrameBuffer, BatchTooSmall) { + const size_t kThreshold = 10; + const size_t kBatch = 0; + AnimationFrameRetainedBuffer buffer(kThreshold, kBatch, 0); + + EXPECT_EQ(kThreshold, buffer.Threshold()); + EXPECT_EQ(size_t(1), buffer.Batch()); + EXPECT_EQ(size_t(2), buffer.PendingDecode()); + EXPECT_EQ(size_t(0), buffer.PendingAdvance()); +} + +TEST_F(ImageAnimationFrameBuffer, BatchTooBig) { + const size_t kThreshold = 50; + const size_t kBatch = SIZE_MAX; + AnimationFrameRetainedBuffer buffer(kThreshold, kBatch, 0); + + // The rounding is important here (e.g. SIZE_MAX/4 * 2 != SIZE_MAX/2). + EXPECT_EQ(SIZE_MAX / 4, buffer.Batch()); + EXPECT_EQ(buffer.Batch() * 2 + 1, buffer.Threshold()); + EXPECT_EQ(buffer.Batch() * 2, buffer.PendingDecode()); + EXPECT_EQ(size_t(0), buffer.PendingAdvance()); +} + +TEST_F(ImageAnimationFrameBuffer, FinishUnderBatchAndThreshold) { + const size_t kThreshold = 30; + const size_t kBatch = 10; + AnimationFrameRetainedBuffer buffer(kThreshold, kBatch, 0); + const auto& frames = buffer.Frames(); + + EXPECT_EQ(kBatch * 2, buffer.PendingDecode()); + + RefPtr firstFrame; + for (size_t i = 0; i < 5; ++i) { + RefPtr frame = CreateEmptyFrame(); + auto status = buffer.Insert(RefPtr(frame)); + EXPECT_EQ(status, AnimationFrameBuffer::InsertStatus::CONTINUE); + EXPECT_FALSE(buffer.SizeKnown()); + EXPECT_EQ(buffer.Size(), i + 1); + + if (i == 4) { + EXPECT_EQ(size_t(15), buffer.PendingDecode()); + bool keepDecoding = buffer.MarkComplete(gfx::IntRect(0, 0, 1, 1)); + EXPECT_FALSE(keepDecoding); + EXPECT_TRUE(buffer.SizeKnown()); + EXPECT_EQ(size_t(0), buffer.PendingDecode()); + EXPECT_FALSE(buffer.HasRedecodeError()); + } + + EXPECT_FALSE(buffer.MayDiscard()); + + imgFrame* gotFrame = buffer.Get(i, false); + EXPECT_EQ(frame.get(), gotFrame); + ASSERT_EQ(i + 1, frames.Length()); + EXPECT_EQ(frame.get(), frames[i].get()); + + if (i == 0) { + firstFrame = std::move(frame); + EXPECT_EQ(size_t(0), buffer.Displayed()); + } else { + EXPECT_EQ(i - 1, buffer.Displayed()); + bool restartDecoder = buffer.AdvanceTo(i); + EXPECT_FALSE(restartDecoder); + EXPECT_EQ(i, buffer.Displayed()); + } + + gotFrame = buffer.Get(0, false); + EXPECT_EQ(firstFrame.get(), gotFrame); + } + + // Loop again over the animation and make sure it is still all there. + for (size_t i = 0; i < frames.Length(); ++i) { + EXPECT_TRUE(buffer.Get(i, false) != nullptr); + + bool restartDecoder = buffer.AdvanceTo(i); + EXPECT_FALSE(restartDecoder); + } +} + +TEST_F(ImageAnimationFrameBuffer, FinishMultipleBatchesUnderThreshold) { + const size_t kThreshold = 30; + const size_t kBatch = 2; + AnimationFrameRetainedBuffer buffer(kThreshold, kBatch, 0); + const auto& frames = buffer.Frames(); + + EXPECT_EQ(kBatch * 2, buffer.PendingDecode()); + + // Add frames until it tells us to stop. + AnimationFrameBuffer::InsertStatus status; + do { + status = buffer.Insert(CreateEmptyFrame()); + EXPECT_FALSE(buffer.SizeKnown()); + EXPECT_FALSE(buffer.MayDiscard()); + } while (status == AnimationFrameBuffer::InsertStatus::CONTINUE); + + EXPECT_EQ(size_t(0), buffer.PendingDecode()); + EXPECT_EQ(size_t(4), frames.Length()); + EXPECT_EQ(status, AnimationFrameBuffer::InsertStatus::YIELD); + + // Progress through the animation until it lets us decode again. + bool restartDecoder = false; + size_t i = 0; + do { + EXPECT_TRUE(buffer.Get(i, false) != nullptr); + if (i > 0) { + restartDecoder = buffer.AdvanceTo(i); + } + ++i; + } while (!restartDecoder); + + EXPECT_EQ(size_t(2), buffer.PendingDecode()); + EXPECT_EQ(size_t(2), buffer.Displayed()); + + // Add the last frame. + status = buffer.Insert(CreateEmptyFrame()); + EXPECT_EQ(status, AnimationFrameBuffer::InsertStatus::CONTINUE); + bool keepDecoding = buffer.MarkComplete(gfx::IntRect(0, 0, 1, 1)); + EXPECT_FALSE(keepDecoding); + EXPECT_TRUE(buffer.SizeKnown()); + EXPECT_EQ(size_t(0), buffer.PendingDecode()); + EXPECT_EQ(size_t(5), frames.Length()); + EXPECT_FALSE(buffer.HasRedecodeError()); + + // Finish progressing through the animation. + for (; i < frames.Length(); ++i) { + EXPECT_TRUE(buffer.Get(i, false) != nullptr); + restartDecoder = buffer.AdvanceTo(i); + EXPECT_FALSE(restartDecoder); + } + + // Loop again over the animation and make sure it is still all there. + for (i = 0; i < frames.Length(); ++i) { + EXPECT_TRUE(buffer.Get(i, false) != nullptr); + restartDecoder = buffer.AdvanceTo(i); + EXPECT_FALSE(restartDecoder); + } + + // Loop to the third frame and then reset the animation. + for (i = 0; i < 3; ++i) { + EXPECT_TRUE(buffer.Get(i, false) != nullptr); + restartDecoder = buffer.AdvanceTo(i); + EXPECT_FALSE(restartDecoder); + } + + // Since we are below the threshold, we can reset the get index only. + // Nothing else should have changed. + restartDecoder = buffer.Reset(); + EXPECT_FALSE(restartDecoder); + for (i = 0; i < 5; ++i) { + EXPECT_TRUE(buffer.Get(i, false) != nullptr); + } + EXPECT_EQ(size_t(0), buffer.PendingDecode()); + EXPECT_EQ(size_t(0), buffer.PendingAdvance()); + EXPECT_EQ(size_t(0), buffer.Displayed()); +} + +TEST_F(ImageAnimationFrameBuffer, StartAfterBeginning) { + const size_t kThreshold = 30; + const size_t kBatch = 2; + const size_t kStartFrame = 7; + AnimationFrameRetainedBuffer buffer(kThreshold, kBatch, kStartFrame); + + EXPECT_EQ(kStartFrame, buffer.PendingAdvance()); + + // Add frames until it tells us to stop. It should be later than before, + // because it auto-advances until its displayed frame is kStartFrame. + AnimationFrameBuffer::InsertStatus status; + size_t i = 0; + do { + status = buffer.Insert(CreateEmptyFrame()); + EXPECT_FALSE(buffer.SizeKnown()); + EXPECT_FALSE(buffer.MayDiscard()); + + if (i <= kStartFrame) { + EXPECT_EQ(i, buffer.Displayed()); + EXPECT_EQ(kStartFrame - i, buffer.PendingAdvance()); + } else { + EXPECT_EQ(kStartFrame, buffer.Displayed()); + EXPECT_EQ(size_t(0), buffer.PendingAdvance()); + } + + i++; + } while (status == AnimationFrameBuffer::InsertStatus::CONTINUE); + + EXPECT_EQ(size_t(0), buffer.PendingDecode()); + EXPECT_EQ(size_t(0), buffer.PendingAdvance()); + EXPECT_EQ(size_t(10), buffer.Size()); +} + +TEST_F(ImageAnimationFrameBuffer, StartAfterBeginningAndReset) { + const size_t kThreshold = 30; + const size_t kBatch = 2; + const size_t kStartFrame = 7; + AnimationFrameRetainedBuffer buffer(kThreshold, kBatch, kStartFrame); + + EXPECT_EQ(kStartFrame, buffer.PendingAdvance()); + + // Add frames until it tells us to stop. It should be later than before, + // because it auto-advances until its displayed frame is kStartFrame. + for (size_t i = 0; i < 5; ++i) { + AnimationFrameBuffer::InsertStatus status = + buffer.Insert(CreateEmptyFrame()); + EXPECT_EQ(status, AnimationFrameBuffer::InsertStatus::CONTINUE); + EXPECT_FALSE(buffer.SizeKnown()); + EXPECT_FALSE(buffer.MayDiscard()); + EXPECT_EQ(i, buffer.Displayed()); + EXPECT_EQ(kStartFrame - i, buffer.PendingAdvance()); + } + + // When we reset the animation, it goes back to the beginning. That means + // we can forget about what we were told to advance to at the start. While + // we have plenty of frames in our buffer, we still need one more because + // in the real scenario, the decoder thread is still running and it is easier + // to let it insert its last frame than to coordinate quitting earlier. + buffer.Reset(); + EXPECT_EQ(size_t(0), buffer.Displayed()); + EXPECT_EQ(size_t(1), buffer.PendingDecode()); + EXPECT_EQ(size_t(0), buffer.PendingAdvance()); + EXPECT_EQ(size_t(5), buffer.Size()); +} + +static void TestDiscardingQueueLoop(AnimationFrameDiscardingQueue& aQueue, + const imgFrame* aFirstFrame, + size_t aThreshold, size_t aBatch, + size_t aStartFrame) { + // We should be advanced right up to the last decoded frame. + EXPECT_TRUE(aQueue.MayDiscard()); + EXPECT_FALSE(aQueue.SizeKnown()); + EXPECT_EQ(aBatch, aQueue.Batch()); + EXPECT_EQ(aThreshold, aQueue.PendingInsert()); + EXPECT_EQ(aThreshold, aQueue.Size()); + EXPECT_EQ(aFirstFrame, aQueue.FirstFrame()); + EXPECT_EQ(size_t(1), aQueue.Display().size()); + EXPECT_EQ(size_t(3), aQueue.PendingDecode()); + VerifyDiscardingQueueContents(aQueue); + + // Make sure frames get removed as we advance. + VerifyInsertAndAdvance(aQueue, 5, + AnimationFrameBuffer::InsertStatus::CONTINUE); + EXPECT_EQ(size_t(1), aQueue.Display().size()); + VerifyInsertAndAdvance(aQueue, 6, + AnimationFrameBuffer::InsertStatus::CONTINUE); + EXPECT_EQ(size_t(1), aQueue.Display().size()); + + // We actually will yield if we are recycling instead of continuing because + // the pending calculation is slightly different. We will actually request one + // less frame than we have to recycle. + if (aQueue.IsRecycling()) { + VerifyInsertAndAdvance(aQueue, 7, + AnimationFrameBuffer::InsertStatus::YIELD); + } else { + VerifyInsertAndAdvance(aQueue, 7, + AnimationFrameBuffer::InsertStatus::CONTINUE); + } + EXPECT_EQ(size_t(1), aQueue.Display().size()); + + // We should get throttled if we insert too much. + VerifyInsert(aQueue, AnimationFrameBuffer::InsertStatus::CONTINUE); + EXPECT_EQ(size_t(2), aQueue.Display().size()); + EXPECT_EQ(size_t(1), aQueue.PendingDecode()); + VerifyInsert(aQueue, AnimationFrameBuffer::InsertStatus::YIELD); + EXPECT_EQ(size_t(3), aQueue.Display().size()); + EXPECT_EQ(size_t(0), aQueue.PendingDecode()); + + // We should get restarted if we advance. + VerifyAdvance(aQueue, 8, true); + EXPECT_EQ(size_t(2), aQueue.PendingDecode()); + VerifyAdvance(aQueue, 9, false); + EXPECT_EQ(size_t(2), aQueue.PendingDecode()); + + // We should continue decoding if we completed, since we are discarding. + VerifyMarkComplete(aQueue, true); + EXPECT_EQ(size_t(2), aQueue.PendingDecode()); + EXPECT_EQ(size_t(10), aQueue.Size()); + EXPECT_TRUE(aQueue.SizeKnown()); + EXPECT_FALSE(aQueue.HasRedecodeError()); + + // Insert the first frames of the animation. + VerifyInsert(aQueue, AnimationFrameBuffer::InsertStatus::CONTINUE); + VerifyInsert(aQueue, AnimationFrameBuffer::InsertStatus::YIELD); + EXPECT_EQ(size_t(0), aQueue.PendingDecode()); + EXPECT_EQ(size_t(10), aQueue.Size()); + + // Advance back at the beginning. The first frame should only match for + // display purposes. + VerifyAdvance(aQueue, 0, true); + EXPECT_EQ(size_t(2), aQueue.PendingDecode()); + EXPECT_TRUE(aQueue.FirstFrame() != nullptr); + EXPECT_TRUE(aQueue.Get(0, false) != nullptr); + EXPECT_NE(aQueue.FirstFrame(), aQueue.Get(0, false)); + EXPECT_EQ(aQueue.FirstFrame(), aQueue.Get(0, true)); + + // Reiterate one more time and make it loops back. + VerifyInsertAndAdvance(aQueue, 1, + AnimationFrameBuffer::InsertStatus::CONTINUE); + VerifyInsertAndAdvance(aQueue, 2, AnimationFrameBuffer::InsertStatus::YIELD); + VerifyInsertAndAdvance(aQueue, 3, + AnimationFrameBuffer::InsertStatus::CONTINUE); + VerifyInsertAndAdvance(aQueue, 4, AnimationFrameBuffer::InsertStatus::YIELD); + VerifyInsertAndAdvance(aQueue, 5, + AnimationFrameBuffer::InsertStatus::CONTINUE); + VerifyInsertAndAdvance(aQueue, 6, AnimationFrameBuffer::InsertStatus::YIELD); + VerifyInsertAndAdvance(aQueue, 7, + AnimationFrameBuffer::InsertStatus::CONTINUE); + VerifyInsertAndAdvance(aQueue, 8, AnimationFrameBuffer::InsertStatus::YIELD); + + EXPECT_EQ(size_t(10), aQueue.PendingInsert()); + VerifyMarkComplete(aQueue, true); + EXPECT_EQ(size_t(0), aQueue.PendingInsert()); + + VerifyInsertAndAdvance(aQueue, 9, + AnimationFrameBuffer::InsertStatus::CONTINUE); + VerifyInsertAndAdvance(aQueue, 0, AnimationFrameBuffer::InsertStatus::YIELD); + VerifyInsertAndAdvance(aQueue, 1, + AnimationFrameBuffer::InsertStatus::CONTINUE); +} + +TEST_F(ImageAnimationFrameBuffer, DiscardingLoop) { + const size_t kThreshold = 5; + const size_t kBatch = 2; + const size_t kStartFrame = 0; + AnimationFrameRetainedBuffer retained(kThreshold, kBatch, kStartFrame); + PrepareForDiscardingQueue(retained); + const imgFrame* firstFrame = retained.Frames()[0].get(); + AnimationFrameDiscardingQueue buffer(std::move(retained)); + TestDiscardingQueueLoop(buffer, firstFrame, kThreshold, kBatch, kStartFrame); +} + +TEST_F(ImageAnimationFrameBuffer, RecyclingLoop) { + const size_t kThreshold = 5; + const size_t kBatch = 2; + const size_t kStartFrame = 0; + AnimationFrameRetainedBuffer retained(kThreshold, kBatch, kStartFrame); + PrepareForDiscardingQueue(retained); + const imgFrame* firstFrame = retained.Frames()[0].get(); + AnimationFrameRecyclingQueue buffer(std::move(retained)); + + // We should not start with any recycled frames. + ASSERT_TRUE(buffer.Recycle().empty()); + + TestDiscardingQueueLoop(buffer, firstFrame, kThreshold, kBatch, kStartFrame); + + // All the frames we inserted should have been recycleable. + ASSERT_FALSE(buffer.Recycle().empty()); + while (!buffer.Recycle().empty()) { + gfx::IntRect expectedRect(0, 0, 1, 1); + RefPtr expectedFrame = buffer.Recycle().front().mFrame; + EXPECT_FALSE(expectedRect.IsEmpty()); + EXPECT_TRUE(expectedFrame.get() != nullptr); + + gfx::IntRect gotRect; + RawAccessFrameRef gotFrame = buffer.RecycleFrame(gotRect); + EXPECT_EQ(expectedFrame.get(), gotFrame.get()); + EXPECT_EQ(expectedRect, gotRect); + EXPECT_TRUE(ReinitForRecycle(gotFrame)); + } + + // Trying to pull a recycled frame when we have nothing should be safe too. + gfx::IntRect gotRect; + RawAccessFrameRef gotFrame = buffer.RecycleFrame(gotRect); + EXPECT_TRUE(gotFrame.get() == nullptr); + EXPECT_FALSE(ReinitForRecycle(gotFrame)); +} + +static void TestDiscardingQueueReset(AnimationFrameDiscardingQueue& aQueue, + const imgFrame* aFirstFrame, + size_t aThreshold, size_t aBatch, + size_t aStartFrame) { + // We should be advanced right up to the last decoded frame. + EXPECT_TRUE(aQueue.MayDiscard()); + EXPECT_FALSE(aQueue.SizeKnown()); + EXPECT_EQ(aBatch, aQueue.Batch()); + EXPECT_EQ(aThreshold, aQueue.PendingInsert()); + EXPECT_EQ(aThreshold, aQueue.Size()); + EXPECT_EQ(aFirstFrame, aQueue.FirstFrame()); + EXPECT_EQ(size_t(1), aQueue.Display().size()); + EXPECT_EQ(size_t(4), aQueue.PendingDecode()); + VerifyDiscardingQueueContents(aQueue); + + // Reset should clear everything except the first frame. + VerifyReset(aQueue, false, aFirstFrame); +} + +TEST_F(ImageAnimationFrameBuffer, DiscardingReset) { + const size_t kThreshold = 8; + const size_t kBatch = 3; + const size_t kStartFrame = 0; + AnimationFrameRetainedBuffer retained(kThreshold, kBatch, kStartFrame); + PrepareForDiscardingQueue(retained); + const imgFrame* firstFrame = retained.Frames()[0].get(); + AnimationFrameDiscardingQueue buffer(std::move(retained)); + TestDiscardingQueueReset(buffer, firstFrame, kThreshold, kBatch, kStartFrame); +} + +TEST_F(ImageAnimationFrameBuffer, ResetBeforeDiscardingThreshold) { + const size_t kThreshold = 3; + const size_t kBatch = 1; + const size_t kStartFrame = 0; + + // Get the starting buffer to just before the point where we need to switch + // to a discarding buffer, reset the animation so advancing points at the + // first frame, and insert the last frame to cross the threshold. + AnimationFrameRetainedBuffer retained(kThreshold, kBatch, kStartFrame); + VerifyInsert(retained, AnimationFrameBuffer::InsertStatus::CONTINUE); + VerifyInsertAndAdvance(retained, 1, + AnimationFrameBuffer::InsertStatus::YIELD); + bool restartDecoder = retained.Reset(); + EXPECT_FALSE(restartDecoder); + VerifyInsert(retained, AnimationFrameBuffer::InsertStatus::DISCARD_YIELD); + + const imgFrame* firstFrame = retained.Frames()[0].get(); + EXPECT_TRUE(firstFrame != nullptr); + AnimationFrameDiscardingQueue buffer(std::move(retained)); + const imgFrame* displayFirstFrame = buffer.Get(0, true); + const imgFrame* advanceFirstFrame = buffer.Get(0, false); + EXPECT_EQ(firstFrame, displayFirstFrame); + EXPECT_EQ(firstFrame, advanceFirstFrame); +} + +TEST_F(ImageAnimationFrameBuffer, DiscardingTooFewFrames) { + const size_t kThreshold = 3; + const size_t kBatch = 1; + const size_t kStartFrame = 0; + + // First get us to a discarding buffer state. + AnimationFrameRetainedBuffer retained(kThreshold, kBatch, kStartFrame); + VerifyInsert(retained, AnimationFrameBuffer::InsertStatus::CONTINUE); + VerifyInsertAndAdvance(retained, 1, + AnimationFrameBuffer::InsertStatus::YIELD); + VerifyInsert(retained, AnimationFrameBuffer::InsertStatus::DISCARD_YIELD); + + // Insert one more frame. + AnimationFrameDiscardingQueue buffer(std::move(retained)); + VerifyAdvance(buffer, 2, true); + VerifyInsert(buffer, AnimationFrameBuffer::InsertStatus::YIELD); + + // Mark it as complete. + bool restartDecoder = buffer.MarkComplete(gfx::IntRect(0, 0, 1, 1)); + EXPECT_FALSE(restartDecoder); + EXPECT_FALSE(buffer.HasRedecodeError()); + + // Insert one fewer frame than before. + VerifyAdvance(buffer, 3, true); + VerifyInsertAndAdvance(buffer, 0, AnimationFrameBuffer::InsertStatus::YIELD); + VerifyInsertAndAdvance(buffer, 1, AnimationFrameBuffer::InsertStatus::YIELD); + VerifyInsertAndAdvance(buffer, 2, AnimationFrameBuffer::InsertStatus::YIELD); + + // When we mark it as complete, it should fail due to too few frames. + restartDecoder = buffer.MarkComplete(gfx::IntRect(0, 0, 1, 1)); + EXPECT_TRUE(buffer.HasRedecodeError()); + EXPECT_EQ(size_t(0), buffer.PendingDecode()); + EXPECT_EQ(size_t(4), buffer.Size()); +} + +TEST_F(ImageAnimationFrameBuffer, DiscardingTooManyFrames) { + const size_t kThreshold = 3; + const size_t kBatch = 1; + const size_t kStartFrame = 0; + + // First get us to a discarding buffer state. + AnimationFrameRetainedBuffer retained(kThreshold, kBatch, kStartFrame); + VerifyInsert(retained, AnimationFrameBuffer::InsertStatus::CONTINUE); + VerifyInsertAndAdvance(retained, 1, + AnimationFrameBuffer::InsertStatus::YIELD); + VerifyInsert(retained, AnimationFrameBuffer::InsertStatus::DISCARD_YIELD); + + // Insert one more frame. + AnimationFrameDiscardingQueue buffer(std::move(retained)); + VerifyAdvance(buffer, 2, true); + VerifyInsert(buffer, AnimationFrameBuffer::InsertStatus::YIELD); + + // Mark it as complete. + bool restartDecoder = buffer.MarkComplete(gfx::IntRect(0, 0, 1, 1)); + EXPECT_FALSE(restartDecoder); + EXPECT_FALSE(buffer.HasRedecodeError()); + + // Advance and insert to get us back to the end on the redecode. + VerifyAdvance(buffer, 3, true); + VerifyInsertAndAdvance(buffer, 0, AnimationFrameBuffer::InsertStatus::YIELD); + VerifyInsertAndAdvance(buffer, 1, AnimationFrameBuffer::InsertStatus::YIELD); + VerifyInsertAndAdvance(buffer, 2, AnimationFrameBuffer::InsertStatus::YIELD); + VerifyInsertAndAdvance(buffer, 3, AnimationFrameBuffer::InsertStatus::YIELD); + + // Attempt to insert a 5th frame, it should fail. + RefPtr frame = CreateEmptyFrame(); + AnimationFrameBuffer::InsertStatus status = buffer.Insert(std::move(frame)); + EXPECT_EQ(AnimationFrameBuffer::InsertStatus::YIELD, status); + EXPECT_TRUE(buffer.HasRedecodeError()); + EXPECT_EQ(size_t(0), buffer.PendingDecode()); + EXPECT_EQ(size_t(4), buffer.Size()); +} + +TEST_F(ImageAnimationFrameBuffer, RecyclingReset) { + const size_t kThreshold = 8; + const size_t kBatch = 3; + const size_t kStartFrame = 0; + AnimationFrameRetainedBuffer retained(kThreshold, kBatch, kStartFrame); + PrepareForDiscardingQueue(retained); + const imgFrame* firstFrame = retained.Frames()[0].get(); + AnimationFrameRecyclingQueue buffer(std::move(retained)); + TestDiscardingQueueReset(buffer, firstFrame, kThreshold, kBatch, kStartFrame); +} + +TEST_F(ImageAnimationFrameBuffer, RecyclingResetBeforeComplete) { + const size_t kThreshold = 3; + const size_t kBatch = 1; + const size_t kStartFrame = 0; + const gfx::IntSize kImageSize(100, 100); + const gfx::IntRect kImageRect(gfx::IntPoint(0, 0), kImageSize); + AnimationFrameRetainedBuffer retained(kThreshold, kBatch, kStartFrame); + + // Get the starting buffer to just before the point where we need to switch + // to a discarding buffer, reset the animation so advancing points at the + // first frame, and insert the last frame to cross the threshold. + RefPtr frame; + frame = CreateEmptyFrame(kImageSize, kImageRect, false); + AnimationFrameBuffer::InsertStatus status = retained.Insert(std::move(frame)); + EXPECT_EQ(AnimationFrameBuffer::InsertStatus::CONTINUE, status); + + frame = CreateEmptyFrame( + kImageSize, gfx::IntRect(gfx::IntPoint(10, 10), gfx::IntSize(1, 1)), + false); + status = retained.Insert(std::move(frame)); + EXPECT_EQ(AnimationFrameBuffer::InsertStatus::YIELD, status); + + VerifyAdvance(retained, 1, true); + + frame = CreateEmptyFrame( + kImageSize, gfx::IntRect(gfx::IntPoint(20, 10), gfx::IntSize(1, 1)), + false); + status = retained.Insert(std::move(frame)); + EXPECT_EQ(AnimationFrameBuffer::InsertStatus::DISCARD_YIELD, status); + + AnimationFrameRecyclingQueue buffer(std::move(retained)); + bool restartDecoding = buffer.Reset(); + EXPECT_TRUE(restartDecoding); + + // None of the buffers were recyclable. + EXPECT_FALSE(buffer.Recycle().empty()); + while (!buffer.Recycle().empty()) { + gfx::IntRect recycleRect; + RawAccessFrameRef frameRef = buffer.RecycleFrame(recycleRect); + EXPECT_TRUE(frameRef); + EXPECT_FALSE(ReinitForRecycle(frameRef)); + } + + // Reinsert the first two frames as recyclable and reset again. + frame = CreateEmptyFrame(kImageSize, kImageRect, true); + status = buffer.Insert(std::move(frame)); + EXPECT_EQ(AnimationFrameBuffer::InsertStatus::CONTINUE, status); + + frame = CreateEmptyFrame( + kImageSize, gfx::IntRect(gfx::IntPoint(10, 10), gfx::IntSize(1, 1)), + true); + status = buffer.Insert(std::move(frame)); + EXPECT_EQ(AnimationFrameBuffer::InsertStatus::YIELD, status); + + restartDecoding = buffer.Reset(); + EXPECT_TRUE(restartDecoding); + + // Now both buffers should have been saved and the dirty rect replaced with + // the full image rect since we don't know the first frame refresh area yet. + EXPECT_EQ(size_t(2), buffer.Recycle().size()); + for (const auto& entry : buffer.Recycle()) { + EXPECT_EQ(kImageRect, entry.mDirtyRect); + } +} + +TEST_F(ImageAnimationFrameBuffer, RecyclingRect) { + const size_t kThreshold = 5; + const size_t kBatch = 2; + const size_t kStartFrame = 0; + const gfx::IntSize kImageSize(100, 100); + const gfx::IntRect kImageRect(gfx::IntPoint(0, 0), kImageSize); + AnimationFrameRetainedBuffer retained(kThreshold, kBatch, kStartFrame); + + // Let's get to the recycling state while marking all of the frames as not + // recyclable, just like AnimationFrameBuffer / the decoders would do. + RefPtr frame; + frame = CreateEmptyFrame(kImageSize, kImageRect, false); + AnimationFrameBuffer::InsertStatus status = retained.Insert(std::move(frame)); + EXPECT_EQ(AnimationFrameBuffer::InsertStatus::CONTINUE, status); + + frame = CreateEmptyFrame(kImageSize, kImageRect, false); + status = retained.Insert(std::move(frame)); + EXPECT_EQ(AnimationFrameBuffer::InsertStatus::CONTINUE, status); + + frame = CreateEmptyFrame(kImageSize, kImageRect, false); + status = retained.Insert(std::move(frame)); + EXPECT_EQ(AnimationFrameBuffer::InsertStatus::CONTINUE, status); + + frame = CreateEmptyFrame(kImageSize, kImageRect, false); + status = retained.Insert(std::move(frame)); + EXPECT_EQ(AnimationFrameBuffer::InsertStatus::YIELD, status); + + VerifyAdvance(retained, 1, false); + VerifyAdvance(retained, 2, true); + VerifyAdvance(retained, 3, false); + + frame = CreateEmptyFrame(kImageSize, kImageRect, false); + status = retained.Insert(std::move(frame)); + EXPECT_EQ(AnimationFrameBuffer::InsertStatus::DISCARD_CONTINUE, status); + + AnimationFrameRecyclingQueue buffer(std::move(retained)); + + // The first frame is now the candidate for recycling. Since it was marked as + // not recyclable, we should get nothing. + VerifyAdvance(buffer, 4, false); + + gfx::IntRect recycleRect; + EXPECT_FALSE(buffer.Recycle().empty()); + RawAccessFrameRef frameRef = buffer.RecycleFrame(recycleRect); + EXPECT_TRUE(frameRef); + EXPECT_FALSE(ReinitForRecycle(frameRef)); + EXPECT_TRUE(buffer.Recycle().empty()); + + // Insert a recyclable partial frame. Its dirty rect shouldn't matter since + // the previous frame was not recyclable. + frame = CreateEmptyFrame(kImageSize, gfx::IntRect(0, 0, 25, 25)); + status = buffer.Insert(std::move(frame)); + EXPECT_EQ(AnimationFrameBuffer::InsertStatus::YIELD, status); + + VerifyAdvance(buffer, 5, true); + EXPECT_FALSE(buffer.Recycle().empty()); + frameRef = buffer.RecycleFrame(recycleRect); + EXPECT_TRUE(frameRef); + EXPECT_FALSE(ReinitForRecycle(frameRef)); + EXPECT_TRUE(buffer.Recycle().empty()); + + // Insert a recyclable partial frame. Its dirty rect should match the recycle + // rect since it is the only frame in the buffer. + frame = CreateEmptyFrame(kImageSize, gfx::IntRect(25, 0, 50, 50)); + status = buffer.Insert(std::move(frame)); + EXPECT_EQ(AnimationFrameBuffer::InsertStatus::YIELD, status); + + VerifyAdvance(buffer, 6, true); + EXPECT_FALSE(buffer.Recycle().empty()); + frameRef = buffer.RecycleFrame(recycleRect); + EXPECT_TRUE(frameRef); + EXPECT_TRUE(ReinitForRecycle(frameRef)); + EXPECT_EQ(gfx::IntRect(25, 0, 50, 50), recycleRect); + EXPECT_TRUE(buffer.Recycle().empty()); + + // Insert the last frame and mark us as complete. The next recycled frame is + // producing the first frame again, so we should use the first frame refresh + // area instead of its dirty rect. + frame = CreateEmptyFrame(kImageSize, gfx::IntRect(10, 10, 60, 10)); + status = buffer.Insert(std::move(frame)); + EXPECT_EQ(AnimationFrameBuffer::InsertStatus::YIELD, status); + + bool continueDecoding = buffer.MarkComplete(gfx::IntRect(0, 0, 75, 50)); + EXPECT_FALSE(continueDecoding); + + VerifyAdvance(buffer, 7, true); + EXPECT_FALSE(buffer.Recycle().empty()); + frameRef = buffer.RecycleFrame(recycleRect); + EXPECT_TRUE(frameRef); + EXPECT_TRUE(ReinitForRecycle(frameRef)); + EXPECT_EQ(gfx::IntRect(0, 0, 75, 50), recycleRect); + EXPECT_TRUE(buffer.Recycle().empty()); + + // Now let's reinsert the first frame. The recycle rect should still be the + // first frame refresh area instead of the dirty rect of the first frame (e.g. + // the full frame). + frame = CreateEmptyFrame(kImageSize, kImageRect, false); + status = buffer.Insert(std::move(frame)); + EXPECT_EQ(AnimationFrameBuffer::InsertStatus::YIELD, status); + + VerifyAdvance(buffer, 0, true); + EXPECT_FALSE(buffer.Recycle().empty()); + frameRef = buffer.RecycleFrame(recycleRect); + EXPECT_TRUE(frameRef); + EXPECT_TRUE(ReinitForRecycle(frameRef)); + EXPECT_EQ(gfx::IntRect(0, 0, 75, 50), recycleRect); + EXPECT_TRUE(buffer.Recycle().empty()); +} diff --git a/image/test/gtest/TestBlendAnimationFilter.cpp b/image/test/gtest/TestBlendAnimationFilter.cpp new file mode 100644 index 0000000000..7291fbc3f6 --- /dev/null +++ b/image/test/gtest/TestBlendAnimationFilter.cpp @@ -0,0 +1,450 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=8 sts=2 et sw=2 tw=80: */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "gtest/gtest.h" + +#include "mozilla/gfx/2D.h" +#include "skia/include/core/SkColorPriv.h" // for SkPMSrcOver +#include "Common.h" +#include "Decoder.h" +#include "DecoderFactory.h" +#include "SourceBuffer.h" +#include "SurfaceFilters.h" +#include "SurfacePipe.h" + +using namespace mozilla; +using namespace mozilla::gfx; +using namespace mozilla::image; + +static already_AddRefed CreateTrivialBlendingDecoder() { + DecoderType decoderType = DecoderFactory::GetDecoderType("image/gif"); + DecoderFlags decoderFlags = DefaultDecoderFlags(); + SurfaceFlags surfaceFlags = DefaultSurfaceFlags(); + auto sourceBuffer = MakeNotNull>(); + return DecoderFactory::CreateAnonymousDecoder( + decoderType, sourceBuffer, Nothing(), decoderFlags, surfaceFlags); +} + +template +RawAccessFrameRef WithBlendAnimationFilter(image::Decoder* aDecoder, + const AnimationParams& aAnimParams, + const IntSize& aOutputSize, + Func aFunc) { + DecoderTestHelper decoderHelper(aDecoder); + + if (!aDecoder->HasAnimation()) { + decoderHelper.PostIsAnimated(aAnimParams.mTimeout); + } + + BlendAnimationConfig blendAnim{aDecoder}; + SurfaceConfig surfaceSink{aDecoder, aOutputSize, SurfaceFormat::OS_RGBA, + false, Some(aAnimParams)}; + + auto func = [&](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + aFunc(aDecoder, aFilter); + }; + + WithFilterPipeline(aDecoder, func, false, blendAnim, surfaceSink); + + RawAccessFrameRef current = aDecoder->GetCurrentFrameRef(); + if (current) { + decoderHelper.PostFrameStop(Opacity::SOME_TRANSPARENCY); + } + + return current; +} + +void AssertConfiguringBlendAnimationFilterFails(const IntRect& aFrameRect, + const IntSize& aOutputSize) { + RefPtr decoder = CreateTrivialBlendingDecoder(); + ASSERT_TRUE(decoder != nullptr); + + AnimationParams animParams{aFrameRect, FrameTimeout::FromRawMilliseconds(0), + 0, BlendMethod::SOURCE, DisposalMethod::KEEP}; + BlendAnimationConfig blendAnim{decoder}; + SurfaceConfig surfaceSink{decoder, aOutputSize, SurfaceFormat::OS_RGBA, false, + Some(animParams)}; + AssertConfiguringPipelineFails(decoder, blendAnim, surfaceSink); +} + +TEST(ImageBlendAnimationFilter, BlendFailsForNegativeFrameRect) +{ + // A negative frame rect size is disallowed. + AssertConfiguringBlendAnimationFilterFails( + IntRect(IntPoint(0, 0), IntSize(-1, -1)), IntSize(100, 100)); +} + +TEST(ImageBlendAnimationFilter, WriteFullFirstFrame) +{ + RefPtr decoder = CreateTrivialBlendingDecoder(); + ASSERT_TRUE(decoder != nullptr); + + AnimationParams params{ + IntRect(0, 0, 100, 100), FrameTimeout::FromRawMilliseconds(0), + /* aFrameNum */ 0, BlendMethod::SOURCE, DisposalMethod::KEEP}; + RawAccessFrameRef frame0 = WithBlendAnimationFilter( + decoder, params, IntSize(100, 100), + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels(aDecoder, aFilter, Some(IntRect(0, 0, 100, 100))); + }); + EXPECT_EQ(IntRect(0, 0, 100, 100), frame0->GetDirtyRect()); +} + +TEST(ImageBlendAnimationFilter, WritePartialFirstFrame) +{ + RefPtr decoder = CreateTrivialBlendingDecoder(); + ASSERT_TRUE(decoder != nullptr); + + AnimationParams params{ + IntRect(25, 50, 50, 25), FrameTimeout::FromRawMilliseconds(0), + /* aFrameNum */ 0, BlendMethod::SOURCE, DisposalMethod::KEEP}; + RawAccessFrameRef frame0 = WithBlendAnimationFilter( + decoder, params, IntSize(100, 100), + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels(aDecoder, aFilter, Some(IntRect(0, 0, 100, 100)), + Nothing(), Some(IntRect(25, 50, 50, 25)), + Some(IntRect(25, 50, 50, 25))); + }); + EXPECT_EQ(IntRect(0, 0, 100, 100), frame0->GetDirtyRect()); +} + +static void TestWithBlendAnimationFilterClear(BlendMethod aBlendMethod) { + RefPtr decoder = CreateTrivialBlendingDecoder(); + ASSERT_TRUE(decoder != nullptr); + + AnimationParams params0{ + IntRect(0, 0, 100, 100), FrameTimeout::FromRawMilliseconds(0), + /* aFrameNum */ 0, BlendMethod::SOURCE, DisposalMethod::KEEP}; + RawAccessFrameRef frame0 = WithBlendAnimationFilter( + decoder, params0, IntSize(100, 100), + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + auto result = aFilter->WritePixels( + [&] { return AsVariant(BGRAColor::Green().AsPixel()); }); + EXPECT_EQ(WriteState::FINISHED, result); + }); + EXPECT_EQ(IntRect(0, 0, 100, 100), frame0->GetDirtyRect()); + + AnimationParams params1{ + IntRect(0, 40, 100, 20), FrameTimeout::FromRawMilliseconds(0), + /* aFrameNum */ 1, BlendMethod::SOURCE, DisposalMethod::CLEAR}; + RawAccessFrameRef frame1 = WithBlendAnimationFilter( + decoder, params1, IntSize(100, 100), + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + auto result = aFilter->WritePixels( + [&] { return AsVariant(BGRAColor::Red().AsPixel()); }); + EXPECT_EQ(WriteState::FINISHED, result); + }); + EXPECT_EQ(IntRect(0, 40, 100, 20), frame1->GetDirtyRect()); + + ASSERT_TRUE(frame1.get() != nullptr); + + RefPtr surface = frame1->GetSourceSurface(); + EXPECT_TRUE(RowsAreSolidColor(surface, 0, 40, BGRAColor::Green())); + EXPECT_TRUE(RowsAreSolidColor(surface, 40, 20, BGRAColor::Red())); + EXPECT_TRUE(RowsAreSolidColor(surface, 60, 40, BGRAColor::Green())); + + AnimationParams params2{ + IntRect(0, 50, 100, 20), FrameTimeout::FromRawMilliseconds(0), + /* aFrameNum */ 2, aBlendMethod, DisposalMethod::KEEP}; + RawAccessFrameRef frame2 = WithBlendAnimationFilter( + decoder, params2, IntSize(100, 100), + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + auto result = aFilter->WritePixels( + [&] { return AsVariant(BGRAColor::Blue().AsPixel()); }); + EXPECT_EQ(WriteState::FINISHED, result); + }); + + ASSERT_TRUE(frame2.get() != nullptr); + + surface = frame2->GetSourceSurface(); + EXPECT_TRUE(RowsAreSolidColor(surface, 0, 40, BGRAColor::Green())); + EXPECT_TRUE(RowsAreSolidColor(surface, 40, 10, BGRAColor::Transparent())); + EXPECT_TRUE(RowsAreSolidColor(surface, 50, 20, BGRAColor::Blue())); + EXPECT_TRUE(RowsAreSolidColor(surface, 70, 30, BGRAColor::Green())); +} + +TEST(ImageBlendAnimationFilter, ClearWithOver) +{ TestWithBlendAnimationFilterClear(BlendMethod::OVER); } + +TEST(ImageBlendAnimationFilter, ClearWithSource) +{ TestWithBlendAnimationFilterClear(BlendMethod::SOURCE); } + +TEST(ImageBlendAnimationFilter, KeepWithSource) +{ + RefPtr decoder = CreateTrivialBlendingDecoder(); + ASSERT_TRUE(decoder != nullptr); + + AnimationParams params0{ + IntRect(0, 0, 100, 100), FrameTimeout::FromRawMilliseconds(0), + /* aFrameNum */ 0, BlendMethod::SOURCE, DisposalMethod::KEEP}; + RawAccessFrameRef frame0 = WithBlendAnimationFilter( + decoder, params0, IntSize(100, 100), + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + auto result = aFilter->WritePixels( + [&] { return AsVariant(BGRAColor::Green().AsPixel()); }); + EXPECT_EQ(WriteState::FINISHED, result); + }); + EXPECT_EQ(IntRect(0, 0, 100, 100), frame0->GetDirtyRect()); + + AnimationParams params1{ + IntRect(0, 40, 100, 20), FrameTimeout::FromRawMilliseconds(0), + /* aFrameNum */ 1, BlendMethod::SOURCE, DisposalMethod::KEEP}; + RawAccessFrameRef frame1 = WithBlendAnimationFilter( + decoder, params1, IntSize(100, 100), + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + auto result = aFilter->WritePixels( + [&] { return AsVariant(BGRAColor::Red().AsPixel()); }); + EXPECT_EQ(WriteState::FINISHED, result); + }); + EXPECT_EQ(IntRect(0, 40, 100, 20), frame1->GetDirtyRect()); + + ASSERT_TRUE(frame1.get() != nullptr); + + RefPtr surface = frame1->GetSourceSurface(); + EXPECT_TRUE(RowsAreSolidColor(surface, 0, 40, BGRAColor::Green())); + EXPECT_TRUE(RowsAreSolidColor(surface, 40, 20, BGRAColor::Red())); + EXPECT_TRUE(RowsAreSolidColor(surface, 60, 40, BGRAColor::Green())); +} + +TEST(ImageBlendAnimationFilter, KeepWithOver) +{ + RefPtr decoder = CreateTrivialBlendingDecoder(); + ASSERT_TRUE(decoder != nullptr); + + AnimationParams params0{ + IntRect(0, 0, 100, 100), FrameTimeout::FromRawMilliseconds(0), + /* aFrameNum */ 0, BlendMethod::SOURCE, DisposalMethod::KEEP}; + BGRAColor frameColor0(0, 0xFF, 0, 0x40); + RawAccessFrameRef frame0 = WithBlendAnimationFilter( + decoder, params0, IntSize(100, 100), + [&](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + auto result = aFilter->WritePixels( + [&] { return AsVariant(frameColor0.AsPixel()); }); + EXPECT_EQ(WriteState::FINISHED, result); + }); + EXPECT_EQ(IntRect(0, 0, 100, 100), frame0->GetDirtyRect()); + + AnimationParams params1{ + IntRect(0, 40, 100, 20), FrameTimeout::FromRawMilliseconds(0), + /* aFrameNum */ 1, BlendMethod::OVER, DisposalMethod::KEEP}; + BGRAColor frameColor1(0, 0, 0xFF, 0x80); + RawAccessFrameRef frame1 = WithBlendAnimationFilter( + decoder, params1, IntSize(100, 100), + [&](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + auto result = aFilter->WritePixels( + [&] { return AsVariant(frameColor1.AsPixel()); }); + EXPECT_EQ(WriteState::FINISHED, result); + }); + EXPECT_EQ(IntRect(0, 40, 100, 20), frame1->GetDirtyRect()); + + ASSERT_TRUE(frame1.get() != nullptr); + + BGRAColor blendedColor(0, 0x20, 0x80, 0xA0, true); // already premultiplied + EXPECT_EQ(SkPMSrcOver(frameColor1.AsPixel(), frameColor0.AsPixel()), + blendedColor.AsPixel()); + + RefPtr surface = frame1->GetSourceSurface(); + EXPECT_TRUE(RowsAreSolidColor(surface, 0, 40, frameColor0)); + EXPECT_TRUE(RowsAreSolidColor(surface, 40, 20, blendedColor)); + EXPECT_TRUE(RowsAreSolidColor(surface, 60, 40, frameColor0)); +} + +TEST(ImageBlendAnimationFilter, RestorePreviousWithOver) +{ + RefPtr decoder = CreateTrivialBlendingDecoder(); + ASSERT_TRUE(decoder != nullptr); + + AnimationParams params0{ + IntRect(0, 0, 100, 100), FrameTimeout::FromRawMilliseconds(0), + /* aFrameNum */ 0, BlendMethod::SOURCE, DisposalMethod::KEEP}; + BGRAColor frameColor0(0, 0xFF, 0, 0x40); + RawAccessFrameRef frame0 = WithBlendAnimationFilter( + decoder, params0, IntSize(100, 100), + [&](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + auto result = aFilter->WritePixels( + [&] { return AsVariant(frameColor0.AsPixel()); }); + EXPECT_EQ(WriteState::FINISHED, result); + }); + EXPECT_EQ(IntRect(0, 0, 100, 100), frame0->GetDirtyRect()); + + AnimationParams params1{ + IntRect(0, 10, 100, 80), FrameTimeout::FromRawMilliseconds(0), + /* aFrameNum */ 1, BlendMethod::SOURCE, DisposalMethod::RESTORE_PREVIOUS}; + BGRAColor frameColor1 = BGRAColor::Green(); + RawAccessFrameRef frame1 = WithBlendAnimationFilter( + decoder, params1, IntSize(100, 100), + [&](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + auto result = aFilter->WritePixels( + [&] { return AsVariant(frameColor1.AsPixel()); }); + EXPECT_EQ(WriteState::FINISHED, result); + }); + EXPECT_EQ(IntRect(0, 10, 100, 80), frame1->GetDirtyRect()); + + AnimationParams params2{ + IntRect(0, 40, 100, 20), FrameTimeout::FromRawMilliseconds(0), + /* aFrameNum */ 2, BlendMethod::OVER, DisposalMethod::KEEP}; + BGRAColor frameColor2(0, 0, 0xFF, 0x80); + RawAccessFrameRef frame2 = WithBlendAnimationFilter( + decoder, params2, IntSize(100, 100), + [&](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + auto result = aFilter->WritePixels( + [&] { return AsVariant(frameColor2.AsPixel()); }); + EXPECT_EQ(WriteState::FINISHED, result); + }); + EXPECT_EQ(IntRect(0, 10, 100, 80), frame2->GetDirtyRect()); + + ASSERT_TRUE(frame2.get() != nullptr); + + BGRAColor blendedColor(0, 0x20, 0x80, 0xA0, true); // already premultiplied + EXPECT_EQ(SkPMSrcOver(frameColor2.AsPixel(), frameColor0.AsPixel()), + blendedColor.AsPixel()); + + RefPtr surface = frame2->GetSourceSurface(); + EXPECT_TRUE(RowsAreSolidColor(surface, 0, 40, frameColor0)); + EXPECT_TRUE(RowsAreSolidColor(surface, 40, 20, blendedColor)); + EXPECT_TRUE(RowsAreSolidColor(surface, 60, 40, frameColor0)); +} + +TEST(ImageBlendAnimationFilter, RestorePreviousWithSource) +{ + RefPtr decoder = CreateTrivialBlendingDecoder(); + ASSERT_TRUE(decoder != nullptr); + + AnimationParams params0{ + IntRect(0, 0, 100, 100), FrameTimeout::FromRawMilliseconds(0), + /* aFrameNum */ 0, BlendMethod::SOURCE, DisposalMethod::KEEP}; + BGRAColor frameColor0(0, 0xFF, 0, 0x40); + RawAccessFrameRef frame0 = WithBlendAnimationFilter( + decoder, params0, IntSize(100, 100), + [&](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + auto result = aFilter->WritePixels( + [&] { return AsVariant(frameColor0.AsPixel()); }); + EXPECT_EQ(WriteState::FINISHED, result); + }); + EXPECT_EQ(IntRect(0, 0, 100, 100), frame0->GetDirtyRect()); + + AnimationParams params1{ + IntRect(0, 10, 100, 80), FrameTimeout::FromRawMilliseconds(0), + /* aFrameNum */ 1, BlendMethod::SOURCE, DisposalMethod::RESTORE_PREVIOUS}; + BGRAColor frameColor1 = BGRAColor::Green(); + RawAccessFrameRef frame1 = WithBlendAnimationFilter( + decoder, params1, IntSize(100, 100), + [&](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + auto result = aFilter->WritePixels( + [&] { return AsVariant(frameColor1.AsPixel()); }); + EXPECT_EQ(WriteState::FINISHED, result); + }); + EXPECT_EQ(IntRect(0, 10, 100, 80), frame1->GetDirtyRect()); + + AnimationParams params2{ + IntRect(0, 40, 100, 20), FrameTimeout::FromRawMilliseconds(0), + /* aFrameNum */ 2, BlendMethod::SOURCE, DisposalMethod::KEEP}; + BGRAColor frameColor2(0, 0, 0xFF, 0x80); + RawAccessFrameRef frame2 = WithBlendAnimationFilter( + decoder, params2, IntSize(100, 100), + [&](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + auto result = aFilter->WritePixels( + [&] { return AsVariant(frameColor2.AsPixel()); }); + EXPECT_EQ(WriteState::FINISHED, result); + }); + EXPECT_EQ(IntRect(0, 10, 100, 80), frame2->GetDirtyRect()); + + ASSERT_TRUE(frame2.get() != nullptr); + + RefPtr surface = frame2->GetSourceSurface(); + EXPECT_TRUE(RowsAreSolidColor(surface, 0, 40, frameColor0)); + EXPECT_TRUE(RowsAreSolidColor(surface, 40, 20, frameColor2)); + EXPECT_TRUE(RowsAreSolidColor(surface, 60, 40, frameColor0)); +} + +TEST(ImageBlendAnimationFilter, RestorePreviousClearWithSource) +{ + RefPtr decoder = CreateTrivialBlendingDecoder(); + ASSERT_TRUE(decoder != nullptr); + + AnimationParams params0{ + IntRect(0, 0, 100, 100), FrameTimeout::FromRawMilliseconds(0), + /* aFrameNum */ 0, BlendMethod::SOURCE, DisposalMethod::KEEP}; + BGRAColor frameColor0 = BGRAColor::Red(); + RawAccessFrameRef frame0 = WithBlendAnimationFilter( + decoder, params0, IntSize(100, 100), + [&](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + auto result = aFilter->WritePixels( + [&] { return AsVariant(frameColor0.AsPixel()); }); + EXPECT_EQ(WriteState::FINISHED, result); + }); + EXPECT_EQ(IntRect(0, 0, 100, 100), frame0->GetDirtyRect()); + + AnimationParams params1{ + IntRect(0, 0, 100, 20), FrameTimeout::FromRawMilliseconds(0), + /* aFrameNum */ 1, BlendMethod::SOURCE, DisposalMethod::CLEAR}; + BGRAColor frameColor1 = BGRAColor::Blue(); + RawAccessFrameRef frame1 = WithBlendAnimationFilter( + decoder, params1, IntSize(100, 100), + [&](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + auto result = aFilter->WritePixels( + [&] { return AsVariant(frameColor1.AsPixel()); }); + EXPECT_EQ(WriteState::FINISHED, result); + }); + EXPECT_EQ(IntRect(0, 0, 100, 20), frame1->GetDirtyRect()); + + AnimationParams params2{ + IntRect(0, 10, 100, 80), FrameTimeout::FromRawMilliseconds(0), + /* aFrameNum */ 2, BlendMethod::SOURCE, DisposalMethod::RESTORE_PREVIOUS}; + BGRAColor frameColor2 = BGRAColor::Green(); + RawAccessFrameRef frame2 = WithBlendAnimationFilter( + decoder, params2, IntSize(100, 100), + [&](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + auto result = aFilter->WritePixels( + [&] { return AsVariant(frameColor2.AsPixel()); }); + EXPECT_EQ(WriteState::FINISHED, result); + }); + EXPECT_EQ(IntRect(0, 0, 100, 90), frame2->GetDirtyRect()); + + AnimationParams params3{ + IntRect(0, 40, 100, 20), FrameTimeout::FromRawMilliseconds(0), + /* aFrameNum */ 3, BlendMethod::SOURCE, DisposalMethod::KEEP}; + BGRAColor frameColor3 = BGRAColor::Blue(); + RawAccessFrameRef frame3 = WithBlendAnimationFilter( + decoder, params3, IntSize(100, 100), + [&](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + auto result = aFilter->WritePixels( + [&] { return AsVariant(frameColor3.AsPixel()); }); + EXPECT_EQ(WriteState::FINISHED, result); + }); + EXPECT_EQ(IntRect(0, 0, 100, 90), frame3->GetDirtyRect()); + + ASSERT_TRUE(frame3.get() != nullptr); + + RefPtr surface = frame3->GetSourceSurface(); + EXPECT_TRUE(RowsAreSolidColor(surface, 0, 20, BGRAColor::Transparent())); + EXPECT_TRUE(RowsAreSolidColor(surface, 20, 20, frameColor0)); + EXPECT_TRUE(RowsAreSolidColor(surface, 40, 20, frameColor3)); + EXPECT_TRUE(RowsAreSolidColor(surface, 60, 40, frameColor0)); +} + +TEST(ImageBlendAnimationFilter, PartialOverlapFrameRect) +{ + RefPtr decoder = CreateTrivialBlendingDecoder(); + ASSERT_TRUE(decoder != nullptr); + + AnimationParams params0{ + IntRect(-10, -20, 110, 100), FrameTimeout::FromRawMilliseconds(0), + /* aFrameNum */ 0, BlendMethod::SOURCE, DisposalMethod::KEEP}; + BGRAColor frameColor0 = BGRAColor::Red(); + RawAccessFrameRef frame0 = WithBlendAnimationFilter( + decoder, params0, IntSize(100, 100), + [&](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + auto result = aFilter->WritePixels( + [&] { return AsVariant(frameColor0.AsPixel()); }); + EXPECT_EQ(WriteState::FINISHED, result); + }); + EXPECT_EQ(IntRect(0, 0, 100, 100), frame0->GetDirtyRect()); + + RefPtr surface = frame0->GetSourceSurface(); + EXPECT_TRUE(RowsAreSolidColor(surface, 0, 80, frameColor0)); + EXPECT_TRUE(RowsAreSolidColor(surface, 80, 20, BGRAColor::Transparent())); +} diff --git a/image/test/gtest/TestCopyOnWrite.cpp b/image/test/gtest/TestCopyOnWrite.cpp new file mode 100644 index 0000000000..d5ad3e4f6b --- /dev/null +++ b/image/test/gtest/TestCopyOnWrite.cpp @@ -0,0 +1,237 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "gtest/gtest.h" + +#include "CopyOnWrite.h" + +using namespace mozilla; +using namespace mozilla::image; + +struct ValueStats { + int32_t mCopies = 0; + int32_t mFrees = 0; + int32_t mCalls = 0; + int32_t mConstCalls = 0; + int32_t mSerial = 0; +}; + +struct Value { + NS_INLINE_DECL_REFCOUNTING(Value) + + explicit Value(ValueStats& aStats) + : mStats(aStats), mSerial(mStats.mSerial++) {} + + Value(const Value& aOther) + : mStats(aOther.mStats), mSerial(mStats.mSerial++) { + mStats.mCopies++; + } + + void Go() { mStats.mCalls++; } + void Go() const { mStats.mConstCalls++; } + + int32_t Serial() const { return mSerial; } + + protected: + ~Value() { mStats.mFrees++; } + + private: + ValueStats& mStats; + int32_t mSerial; +}; + +TEST(ImageCopyOnWrite, Read) +{ + ValueStats stats; + + { + CopyOnWrite cow(new Value(stats)); + + EXPECT_EQ(0, stats.mCopies); + EXPECT_EQ(0, stats.mFrees); + EXPECT_TRUE(cow.CanRead()); + + cow.Read([&](const Value* aValue) { + EXPECT_EQ(0, stats.mCopies); + EXPECT_EQ(0, stats.mFrees); + EXPECT_EQ(0, aValue->Serial()); + EXPECT_TRUE(cow.CanRead()); + EXPECT_TRUE(cow.CanWrite()); + + aValue->Go(); + + EXPECT_EQ(0, stats.mCalls); + EXPECT_EQ(1, stats.mConstCalls); + }); + + EXPECT_EQ(0, stats.mCopies); + EXPECT_EQ(0, stats.mFrees); + EXPECT_EQ(0, stats.mCalls); + EXPECT_EQ(1, stats.mConstCalls); + } + + EXPECT_EQ(0, stats.mCopies); + EXPECT_EQ(1, stats.mFrees); +} + +TEST(ImageCopyOnWrite, RecursiveRead) +{ + ValueStats stats; + + { + CopyOnWrite cow(new Value(stats)); + + EXPECT_EQ(0, stats.mCopies); + EXPECT_EQ(0, stats.mFrees); + EXPECT_TRUE(cow.CanRead()); + + cow.Read([&](const Value* aValue) { + EXPECT_EQ(0, stats.mCopies); + EXPECT_EQ(0, stats.mFrees); + EXPECT_EQ(0, aValue->Serial()); + EXPECT_TRUE(cow.CanRead()); + EXPECT_TRUE(cow.CanWrite()); + + // Make sure that Read() inside a Read() succeeds. + cow.Read( + [&](const Value* aValue) { + EXPECT_EQ(0, stats.mCopies); + EXPECT_EQ(0, stats.mFrees); + EXPECT_EQ(0, aValue->Serial()); + EXPECT_TRUE(cow.CanRead()); + EXPECT_TRUE(cow.CanWrite()); + + aValue->Go(); + + EXPECT_EQ(0, stats.mCalls); + EXPECT_EQ(1, stats.mConstCalls); + }, + []() { + // This gets called if we can't read. We shouldn't get here. + EXPECT_TRUE(false); + }); + }); + + EXPECT_EQ(0, stats.mCopies); + EXPECT_EQ(0, stats.mFrees); + EXPECT_EQ(0, stats.mCalls); + EXPECT_EQ(1, stats.mConstCalls); + } + + EXPECT_EQ(0, stats.mCopies); + EXPECT_EQ(1, stats.mFrees); +} + +TEST(ImageCopyOnWrite, Write) +{ + ValueStats stats; + + { + CopyOnWrite cow(new Value(stats)); + + EXPECT_EQ(0, stats.mCopies); + EXPECT_EQ(0, stats.mFrees); + EXPECT_TRUE(cow.CanRead()); + EXPECT_TRUE(cow.CanWrite()); + + cow.Write([&](Value* aValue) { + EXPECT_EQ(0, stats.mCopies); + EXPECT_EQ(0, stats.mFrees); + EXPECT_EQ(0, aValue->Serial()); + EXPECT_TRUE(!cow.CanRead()); + EXPECT_TRUE(!cow.CanWrite()); + + aValue->Go(); + + EXPECT_EQ(1, stats.mCalls); + EXPECT_EQ(0, stats.mConstCalls); + }); + + EXPECT_EQ(0, stats.mCopies); + EXPECT_EQ(0, stats.mFrees); + EXPECT_EQ(1, stats.mCalls); + EXPECT_EQ(0, stats.mConstCalls); + } + + EXPECT_EQ(0, stats.mCopies); + EXPECT_EQ(1, stats.mFrees); +} + +TEST(ImageCopyOnWrite, WriteRecursive) +{ + ValueStats stats; + + { + CopyOnWrite cow(new Value(stats)); + + EXPECT_EQ(0, stats.mCopies); + EXPECT_EQ(0, stats.mFrees); + EXPECT_TRUE(cow.CanRead()); + EXPECT_TRUE(cow.CanWrite()); + + cow.Read([&](const Value* aValue) { + EXPECT_EQ(0, stats.mCopies); + EXPECT_EQ(0, stats.mFrees); + EXPECT_EQ(0, aValue->Serial()); + EXPECT_TRUE(cow.CanRead()); + EXPECT_TRUE(cow.CanWrite()); + + // Make sure Write() inside a Read() succeeds. + cow.Write( + [&](Value* aValue) { + EXPECT_EQ(1, stats.mCopies); + EXPECT_EQ(0, stats.mFrees); + EXPECT_EQ(1, aValue->Serial()); + EXPECT_TRUE(!cow.CanRead()); + EXPECT_TRUE(!cow.CanWrite()); + + aValue->Go(); + + EXPECT_EQ(1, stats.mCalls); + EXPECT_EQ(0, stats.mConstCalls); + + // Make sure Read() inside a Write() fails. + cow.Read( + [](const Value* aValue) { + // This gets called if we can read. We shouldn't get here. + EXPECT_TRUE(false); + }, + []() { + // This gets called if we can't read. We *should* get here. + EXPECT_TRUE(true); + }); + + // Make sure Write() inside a Write() fails. + cow.Write( + [](Value* aValue) { + // This gets called if we can write. We shouldn't get here. + EXPECT_TRUE(false); + }, + []() { + // This gets called if we can't write. We *should* get here. + EXPECT_TRUE(true); + }); + }, + []() { + // This gets called if we can't write. We shouldn't get here. + EXPECT_TRUE(false); + }); + + aValue->Go(); + + EXPECT_EQ(1, stats.mCopies); + EXPECT_EQ(0, stats.mFrees); + EXPECT_EQ(1, stats.mCalls); + EXPECT_EQ(1, stats.mConstCalls); + }); + + EXPECT_EQ(1, stats.mCopies); + EXPECT_EQ(1, stats.mFrees); + EXPECT_EQ(1, stats.mCalls); + EXPECT_EQ(1, stats.mConstCalls); + } + + EXPECT_EQ(1, stats.mCopies); + EXPECT_EQ(2, stats.mFrees); +} diff --git a/image/test/gtest/TestDecodeToSurface.cpp b/image/test/gtest/TestDecodeToSurface.cpp new file mode 100644 index 0000000000..838f957c43 --- /dev/null +++ b/image/test/gtest/TestDecodeToSurface.cpp @@ -0,0 +1,173 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "gtest/gtest.h" + +#include "Common.h" +#include "imgIContainer.h" +#include "ImageOps.h" +#include "mozilla/gfx/2D.h" +#include "nsComponentManagerUtils.h" +#include "nsCOMPtr.h" +#include "nsIInputStream.h" +#include "nsIRunnable.h" +#include "nsIThread.h" +#include "mozilla/RefPtr.h" +#include "nsString.h" +#include "nsThreadUtils.h" + +using namespace mozilla; +using namespace mozilla::gfx; +using namespace mozilla::image; + +class DecodeToSurfaceRunnable : public Runnable { + public: + DecodeToSurfaceRunnable(RefPtr& aSurface, + nsIInputStream* aInputStream, + ImageOps::ImageBuffer* aImageBuffer, + const ImageTestCase& aTestCase) + : mozilla::Runnable("DecodeToSurfaceRunnable"), + mSurface(aSurface), + mInputStream(aInputStream), + mImageBuffer(aImageBuffer), + mTestCase(aTestCase) {} + + NS_IMETHOD Run() override { + Go(); + return NS_OK; + } + + void Go() { + Maybe outputSize; + if (mTestCase.mOutputSize != mTestCase.mSize) { + outputSize.emplace(mTestCase.mOutputSize); + } + + uint32_t flags = FromSurfaceFlags(mTestCase.mSurfaceFlags); + + if (mImageBuffer) { + mSurface = ImageOps::DecodeToSurface( + mImageBuffer, nsDependentCString(mTestCase.mMimeType), flags, + outputSize); + } else { + mSurface = ImageOps::DecodeToSurface( + mInputStream.forget(), nsDependentCString(mTestCase.mMimeType), flags, + outputSize); + } + ASSERT_TRUE(mSurface != nullptr); + + EXPECT_TRUE(mSurface->IsDataSourceSurface()); + EXPECT_TRUE(mSurface->GetFormat() == SurfaceFormat::OS_RGBX || + mSurface->GetFormat() == SurfaceFormat::OS_RGBA); + + if (outputSize) { + EXPECT_EQ(*outputSize, mSurface->GetSize()); + } else { + EXPECT_EQ(mTestCase.mSize, mSurface->GetSize()); + } + + EXPECT_TRUE(IsSolidColor(mSurface, mTestCase.Color(), mTestCase.Fuzz())); + } + + private: + RefPtr& mSurface; + nsCOMPtr mInputStream; + RefPtr mImageBuffer; + ImageTestCase mTestCase; +}; + +static void RunDecodeToSurface(const ImageTestCase& aTestCase, + ImageOps::ImageBuffer* aImageBuffer = nullptr) { + nsCOMPtr inputStream; + if (!aImageBuffer) { + inputStream = LoadFile(aTestCase.mPath); + ASSERT_TRUE(inputStream != nullptr); + } + + nsCOMPtr thread; + nsresult rv = + NS_NewNamedThread("DecodeToSurface", getter_AddRefs(thread), nullptr); + ASSERT_NS_SUCCEEDED(rv); + + // We run the DecodeToSurface tests off-main-thread to ensure that + // DecodeToSurface doesn't require any main-thread-only code. + RefPtr surface; + nsCOMPtr runnable = new DecodeToSurfaceRunnable( + surface, inputStream, aImageBuffer, aTestCase); + NS_DispatchAndSpinEventLoopUntilComplete("RunDecodeToSurface"_ns, thread, + do_AddRef(runnable)); + + thread->Shutdown(); + + // Explicitly release the SourceSurface on the main thread. + surface = nullptr; +} + +class ImageDecodeToSurface : public ::testing::Test { + protected: + AutoInitializeImageLib mInit; +}; + +TEST_F(ImageDecodeToSurface, PNG) { RunDecodeToSurface(GreenPNGTestCase()); } +TEST_F(ImageDecodeToSurface, GIF) { RunDecodeToSurface(GreenGIFTestCase()); } +TEST_F(ImageDecodeToSurface, JPG) { RunDecodeToSurface(GreenJPGTestCase()); } +TEST_F(ImageDecodeToSurface, BMP) { RunDecodeToSurface(GreenBMPTestCase()); } +TEST_F(ImageDecodeToSurface, ICO) { RunDecodeToSurface(GreenICOTestCase()); } +TEST_F(ImageDecodeToSurface, Icon) { RunDecodeToSurface(GreenIconTestCase()); } +TEST_F(ImageDecodeToSurface, WebP) { RunDecodeToSurface(GreenWebPTestCase()); } + +TEST_F(ImageDecodeToSurface, AnimatedGIF) { + RunDecodeToSurface(GreenFirstFrameAnimatedGIFTestCase()); +} + +TEST_F(ImageDecodeToSurface, AnimatedPNG) { + RunDecodeToSurface(GreenFirstFrameAnimatedPNGTestCase()); +} + +TEST_F(ImageDecodeToSurface, Corrupt) { + ImageTestCase testCase = CorruptTestCase(); + + nsCOMPtr inputStream = LoadFile(testCase.mPath); + ASSERT_TRUE(inputStream != nullptr); + + RefPtr surface = ImageOps::DecodeToSurface( + inputStream.forget(), nsDependentCString(testCase.mMimeType), + imgIContainer::DECODE_FLAGS_DEFAULT); + EXPECT_TRUE(surface == nullptr); +} + +TEST_F(ImageDecodeToSurface, ICOMultipleSizes) { + ImageTestCase testCase = GreenMultipleSizesICOTestCase(); + + nsCOMPtr inputStream = LoadFile(testCase.mPath); + ASSERT_TRUE(inputStream != nullptr); + + RefPtr buffer = + ImageOps::CreateImageBuffer(inputStream.forget()); + ASSERT_TRUE(buffer != nullptr); + + ImageMetadata metadata; + nsresult rv = ImageOps::DecodeMetadata( + buffer, nsDependentCString(testCase.mMimeType), metadata); + EXPECT_NS_SUCCEEDED(rv); + ASSERT_TRUE(metadata.HasSize()); + EXPECT_EQ(testCase.mSize, metadata.GetSize().ToUnknownSize()); + + const nsTArray& nativeSizes = metadata.GetNativeSizes(); + ASSERT_EQ(6u, nativeSizes.Length()); + + OrientedIntSize expectedSizes[] = { + OrientedIntSize(16, 16), OrientedIntSize(32, 32), + OrientedIntSize(64, 64), OrientedIntSize(128, 128), + OrientedIntSize(256, 256), OrientedIntSize(256, 128), + }; + + for (int i = 0; i < 6; ++i) { + EXPECT_EQ(expectedSizes[i], nativeSizes[i]); + + // Request decoding at native size + testCase.mOutputSize = nativeSizes[i].ToUnknownSize(); + RunDecodeToSurface(testCase, buffer); + } +} diff --git a/image/test/gtest/TestDecoders.cpp b/image/test/gtest/TestDecoders.cpp new file mode 100644 index 0000000000..f043b011d0 --- /dev/null +++ b/image/test/gtest/TestDecoders.cpp @@ -0,0 +1,1142 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "gtest/gtest.h" + +#include "Common.h" +#include "AnimationSurfaceProvider.h" +#include "DecodePool.h" +#include "Decoder.h" +#include "DecoderFactory.h" +#include "decoders/nsBMPDecoder.h" +#include "IDecodingTask.h" +#include "ImageOps.h" +#include "imgIContainer.h" +#include "ImageFactory.h" +#include "mozilla/ScopeExit.h" +#include "mozilla/gfx/2D.h" +#include "nsComponentManagerUtils.h" +#include "nsCOMPtr.h" +#include "nsIInputStream.h" +#include "mozilla/RefPtr.h" +#include "nsStreamUtils.h" +#include "nsString.h" +#include "nsThreadUtils.h" +#include "ProgressTracker.h" +#include "SourceBuffer.h" + +using namespace mozilla; +using namespace mozilla::gfx; +using namespace mozilla::image; + +static already_AddRefed CheckDecoderState( + const ImageTestCase& aTestCase, image::Decoder* aDecoder) { + // image::Decoder should match what we asked for in the MIME type. + EXPECT_NE(aDecoder->GetType(), DecoderType::UNKNOWN); + EXPECT_EQ(aDecoder->GetType(), + DecoderFactory::GetDecoderType(aTestCase.mMimeType)); + + EXPECT_TRUE(aDecoder->GetDecodeDone()); + EXPECT_EQ(bool(aTestCase.mFlags & TEST_CASE_HAS_ERROR), aDecoder->HasError()); + + // Verify that the decoder made the expected progress. + Progress progress = aDecoder->TakeProgress(); + EXPECT_EQ(bool(aTestCase.mFlags & TEST_CASE_HAS_ERROR), + bool(progress & FLAG_HAS_ERROR)); + + if (aTestCase.mFlags & TEST_CASE_HAS_ERROR) { + return nullptr; // That's all we can check for bad images. + } + + EXPECT_TRUE(bool(progress & FLAG_SIZE_AVAILABLE)); + EXPECT_TRUE(bool(progress & FLAG_DECODE_COMPLETE)); + EXPECT_TRUE(bool(progress & FLAG_FRAME_COMPLETE)); + EXPECT_EQ(bool(aTestCase.mFlags & TEST_CASE_IS_TRANSPARENT), + bool(progress & FLAG_HAS_TRANSPARENCY)); + EXPECT_EQ(bool(aTestCase.mFlags & TEST_CASE_IS_ANIMATED), + bool(progress & FLAG_IS_ANIMATED)); + + // The decoder should get the correct size. + OrientedIntSize size = aDecoder->Size(); + EXPECT_EQ(aTestCase.mSize.width, size.width); + EXPECT_EQ(aTestCase.mSize.height, size.height); + + // Get the current frame, which is always the first frame of the image + // because CreateAnonymousDecoder() forces a first-frame-only decode. + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + + // Verify that the resulting surfaces matches our expectations. + EXPECT_TRUE(surface->IsDataSourceSurface()); + EXPECT_TRUE(surface->GetFormat() == SurfaceFormat::OS_RGBX || + surface->GetFormat() == SurfaceFormat::OS_RGBA); + EXPECT_EQ(aTestCase.mOutputSize, surface->GetSize()); + + return surface.forget(); +} + +static void CheckDecoderResults(const ImageTestCase& aTestCase, + image::Decoder* aDecoder) { + RefPtr surface = CheckDecoderState(aTestCase, aDecoder); + if (!surface) { + return; + } + + if (aTestCase.mFlags & TEST_CASE_IGNORE_OUTPUT) { + return; + } + + // Check the output. + EXPECT_TRUE(IsSolidColor(surface, aTestCase.Color(), aTestCase.Fuzz())); +} + +template +void WithBadBufferDecode(const ImageTestCase& aTestCase, + const Maybe& aOutputSize, + Func aResultChecker) { + // Prepare a SourceBuffer with an error that will immediately move iterators + // to COMPLETE. + auto sourceBuffer = MakeNotNull>(); + sourceBuffer->ExpectLength(SIZE_MAX); + + // Create a decoder. + DecoderType decoderType = DecoderFactory::GetDecoderType(aTestCase.mMimeType); + RefPtr decoder = DecoderFactory::CreateAnonymousDecoder( + decoderType, sourceBuffer, aOutputSize, DecoderFlags::FIRST_FRAME_ONLY, + aTestCase.mSurfaceFlags); + ASSERT_TRUE(decoder != nullptr); + RefPtr task = + new AnonymousDecodingTask(WrapNotNull(decoder), /* aResumable */ false); + + // Run the full decoder synchronously on the main thread. + task->Run(); + + // Call the lambda to verify the expected results. + aResultChecker(decoder); +} + +static void CheckDecoderBadBuffer(const ImageTestCase& aTestCase) { + WithBadBufferDecode(aTestCase, Nothing(), [&](image::Decoder* aDecoder) { + CheckDecoderResults(aTestCase, aDecoder); + }); +} + +template +void WithSingleChunkDecode(const ImageTestCase& aTestCase, + const Maybe& aOutputSize, + bool aUseDecodePool, Func aResultChecker) { + nsCOMPtr inputStream = LoadFile(aTestCase.mPath); + ASSERT_TRUE(inputStream != nullptr); + + // Figure out how much data we have. + uint64_t length; + nsresult rv = inputStream->Available(&length); + ASSERT_NS_SUCCEEDED(rv); + + // Write the data into a SourceBuffer. + auto sourceBuffer = MakeNotNull>(); + sourceBuffer->ExpectLength(length); + rv = sourceBuffer->AppendFromInputStream(inputStream, length); + ASSERT_NS_SUCCEEDED(rv); + sourceBuffer->Complete(NS_OK); + + // Create a decoder. + DecoderType decoderType = DecoderFactory::GetDecoderType(aTestCase.mMimeType); + DecoderFlags decoderFlags = + DecoderFactory::GetDefaultDecoderFlagsForType(decoderType) | + DecoderFlags::FIRST_FRAME_ONLY; + RefPtr decoder = DecoderFactory::CreateAnonymousDecoder( + decoderType, sourceBuffer, aOutputSize, decoderFlags, + aTestCase.mSurfaceFlags); + ASSERT_TRUE(decoder != nullptr); + RefPtr task = + new AnonymousDecodingTask(WrapNotNull(decoder), /* aResumable */ false); + + if (aUseDecodePool) { + DecodePool::Singleton()->AsyncRun(task.get()); + + while (!decoder->GetDecodeDone()) { + task->Resume(); + } + } else { // Run the full decoder synchronously on the main thread. + task->Run(); + } + + // Call the lambda to verify the expected results. + aResultChecker(decoder); +} + +static void CheckDecoderSingleChunk(const ImageTestCase& aTestCase, + bool aUseDecodePool = false) { + WithSingleChunkDecode(aTestCase, Nothing(), aUseDecodePool, + [&](image::Decoder* aDecoder) { + CheckDecoderResults(aTestCase, aDecoder); + }); +} + +template +void WithDelayedChunkDecode(const ImageTestCase& aTestCase, + const Maybe& aOutputSize, + Func aResultChecker) { + nsCOMPtr inputStream = LoadFile(aTestCase.mPath); + ASSERT_TRUE(inputStream != nullptr); + + // Figure out how much data we have. + uint64_t length; + nsresult rv = inputStream->Available(&length); + ASSERT_NS_SUCCEEDED(rv); + + // Prepare an empty SourceBuffer. + auto sourceBuffer = MakeNotNull>(); + + // Create a decoder. + DecoderType decoderType = DecoderFactory::GetDecoderType(aTestCase.mMimeType); + RefPtr decoder = DecoderFactory::CreateAnonymousDecoder( + decoderType, sourceBuffer, aOutputSize, DecoderFlags::FIRST_FRAME_ONLY, + aTestCase.mSurfaceFlags); + ASSERT_TRUE(decoder != nullptr); + RefPtr task = + new AnonymousDecodingTask(WrapNotNull(decoder), /* aResumable */ true); + + // Run the full decoder synchronously. It should now be waiting on + // the iterator to yield some data since we haven't written anything yet. + task->Run(); + + // Writing all of the data should wake up the decoder to complete. + sourceBuffer->ExpectLength(length); + rv = sourceBuffer->AppendFromInputStream(inputStream, length); + ASSERT_NS_SUCCEEDED(rv); + sourceBuffer->Complete(NS_OK); + + // It would have gotten posted to the main thread to avoid mutex contention. + SpinPendingEvents(); + + // Call the lambda to verify the expected results. + aResultChecker(decoder); +} + +static void CheckDecoderDelayedChunk(const ImageTestCase& aTestCase) { + WithDelayedChunkDecode(aTestCase, Nothing(), [&](image::Decoder* aDecoder) { + CheckDecoderResults(aTestCase, aDecoder); + }); +} + +static void CheckDecoderMultiChunk(const ImageTestCase& aTestCase, + uint64_t aChunkSize = 1) { + nsCOMPtr inputStream = LoadFile(aTestCase.mPath); + ASSERT_TRUE(inputStream != nullptr); + + // Figure out how much data we have. + uint64_t length; + nsresult rv = inputStream->Available(&length); + ASSERT_NS_SUCCEEDED(rv); + + // Create a SourceBuffer and a decoder. + auto sourceBuffer = MakeNotNull>(); + sourceBuffer->ExpectLength(length); + DecoderType decoderType = DecoderFactory::GetDecoderType(aTestCase.mMimeType); + DecoderFlags decoderFlags = + DecoderFactory::GetDefaultDecoderFlagsForType(decoderType) | + DecoderFlags::FIRST_FRAME_ONLY; + RefPtr decoder = DecoderFactory::CreateAnonymousDecoder( + decoderType, sourceBuffer, Nothing(), decoderFlags, + aTestCase.mSurfaceFlags); + ASSERT_TRUE(decoder != nullptr); + RefPtr task = + new AnonymousDecodingTask(WrapNotNull(decoder), /* aResumable */ true); + + // Run the full decoder synchronously. It should now be waiting on + // the iterator to yield some data since we haven't written anything yet. + task->Run(); + + while (length > 0) { + uint64_t read = length > aChunkSize ? aChunkSize : length; + length -= read; + + uint64_t available = 0; + rv = inputStream->Available(&available); + ASSERT_TRUE(available >= read); + ASSERT_NS_SUCCEEDED(rv); + + // Writing any data should wake up the decoder to complete. + rv = sourceBuffer->AppendFromInputStream(inputStream, read); + ASSERT_NS_SUCCEEDED(rv); + + // It would have gotten posted to the main thread to avoid mutex contention. + SpinPendingEvents(); + } + + sourceBuffer->Complete(NS_OK); + SpinPendingEvents(); + + CheckDecoderResults(aTestCase, decoder); +} + +static void CheckDownscaleDuringDecode(const ImageTestCase& aTestCase) { + // This function expects that |aTestCase| consists of 25 lines of green, + // followed by 25 lines of red, followed by 25 lines of green, followed by 25 + // more lines of red. We'll downscale it from 100x100 to 20x20. + IntSize outputSize(20, 20); + + WithSingleChunkDecode( + aTestCase, Some(outputSize), /* aUseDecodePool */ false, + [&](image::Decoder* aDecoder) { + RefPtr surface = CheckDecoderState(aTestCase, aDecoder); + + // There are no downscale-during-decode tests that have + // TEST_CASE_HAS_ERROR set, so we expect to always get a surface here. + EXPECT_TRUE(surface != nullptr); + + if (aTestCase.mFlags & TEST_CASE_IGNORE_OUTPUT) { + return; + } + + // Check that the downscaled image is correct. Note that we skip rows + // near the transitions between colors, since the downscaler does not + // produce a sharp boundary at these points. Even some of the rows we + // test need a small amount of fuzz; this is just the nature of Lanczos + // downscaling. + EXPECT_TRUE(RowsAreSolidColor(surface, 0, 4, + aTestCase.ChooseColor(BGRAColor::Green()), + /* aFuzz = */ 47)); + EXPECT_TRUE(RowsAreSolidColor(surface, 6, 3, + aTestCase.ChooseColor(BGRAColor::Red()), + /* aFuzz = */ 27)); + EXPECT_TRUE(RowsAreSolidColor(surface, 11, 3, BGRAColor::Green(), + /* aFuzz = */ 47)); + EXPECT_TRUE(RowsAreSolidColor(surface, 16, 4, + aTestCase.ChooseColor(BGRAColor::Red()), + /* aFuzz = */ 27)); + }); +} + +static void CheckAnimationDecoderResults(const ImageTestCase& aTestCase, + AnimationSurfaceProvider* aProvider, + image::Decoder* aDecoder) { + EXPECT_TRUE(aDecoder->GetDecodeDone()); + EXPECT_EQ(bool(aTestCase.mFlags & TEST_CASE_HAS_ERROR), aDecoder->HasError()); + + if (aTestCase.mFlags & TEST_CASE_HAS_ERROR) { + return; // That's all we can check for bad images. + } + + // The decoder should get the correct size. + OrientedIntSize size = aDecoder->Size(); + EXPECT_EQ(aTestCase.mSize.width, size.width); + EXPECT_EQ(aTestCase.mSize.height, size.height); + + if (aTestCase.mFlags & TEST_CASE_IGNORE_OUTPUT) { + return; + } + + // Check the output. + AutoTArray framePixels; + framePixels.AppendElement(aTestCase.ChooseColor(BGRAColor::Green())); + framePixels.AppendElement( + aTestCase.ChooseColor(BGRAColor(0x7F, 0x7F, 0x7F, 0xFF))); + + DrawableSurface drawableSurface(WrapNotNull(aProvider)); + for (size_t i = 0; i < framePixels.Length(); ++i) { + nsresult rv = drawableSurface.Seek(i); + EXPECT_NS_SUCCEEDED(rv); + + // Check the first frame, all green. + RawAccessFrameRef rawFrame = drawableSurface->RawAccessRef(); + RefPtr surface = rawFrame->GetSourceSurface(); + + // Verify that the resulting surfaces matches our expectations. + EXPECT_TRUE(surface->IsDataSourceSurface()); + EXPECT_TRUE(surface->GetFormat() == SurfaceFormat::OS_RGBX || + surface->GetFormat() == SurfaceFormat::OS_RGBA); + EXPECT_EQ(aTestCase.mOutputSize, surface->GetSize()); + EXPECT_TRUE(IsSolidColor(surface, framePixels[i], aTestCase.Fuzz())); + } + + // Should be no more frames. + nsresult rv = drawableSurface.Seek(framePixels.Length()); + EXPECT_NS_FAILED(rv); +} + +template +static void WithSingleChunkAnimationDecode(const ImageTestCase& aTestCase, + Func aResultChecker) { + // Create an image. + RefPtr image = ImageFactory::CreateAnonymousImage( + nsDependentCString(aTestCase.mMimeType)); + ASSERT_TRUE(!image->HasError()); + + NotNull> rasterImage = + WrapNotNull(static_cast(image.get())); + + nsCOMPtr inputStream = LoadFile(aTestCase.mPath); + ASSERT_TRUE(inputStream != nullptr); + + // Figure out how much data we have. + uint64_t length; + nsresult rv = inputStream->Available(&length); + ASSERT_NS_SUCCEEDED(rv); + + // Write the data into a SourceBuffer. + NotNull> sourceBuffer = WrapNotNull(new SourceBuffer()); + sourceBuffer->ExpectLength(length); + rv = sourceBuffer->AppendFromInputStream(inputStream, length); + ASSERT_NS_SUCCEEDED(rv); + sourceBuffer->Complete(NS_OK); + + // Create a metadata decoder first, because otherwise RasterImage will get + // unhappy about finding out the image is animated during a full decode. + DecoderType decoderType = DecoderFactory::GetDecoderType(aTestCase.mMimeType); + DecoderFlags decoderFlags = + DecoderFactory::GetDefaultDecoderFlagsForType(decoderType); + RefPtr task = DecoderFactory::CreateMetadataDecoder( + decoderType, rasterImage, decoderFlags, sourceBuffer); + ASSERT_TRUE(task != nullptr); + + // Run the metadata decoder synchronously. + task->Run(); + + // Create a decoder. + SurfaceFlags surfaceFlags = aTestCase.mSurfaceFlags; + RefPtr decoder = DecoderFactory::CreateAnonymousDecoder( + decoderType, sourceBuffer, Nothing(), decoderFlags, surfaceFlags); + ASSERT_TRUE(decoder != nullptr); + + // Create an AnimationSurfaceProvider which will manage the decoding process + // and make this decoder's output available in the surface cache. + SurfaceKey surfaceKey = RasterSurfaceKey(aTestCase.mOutputSize, surfaceFlags, + PlaybackType::eAnimated); + RefPtr provider = new AnimationSurfaceProvider( + rasterImage, surfaceKey, WrapNotNull(decoder), + /* aCurrentFrame */ 0); + + // Run the full decoder synchronously. + provider->Run(); + + // Call the lambda to verify the expected results. + aResultChecker(provider, decoder); +} + +static void CheckAnimationDecoderSingleChunk(const ImageTestCase& aTestCase) { + WithSingleChunkAnimationDecode( + aTestCase, + [&](AnimationSurfaceProvider* aProvider, image::Decoder* aDecoder) { + CheckAnimationDecoderResults(aTestCase, aProvider, aDecoder); + }); +} + +static void CheckDecoderFrameFirst(const ImageTestCase& aTestCase) { + // Verify that we can decode this test case and retrieve the first frame using + // imgIContainer::FRAME_FIRST. This ensures that we correctly trigger a + // single-frame decode rather than an animated decode when + // imgIContainer::FRAME_FIRST is requested. + + // Create an image. + RefPtr image = ImageFactory::CreateAnonymousImage( + nsDependentCString(aTestCase.mMimeType)); + ASSERT_TRUE(!image->HasError()); + + nsCOMPtr inputStream = LoadFile(aTestCase.mPath); + ASSERT_TRUE(inputStream); + + // Figure out how much data we have. + uint64_t length; + nsresult rv = inputStream->Available(&length); + ASSERT_NS_SUCCEEDED(rv); + + // Write the data into the image. + rv = image->OnImageDataAvailable(nullptr, inputStream, 0, + static_cast(length)); + ASSERT_NS_SUCCEEDED(rv); + + // Let the image know we've sent all the data. + rv = image->OnImageDataComplete(nullptr, NS_OK, true); + ASSERT_NS_SUCCEEDED(rv); + + RefPtr tracker = image->GetProgressTracker(); + tracker->SyncNotifyProgress(FLAG_LOAD_COMPLETE); + + // Lock the image so its surfaces don't disappear during the test. + image->LockImage(); + + auto unlock = mozilla::MakeScopeExit([&] { image->UnlockImage(); }); + + // Use GetFrame() to force a sync decode of the image, specifying FRAME_FIRST + // to ensure that we don't get an animated decode. + RefPtr surface = image->GetFrame( + imgIContainer::FRAME_FIRST, imgIContainer::FLAG_SYNC_DECODE); + + // Ensure that the image's metadata meets our expectations. + IntSize imageSize(0, 0); + rv = image->GetWidth(&imageSize.width); + EXPECT_NS_SUCCEEDED(rv); + rv = image->GetHeight(&imageSize.height); + EXPECT_NS_SUCCEEDED(rv); + + EXPECT_EQ(aTestCase.mSize.width, imageSize.width); + EXPECT_EQ(aTestCase.mSize.height, imageSize.height); + + Progress imageProgress = tracker->GetProgress(); + + EXPECT_TRUE(bool(imageProgress & FLAG_HAS_TRANSPARENCY) == false); + EXPECT_TRUE(bool(imageProgress & FLAG_IS_ANIMATED) == true); + + // Ensure that we decoded the static version of the image. + { + LookupResult result = SurfaceCache::Lookup( + ImageKey(image.get()), + RasterSurfaceKey(imageSize, aTestCase.mSurfaceFlags, + PlaybackType::eStatic), + /* aMarkUsed = */ false); + ASSERT_EQ(MatchType::EXACT, result.Type()); + EXPECT_TRUE(bool(result.Surface())); + } + + // Ensure that we didn't decode the animated version of the image. + { + LookupResult result = SurfaceCache::Lookup( + ImageKey(image.get()), + RasterSurfaceKey(imageSize, aTestCase.mSurfaceFlags, + PlaybackType::eAnimated), + /* aMarkUsed = */ false); + ASSERT_EQ(MatchType::NOT_FOUND, result.Type()); + } + + // Use GetFrame() to force a sync decode of the image, this time specifying + // FRAME_CURRENT to ensure that we get an animated decode. + RefPtr animatedSurface = image->GetFrame( + imgIContainer::FRAME_CURRENT, imgIContainer::FLAG_SYNC_DECODE); + + // Ensure that we decoded both frames of the animated version of the image. + { + LookupResult result = SurfaceCache::Lookup( + ImageKey(image.get()), + RasterSurfaceKey(imageSize, aTestCase.mSurfaceFlags, + PlaybackType::eAnimated), + /* aMarkUsed = */ true); + ASSERT_EQ(MatchType::EXACT, result.Type()); + + EXPECT_NS_SUCCEEDED(result.Surface().Seek(0)); + EXPECT_TRUE(bool(result.Surface())); + + RefPtr partialFrame = result.Surface().GetFrame(1); + EXPECT_TRUE(bool(partialFrame)); + } + + // Ensure that the static version is still around. + { + LookupResult result = SurfaceCache::Lookup( + ImageKey(image.get()), + RasterSurfaceKey(imageSize, aTestCase.mSurfaceFlags, + PlaybackType::eStatic), + /* aMarkUsed = */ true); + ASSERT_EQ(MatchType::EXACT, result.Type()); + EXPECT_TRUE(bool(result.Surface())); + } +} + +static void CheckDecoderFrameCurrent(const ImageTestCase& aTestCase) { + // Verify that we can decode this test case and retrieve the entire sequence + // of frames using imgIContainer::FRAME_CURRENT. This ensures that we + // correctly trigger an animated decode rather than a single-frame decode when + // imgIContainer::FRAME_CURRENT is requested. + + // Create an image. + RefPtr image = ImageFactory::CreateAnonymousImage( + nsDependentCString(aTestCase.mMimeType)); + ASSERT_TRUE(!image->HasError()); + + nsCOMPtr inputStream = LoadFile(aTestCase.mPath); + ASSERT_TRUE(inputStream); + + // Figure out how much data we have. + uint64_t length; + nsresult rv = inputStream->Available(&length); + ASSERT_NS_SUCCEEDED(rv); + + // Write the data into the image. + rv = image->OnImageDataAvailable(nullptr, inputStream, 0, + static_cast(length)); + ASSERT_NS_SUCCEEDED(rv); + + // Let the image know we've sent all the data. + rv = image->OnImageDataComplete(nullptr, NS_OK, true); + ASSERT_NS_SUCCEEDED(rv); + + RefPtr tracker = image->GetProgressTracker(); + tracker->SyncNotifyProgress(FLAG_LOAD_COMPLETE); + + // Lock the image so its surfaces don't disappear during the test. + image->LockImage(); + + // Use GetFrame() to force a sync decode of the image, specifying + // FRAME_CURRENT to ensure we get an animated decode. + RefPtr surface = image->GetFrame( + imgIContainer::FRAME_CURRENT, imgIContainer::FLAG_SYNC_DECODE); + + // Ensure that the image's metadata meets our expectations. + IntSize imageSize(0, 0); + rv = image->GetWidth(&imageSize.width); + EXPECT_NS_SUCCEEDED(rv); + rv = image->GetHeight(&imageSize.height); + EXPECT_NS_SUCCEEDED(rv); + + EXPECT_EQ(aTestCase.mSize.width, imageSize.width); + EXPECT_EQ(aTestCase.mSize.height, imageSize.height); + + Progress imageProgress = tracker->GetProgress(); + + EXPECT_TRUE(bool(imageProgress & FLAG_HAS_TRANSPARENCY) == false); + EXPECT_TRUE(bool(imageProgress & FLAG_IS_ANIMATED) == true); + + // Ensure that we decoded both frames of the animated version of the image. + { + LookupResult result = SurfaceCache::Lookup( + ImageKey(image.get()), + RasterSurfaceKey(imageSize, aTestCase.mSurfaceFlags, + PlaybackType::eAnimated), + /* aMarkUsed = */ true); + ASSERT_EQ(MatchType::EXACT, result.Type()); + + EXPECT_NS_SUCCEEDED(result.Surface().Seek(0)); + EXPECT_TRUE(bool(result.Surface())); + + RefPtr partialFrame = result.Surface().GetFrame(1); + EXPECT_TRUE(bool(partialFrame)); + } + + // Ensure that we didn't decode the static version of the image. + { + LookupResult result = SurfaceCache::Lookup( + ImageKey(image.get()), + RasterSurfaceKey(imageSize, aTestCase.mSurfaceFlags, + PlaybackType::eStatic), + /* aMarkUsed = */ false); + ASSERT_EQ(MatchType::NOT_FOUND, result.Type()); + } + + // Use GetFrame() to force a sync decode of the image, this time specifying + // FRAME_FIRST to ensure that we get a single-frame decode. + RefPtr animatedSurface = image->GetFrame( + imgIContainer::FRAME_FIRST, imgIContainer::FLAG_SYNC_DECODE); + + // Ensure that we decoded the static version of the image. + { + LookupResult result = SurfaceCache::Lookup( + ImageKey(image.get()), + RasterSurfaceKey(imageSize, aTestCase.mSurfaceFlags, + PlaybackType::eStatic), + /* aMarkUsed = */ true); + ASSERT_EQ(MatchType::EXACT, result.Type()); + EXPECT_TRUE(bool(result.Surface())); + } + + // Ensure that both frames of the animated version are still around. + { + LookupResult result = SurfaceCache::Lookup( + ImageKey(image.get()), + RasterSurfaceKey(imageSize, aTestCase.mSurfaceFlags, + PlaybackType::eAnimated), + /* aMarkUsed = */ true); + ASSERT_EQ(MatchType::EXACT, result.Type()); + + EXPECT_NS_SUCCEEDED(result.Surface().Seek(0)); + EXPECT_TRUE(bool(result.Surface())); + + RefPtr partialFrame = result.Surface().GetFrame(1); + EXPECT_TRUE(bool(partialFrame)); + } +} + +class ImageDecoders : public ::testing::Test { + protected: + AutoInitializeImageLib mInit; +}; + +#define IMAGE_GTEST_DECODER_BASE_F(test_prefix) \ + TEST_F(ImageDecoders, test_prefix##SingleChunk) { \ + CheckDecoderSingleChunk(Green##test_prefix##TestCase()); \ + } \ + \ + TEST_F(ImageDecoders, test_prefix##DelayedChunk) { \ + CheckDecoderDelayedChunk(Green##test_prefix##TestCase()); \ + } \ + \ + TEST_F(ImageDecoders, test_prefix##MultiChunk) { \ + CheckDecoderMultiChunk(Green##test_prefix##TestCase()); \ + } \ + \ + TEST_F(ImageDecoders, test_prefix##DownscaleDuringDecode) { \ + CheckDownscaleDuringDecode(Downscaled##test_prefix##TestCase()); \ + } \ + \ + TEST_F(ImageDecoders, test_prefix##ForceSRGB) { \ + CheckDecoderSingleChunk(Green##test_prefix##TestCase().WithSurfaceFlags( \ + SurfaceFlags::TO_SRGB_COLORSPACE)); \ + } \ + \ + TEST_F(ImageDecoders, test_prefix##BadBuffer) { \ + CheckDecoderBadBuffer(Green##test_prefix##TestCase().WithFlags( \ + TEST_CASE_HAS_ERROR | TEST_CASE_IGNORE_OUTPUT)); \ + } + +IMAGE_GTEST_DECODER_BASE_F(PNG) +IMAGE_GTEST_DECODER_BASE_F(GIF) +IMAGE_GTEST_DECODER_BASE_F(JPG) +IMAGE_GTEST_DECODER_BASE_F(BMP) +IMAGE_GTEST_DECODER_BASE_F(ICO) +IMAGE_GTEST_DECODER_BASE_F(Icon) +IMAGE_GTEST_DECODER_BASE_F(WebP) +#ifdef MOZ_JXL +IMAGE_GTEST_DECODER_BASE_F(JXL) +#endif + +TEST_F(ImageDecoders, ICOWithANDMaskDownscaleDuringDecode) { + CheckDownscaleDuringDecode(DownscaledTransparentICOWithANDMaskTestCase()); +} + +TEST_F(ImageDecoders, WebPLargeMultiChunk) { + CheckDecoderMultiChunk(LargeWebPTestCase(), /* aChunkSize */ 64); +} + +TEST_F(ImageDecoders, WebPIccSrgbMultiChunk) { + CheckDecoderMultiChunk(GreenWebPIccSrgbTestCase()); +} + +TEST_F(ImageDecoders, WebPTransparentSingleChunk) { + CheckDecoderSingleChunk(TransparentWebPTestCase()); +} + +TEST_F(ImageDecoders, WebPTransparentNoAlphaHeaderSingleChunk) { + CheckDecoderSingleChunk(TransparentNoAlphaHeaderWebPTestCase()); +} + +TEST_F(ImageDecoders, AVIFSingleChunk) { + CheckDecoderSingleChunk(GreenAVIFTestCase()); +} + +TEST_F(ImageDecoders, AVIFSingleChunkNonzeroReserved) { + CheckDecoderSingleChunk(NonzeroReservedAVIFTestCase()); +} + +TEST_F(ImageDecoders, AVIFSingleChunkMultipleColr) { + CheckDecoderSingleChunk(MultipleColrAVIFTestCase()); +} + +TEST_F(ImageDecoders, AVIFSingleChunkTransparent10bit420) { + CheckDecoderSingleChunk(Transparent10bit420AVIFTestCase()); +} + +TEST_F(ImageDecoders, AVIFSingleChunkTransparent10bit422) { + CheckDecoderSingleChunk(Transparent10bit422AVIFTestCase()); +} + +TEST_F(ImageDecoders, AVIFSingleChunkTransparent10bit444) { + CheckDecoderSingleChunk(Transparent10bit444AVIFTestCase()); +} + +TEST_F(ImageDecoders, AVIFSingleChunkTransparent12bit420) { + CheckDecoderSingleChunk(Transparent12bit420AVIFTestCase()); +} + +TEST_F(ImageDecoders, AVIFSingleChunkTransparent12bit422) { + CheckDecoderSingleChunk(Transparent12bit422AVIFTestCase()); +} + +TEST_F(ImageDecoders, AVIFSingleChunkTransparent12bit444) { + CheckDecoderSingleChunk(Transparent12bit444AVIFTestCase()); +} + +TEST_F(ImageDecoders, AVIFSingleChunkTransparent8bit420) { + CheckDecoderSingleChunk(Transparent8bit420AVIFTestCase()); +} + +TEST_F(ImageDecoders, AVIFSingleChunkTransparent8bit422) { + CheckDecoderSingleChunk(Transparent8bit422AVIFTestCase()); +} + +TEST_F(ImageDecoders, AVIFSingleChunkTransparent8bit444) { + CheckDecoderSingleChunk(Transparent8bit444AVIFTestCase()); +} + +TEST_F(ImageDecoders, AVIFSingleChunkGray8bitLimitedRangeBT601) { + CheckDecoderSingleChunk(Gray8bitLimitedRangeBT601AVIFTestCase()); +} + +TEST_F(ImageDecoders, AVIFSingleChunkGray8bitLimitedRangeBT709) { + CheckDecoderSingleChunk(Gray8bitLimitedRangeBT709AVIFTestCase()); +} + +TEST_F(ImageDecoders, AVIFSingleChunkGray8bitLimitedRangeBT2020) { + CheckDecoderSingleChunk(Gray8bitLimitedRangeBT2020AVIFTestCase()); +} + +TEST_F(ImageDecoders, AVIFSingleChunkGray8bitFullRangeBT601) { + CheckDecoderSingleChunk(Gray8bitFullRangeBT601AVIFTestCase()); +} + +TEST_F(ImageDecoders, AVIFSingleChunkGray8bitFullRangeBT709) { + CheckDecoderSingleChunk(Gray8bitFullRangeBT709AVIFTestCase()); +} + +TEST_F(ImageDecoders, AVIFSingleChunkGray8bitFullRangeBT2020) { + CheckDecoderSingleChunk(Gray8bitFullRangeBT2020AVIFTestCase()); +} + +TEST_F(ImageDecoders, AVIFSingleChunkGray10bitLimitedRangeBT601) { + CheckDecoderSingleChunk(Gray10bitLimitedRangeBT601AVIFTestCase()); +} + +TEST_F(ImageDecoders, AVIFSingleChunkGray10bitLimitedRangeBT709) { + CheckDecoderSingleChunk(Gray10bitLimitedRangeBT709AVIFTestCase()); +} + +TEST_F(ImageDecoders, AVIFSingleChunkGray10bitLimitedRangeBT2020) { + CheckDecoderSingleChunk(Gray10bitLimitedRangeBT2020AVIFTestCase()); +} + +TEST_F(ImageDecoders, AVIFSingleChunkGray10bitFullRangeBT601) { + CheckDecoderSingleChunk(Gray10bitFullRangeBT601AVIFTestCase()); +} + +TEST_F(ImageDecoders, AVIFSingleChunkGray10bitFullRangeBT709) { + CheckDecoderSingleChunk(Gray10bitFullRangeBT709AVIFTestCase()); +} + +TEST_F(ImageDecoders, AVIFSingleChunkGray10bitFullRangeBT2020) { + CheckDecoderSingleChunk(Gray10bitFullRangeBT2020AVIFTestCase()); +} + +TEST_F(ImageDecoders, AVIFSingleChunkGray12bitLimitedRangeBT601) { + CheckDecoderSingleChunk(Gray12bitLimitedRangeBT601AVIFTestCase()); +} + +TEST_F(ImageDecoders, AVIFSingleChunkGray12bitLimitedRangeBT709) { + CheckDecoderSingleChunk(Gray12bitLimitedRangeBT709AVIFTestCase()); +} + +TEST_F(ImageDecoders, AVIFSingleChunkGray12bitLimitedRangeBT2020) { + CheckDecoderSingleChunk(Gray12bitLimitedRangeBT2020AVIFTestCase()); +} + +TEST_F(ImageDecoders, AVIFSingleChunkGray12bitFullRangeBT601) { + CheckDecoderSingleChunk(Gray12bitFullRangeBT601AVIFTestCase()); +} + +TEST_F(ImageDecoders, AVIFSingleChunkGray12bitFullRangeBT709) { + CheckDecoderSingleChunk(Gray12bitFullRangeBT709AVIFTestCase()); +} + +TEST_F(ImageDecoders, AVIFSingleChunkGray12bitFullRangeBT2020) { + CheckDecoderSingleChunk(Gray12bitFullRangeBT2020AVIFTestCase()); +} + +TEST_F(ImageDecoders, AVIFSingleChunkGray8bitLimitedRangeGrayscale) { + CheckDecoderSingleChunk(Gray8bitLimitedRangeGrayscaleAVIFTestCase()); +} + +TEST_F(ImageDecoders, AVIFSingleChunkGray8bitFullRangeGrayscale) { + CheckDecoderSingleChunk(Gray8bitFullRangeGrayscaleAVIFTestCase()); +} + +TEST_F(ImageDecoders, AVIFSingleChunkGray10bitLimitedRangeGrayscale) { + CheckDecoderSingleChunk(Gray10bitLimitedRangeGrayscaleAVIFTestCase()); +} + +TEST_F(ImageDecoders, AVIFSingleChunkGray10bitFullRangeGrayscale) { + CheckDecoderSingleChunk(Gray10bitFullRangeGrayscaleAVIFTestCase()); +} + +TEST_F(ImageDecoders, AVIFSingleChunkGray12bitLimitedRangeGrayscale) { + CheckDecoderSingleChunk(Gray12bitLimitedRangeGrayscaleAVIFTestCase()); +} + +TEST_F(ImageDecoders, AVIFSingleChunkGray12bitFullRangeGrayscale) { + CheckDecoderSingleChunk(Gray12bitFullRangeGrayscaleAVIFTestCase()); +} + +TEST_F(ImageDecoders, AVIFMultiLayerSingleChunk) { + CheckDecoderSingleChunk(MultiLayerAVIFTestCase()); +} + +// This test must use the decode pool in order to check for regressions +// of crashing the dav1d decoder when the ImgDecoder threads have a standard- +// sized stack. +TEST_F(ImageDecoders, AVIFStackCheck) { + CheckDecoderSingleChunk(StackCheckAVIFTestCase(), /* aUseDecodePool */ true); +} + +TEST_F(ImageDecoders, AVIFDelayedChunk) { + CheckDecoderDelayedChunk(GreenAVIFTestCase()); +} + +TEST_F(ImageDecoders, AVIFMultiChunk) { + CheckDecoderMultiChunk(GreenAVIFTestCase()); +} + +TEST_F(ImageDecoders, AVIFLargeMultiChunk) { + CheckDecoderMultiChunk(LargeAVIFTestCase(), /* aChunkSize */ 64); +} + +TEST_F(ImageDecoders, AVIFDownscaleDuringDecode) { + CheckDownscaleDuringDecode(DownscaledAVIFTestCase()); +} + +#ifdef MOZ_JXL +TEST_F(ImageDecoders, JXLLargeMultiChunk) { + CheckDecoderMultiChunk(LargeJXLTestCase(), /* aChunkSize */ 64); +} +#endif + +TEST_F(ImageDecoders, AnimatedGIFSingleChunk) { + CheckDecoderSingleChunk(GreenFirstFrameAnimatedGIFTestCase()); +} + +TEST_F(ImageDecoders, AnimatedGIFMultiChunk) { + CheckDecoderMultiChunk(GreenFirstFrameAnimatedGIFTestCase()); +} + +TEST_F(ImageDecoders, AnimatedGIFWithBlendedFrames) { + CheckAnimationDecoderSingleChunk(GreenFirstFrameAnimatedGIFTestCase()); +} + +TEST_F(ImageDecoders, AnimatedPNGSingleChunk) { + CheckDecoderSingleChunk(GreenFirstFrameAnimatedPNGTestCase()); +} + +TEST_F(ImageDecoders, AnimatedPNGMultiChunk) { + CheckDecoderMultiChunk(GreenFirstFrameAnimatedPNGTestCase()); +} + +TEST_F(ImageDecoders, AnimatedPNGWithBlendedFrames) { + CheckAnimationDecoderSingleChunk(GreenFirstFrameAnimatedPNGTestCase()); +} + +TEST_F(ImageDecoders, AnimatedWebPSingleChunk) { + CheckDecoderSingleChunk(GreenFirstFrameAnimatedWebPTestCase()); +} + +TEST_F(ImageDecoders, AnimatedWebPMultiChunk) { + CheckDecoderMultiChunk(GreenFirstFrameAnimatedWebPTestCase()); +} + +TEST_F(ImageDecoders, AnimatedWebPWithBlendedFrames) { + CheckAnimationDecoderSingleChunk(GreenFirstFrameAnimatedWebPTestCase()); +} + +TEST_F(ImageDecoders, AnimatedAVIFSingleChunk) { + CheckDecoderSingleChunk(GreenFirstFrameAnimatedAVIFTestCase()); +} + +TEST_F(ImageDecoders, AnimatedAVIFMultiChunk) { + CheckDecoderMultiChunk(GreenFirstFrameAnimatedAVIFTestCase()); +} + +TEST_F(ImageDecoders, AnimatedAVIFWithBlendedFrames) { + CheckAnimationDecoderSingleChunk(GreenFirstFrameAnimatedAVIFTestCase()); +} + +TEST_F(ImageDecoders, CorruptSingleChunk) { + CheckDecoderSingleChunk(CorruptTestCase()); +} + +TEST_F(ImageDecoders, CorruptMultiChunk) { + CheckDecoderMultiChunk(CorruptTestCase()); +} + +TEST_F(ImageDecoders, CorruptBMPWithTruncatedHeaderSingleChunk) { + CheckDecoderSingleChunk(CorruptBMPWithTruncatedHeader()); +} + +TEST_F(ImageDecoders, CorruptBMPWithTruncatedHeaderMultiChunk) { + CheckDecoderMultiChunk(CorruptBMPWithTruncatedHeader()); +} + +TEST_F(ImageDecoders, CorruptICOWithBadBMPWidthSingleChunk) { + CheckDecoderSingleChunk(CorruptICOWithBadBMPWidthTestCase()); +} + +TEST_F(ImageDecoders, CorruptICOWithBadBMPWidthMultiChunk) { + CheckDecoderMultiChunk(CorruptICOWithBadBMPWidthTestCase()); +} + +TEST_F(ImageDecoders, CorruptICOWithBadBMPHeightSingleChunk) { + CheckDecoderSingleChunk(CorruptICOWithBadBMPHeightTestCase()); +} + +TEST_F(ImageDecoders, CorruptICOWithBadBMPHeightMultiChunk) { + CheckDecoderMultiChunk(CorruptICOWithBadBMPHeightTestCase()); +} + +TEST_F(ImageDecoders, CorruptICOWithBadBppSingleChunk) { + CheckDecoderSingleChunk(CorruptICOWithBadBppTestCase()); +} + +// Running this test under emulation for Android 7 on x86_64 seems to result +// in the large allocation succeeding, but leaving so little memory left the +// system falls over and it kills the test run, so we skip it instead. +// See bug 1655846 for more details. +#ifndef ANDROID +TEST_F(ImageDecoders, CorruptAVIFSingleChunk) { + CheckDecoderSingleChunk(CorruptAVIFTestCase()); +} +#endif + +TEST_F(ImageDecoders, AnimatedGIFWithFRAME_FIRST) { + CheckDecoderFrameFirst(GreenFirstFrameAnimatedGIFTestCase()); +} + +TEST_F(ImageDecoders, AnimatedGIFWithFRAME_CURRENT) { + CheckDecoderFrameCurrent(GreenFirstFrameAnimatedGIFTestCase()); +} + +TEST_F(ImageDecoders, AnimatedGIFWithExtraImageSubBlocks) { + ImageTestCase testCase = ExtraImageSubBlocksAnimatedGIFTestCase(); + + // Verify that we can decode this test case and get two frames, even though + // there are extra image sub blocks between the first and second frame. The + // extra data shouldn't confuse the decoder or cause the decode to fail. + + // Create an image. + RefPtr image = TestCaseToDecodedImage(testCase); + + // Ensure that the image's metadata meets our expectations. + IntSize imageSize(0, 0); + nsresult rv = image->GetWidth(&imageSize.width); + EXPECT_NS_SUCCEEDED(rv); + rv = image->GetHeight(&imageSize.height); + EXPECT_NS_SUCCEEDED(rv); + + EXPECT_EQ(testCase.mSize.width, imageSize.width); + EXPECT_EQ(testCase.mSize.height, imageSize.height); + + RefPtr tracker = image->GetProgressTracker(); + Progress imageProgress = tracker->GetProgress(); + + EXPECT_TRUE(bool(imageProgress & FLAG_HAS_TRANSPARENCY) == false); + EXPECT_TRUE(bool(imageProgress & FLAG_IS_ANIMATED) == true); + + // Ensure that we decoded both frames of the image. + LookupResult result = + SurfaceCache::Lookup(ImageKey(image.get()), + RasterSurfaceKey(imageSize, testCase.mSurfaceFlags, + PlaybackType::eAnimated), + /* aMarkUsed = */ true); + ASSERT_EQ(MatchType::EXACT, result.Type()); + + EXPECT_NS_SUCCEEDED(result.Surface().Seek(0)); + EXPECT_TRUE(bool(result.Surface())); + + RefPtr partialFrame = result.Surface().GetFrame(1); + EXPECT_TRUE(bool(partialFrame)); +} + +TEST_F(ImageDecoders, AnimatedWebPWithFRAME_FIRST) { + CheckDecoderFrameFirst(GreenFirstFrameAnimatedWebPTestCase()); +} + +TEST_F(ImageDecoders, AnimatedWebPWithFRAME_CURRENT) { + CheckDecoderFrameCurrent(GreenFirstFrameAnimatedWebPTestCase()); +} + +TEST_F(ImageDecoders, TruncatedSmallGIFSingleChunk) { + CheckDecoderSingleChunk(TruncatedSmallGIFTestCase()); +} + +TEST_F(ImageDecoders, LargeICOWithBMPSingleChunk) { + CheckDecoderSingleChunk(LargeICOWithBMPTestCase()); +} + +TEST_F(ImageDecoders, LargeICOWithBMPMultiChunk) { + CheckDecoderMultiChunk(LargeICOWithBMPTestCase(), /* aChunkSize */ 64); +} + +TEST_F(ImageDecoders, LargeICOWithPNGSingleChunk) { + CheckDecoderSingleChunk(LargeICOWithPNGTestCase()); +} + +TEST_F(ImageDecoders, LargeICOWithPNGMultiChunk) { + CheckDecoderMultiChunk(LargeICOWithPNGTestCase()); +} + +TEST_F(ImageDecoders, MultipleSizesICOSingleChunk) { + ImageTestCase testCase = GreenMultipleSizesICOTestCase(); + + // Create an image. + RefPtr image = ImageFactory::CreateAnonymousImage( + nsDependentCString(testCase.mMimeType)); + ASSERT_TRUE(!image->HasError()); + + nsCOMPtr inputStream = LoadFile(testCase.mPath); + ASSERT_TRUE(inputStream); + + // Figure out how much data we have. + uint64_t length; + nsresult rv = inputStream->Available(&length); + ASSERT_NS_SUCCEEDED(rv); + + // Write the data into the image. + rv = image->OnImageDataAvailable(nullptr, inputStream, 0, + static_cast(length)); + ASSERT_NS_SUCCEEDED(rv); + + // Let the image know we've sent all the data. + rv = image->OnImageDataComplete(nullptr, NS_OK, true); + ASSERT_NS_SUCCEEDED(rv); + + RefPtr tracker = image->GetProgressTracker(); + tracker->SyncNotifyProgress(FLAG_LOAD_COMPLETE); + + // Use GetFrame() to force a sync decode of the image. + RefPtr surface = image->GetFrame( + imgIContainer::FRAME_CURRENT, imgIContainer::FLAG_SYNC_DECODE); + + // Ensure that the image's metadata meets our expectations. + IntSize imageSize(0, 0); + rv = image->GetWidth(&imageSize.width); + EXPECT_NS_SUCCEEDED(rv); + rv = image->GetHeight(&imageSize.height); + EXPECT_NS_SUCCEEDED(rv); + + EXPECT_EQ(testCase.mSize.width, imageSize.width); + EXPECT_EQ(testCase.mSize.height, imageSize.height); + + nsTArray nativeSizes; + rv = image->GetNativeSizes(nativeSizes); + EXPECT_NS_SUCCEEDED(rv); + ASSERT_EQ(6u, nativeSizes.Length()); + + IntSize expectedSizes[] = {IntSize(16, 16), IntSize(32, 32), + IntSize(64, 64), IntSize(128, 128), + IntSize(256, 256), IntSize(256, 128)}; + + for (int i = 0; i < 6; ++i) { + EXPECT_EQ(expectedSizes[i], nativeSizes[i]); + } + + RefPtr image90 = + ImageOps::Orient(image, Orientation(Angle::D90, Flip::Unflipped)); + rv = image90->GetNativeSizes(nativeSizes); + EXPECT_NS_SUCCEEDED(rv); + ASSERT_EQ(6u, nativeSizes.Length()); + + for (int i = 0; i < 5; ++i) { + EXPECT_EQ(expectedSizes[i], nativeSizes[i]); + } + EXPECT_EQ(IntSize(128, 256), nativeSizes[5]); + + RefPtr image180 = + ImageOps::Orient(image, Orientation(Angle::D180, Flip::Unflipped)); + rv = image180->GetNativeSizes(nativeSizes); + EXPECT_NS_SUCCEEDED(rv); + ASSERT_EQ(6u, nativeSizes.Length()); + + for (int i = 0; i < 6; ++i) { + EXPECT_EQ(expectedSizes[i], nativeSizes[i]); + } +} + +TEST_F(ImageDecoders, ExifResolutionEven) { + RefPtr image = TestCaseToDecodedImage(ExifResolutionTestCase()); + EXPECT_EQ(image->GetResolution(), Resolution(2.0, 2.0)); +} diff --git a/image/test/gtest/TestDecodersPerf.cpp b/image/test/gtest/TestDecodersPerf.cpp new file mode 100644 index 0000000000..e1d6bfbded --- /dev/null +++ b/image/test/gtest/TestDecodersPerf.cpp @@ -0,0 +1,159 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "gtest/gtest.h" +#include "gtest/MozGTestBench.h" + +#include "Common.h" +#include "Decoder.h" +#include "DecoderFactory.h" +#include "IDecodingTask.h" +#include "mozilla/RefPtr.h" +#include "ProgressTracker.h" +#include "SourceBuffer.h" + +using namespace mozilla; +using namespace mozilla::gfx; +using namespace mozilla::image; + +namespace { + +static void CheckDecoderState(const ImageTestCase& aTestCase, + image::Decoder* aDecoder, + const IntSize& aOutputSize) { + // image::Decoder should match what we asked for in the MIME type. + EXPECT_NE(aDecoder->GetType(), DecoderType::UNKNOWN); + EXPECT_EQ(aDecoder->GetType(), + DecoderFactory::GetDecoderType(aTestCase.mMimeType)); + + EXPECT_TRUE(aDecoder->GetDecodeDone()); + EXPECT_FALSE(aDecoder->HasError()); + + // Verify that the decoder made the expected progress. + Progress progress = aDecoder->TakeProgress(); + EXPECT_FALSE(bool(progress & FLAG_HAS_ERROR)); + EXPECT_FALSE(bool(aTestCase.mFlags & TEST_CASE_HAS_ERROR)); + + EXPECT_TRUE(bool(progress & FLAG_SIZE_AVAILABLE)); + EXPECT_TRUE(bool(progress & FLAG_DECODE_COMPLETE)); + EXPECT_TRUE(bool(progress & FLAG_FRAME_COMPLETE)); + EXPECT_EQ(bool(aTestCase.mFlags & TEST_CASE_IS_TRANSPARENT), + bool(progress & FLAG_HAS_TRANSPARENCY)); + EXPECT_EQ(bool(aTestCase.mFlags & TEST_CASE_IS_ANIMATED), + bool(progress & FLAG_IS_ANIMATED)); + + // The decoder should get the correct size. + OrientedIntSize size = aDecoder->Size(); + EXPECT_EQ(aTestCase.mSize.width, size.width); + EXPECT_EQ(aTestCase.mSize.height, size.height); + + // Get the current frame, which is always the first frame of the image + // because CreateAnonymousDecoder() forces a first-frame-only decode. + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + + // Verify that the resulting surfaces matches our expectations. + EXPECT_TRUE(surface->IsDataSourceSurface()); + EXPECT_TRUE(surface->GetFormat() == SurfaceFormat::OS_RGBX || + surface->GetFormat() == SurfaceFormat::OS_RGBA); + EXPECT_EQ(aOutputSize, surface->GetSize()); +} + +template +static void WithSingleChunkDecode(const ImageTestCase& aTestCase, + SourceBuffer* aSourceBuffer, + const Maybe& aOutputSize, + Func aResultChecker) { + auto sourceBuffer = WrapNotNull(RefPtr(aSourceBuffer)); + + // Create a decoder. + DecoderType decoderType = DecoderFactory::GetDecoderType(aTestCase.mMimeType); + RefPtr decoder = DecoderFactory::CreateAnonymousDecoder( + decoderType, sourceBuffer, aOutputSize, DecoderFlags::FIRST_FRAME_ONLY, + aTestCase.mSurfaceFlags); + ASSERT_TRUE(decoder != nullptr); + RefPtr task = + new AnonymousDecodingTask(WrapNotNull(decoder), /* aResumable */ false); + + // Run the full decoder synchronously. + task->Run(); + + // Call the lambda to verify the expected results. + aResultChecker(decoder); +} + +static void CheckDecode(const ImageTestCase& aTestCase, + SourceBuffer* aSourceBuffer) { + WithSingleChunkDecode( + aTestCase, aSourceBuffer, Nothing(), [&](image::Decoder* aDecoder) { + CheckDecoderState(aTestCase, aDecoder, aTestCase.mSize); + }); +} + +static void CheckDownscaleDuringDecode(const ImageTestCase& aTestCase, + SourceBuffer* aSourceBuffer) { + IntSize outputSize(20, 20); + WithSingleChunkDecode(aTestCase, aSourceBuffer, Some(outputSize), + [&](image::Decoder* aDecoder) { + CheckDecoderState(aTestCase, aDecoder, outputSize); + }); +} + +#define IMAGE_GTEST_BENCH_FIXTURE(test_fixture, test_case) \ + class test_fixture : public ImageBenchmarkBase { \ + protected: \ + test_fixture() : ImageBenchmarkBase(test_case()) {} \ + }; + +#define IMAGE_GTEST_NATIVE_BENCH_F(test_fixture) \ + MOZ_GTEST_BENCH_F(test_fixture, Native, \ + [this] { CheckDecode(mTestCase, mSourceBuffer); }); + +#define IMAGE_GTEST_DOWNSCALE_BENCH_F(test_fixture) \ + MOZ_GTEST_BENCH_F(test_fixture, Downscale, [this] { \ + CheckDownscaleDuringDecode(mTestCase, mSourceBuffer); \ + }); + +#define IMAGE_GTEST_NO_COLOR_MANAGEMENT_BENCH_F(test_fixture) \ + MOZ_GTEST_BENCH_F(test_fixture, NoColorManagement, [this] { \ + ImageTestCase testCase = mTestCase; \ + testCase.mSurfaceFlags |= SurfaceFlags::NO_COLORSPACE_CONVERSION; \ + CheckDecode(testCase, mSourceBuffer); \ + }); + +#define IMAGE_GTEST_NO_PREMULTIPLY_BENCH_F(test_fixture) \ + MOZ_GTEST_BENCH_F(test_fixture, NoPremultiplyAlpha, [this] { \ + ImageTestCase testCase = mTestCase; \ + testCase.mSurfaceFlags |= SurfaceFlags::NO_PREMULTIPLY_ALPHA; \ + CheckDecode(testCase, mSourceBuffer); \ + }); + +#define IMAGE_GTEST_BENCH_F(type, test) \ + IMAGE_GTEST_BENCH_FIXTURE(ImageDecodersPerf_##type##_##test, \ + Perf##test##type##TestCase) \ + IMAGE_GTEST_NATIVE_BENCH_F(ImageDecodersPerf_##type##_##test) \ + IMAGE_GTEST_DOWNSCALE_BENCH_F(ImageDecodersPerf_##type##_##test) \ + IMAGE_GTEST_NO_COLOR_MANAGEMENT_BENCH_F(ImageDecodersPerf_##type##_##test) + +#define IMAGE_GTEST_BENCH_ALPHA_F(type, test) \ + IMAGE_GTEST_BENCH_F(type, test) \ + IMAGE_GTEST_NO_PREMULTIPLY_BENCH_F(ImageDecodersPerf_##type##_##test) + +IMAGE_GTEST_BENCH_F(JPG, YCbCr) +IMAGE_GTEST_BENCH_F(JPG, Cmyk) +IMAGE_GTEST_BENCH_F(JPG, Gray) + +IMAGE_GTEST_BENCH_F(PNG, Rgb) +IMAGE_GTEST_BENCH_F(PNG, Gray) +IMAGE_GTEST_BENCH_ALPHA_F(PNG, RgbAlpha) +IMAGE_GTEST_BENCH_ALPHA_F(PNG, GrayAlpha) + +IMAGE_GTEST_BENCH_F(WebP, RgbLossless) +IMAGE_GTEST_BENCH_F(WebP, RgbLossy) +IMAGE_GTEST_BENCH_ALPHA_F(WebP, RgbAlphaLossless) +IMAGE_GTEST_BENCH_ALPHA_F(WebP, RgbAlphaLossy) + +IMAGE_GTEST_BENCH_F(GIF, Rgb) + +} // namespace diff --git a/image/test/gtest/TestDeinterlacingFilter.cpp b/image/test/gtest/TestDeinterlacingFilter.cpp new file mode 100644 index 0000000000..fc3e6f65bd --- /dev/null +++ b/image/test/gtest/TestDeinterlacingFilter.cpp @@ -0,0 +1,636 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=8 sts=2 et sw=2 tw=80: */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "gtest/gtest.h" + +#include "mozilla/gfx/2D.h" +#include "Common.h" +#include "Decoder.h" +#include "DecoderFactory.h" +#include "SourceBuffer.h" +#include "SurfaceFilters.h" +#include "SurfacePipe.h" + +using namespace mozilla; +using namespace mozilla::gfx; +using namespace mozilla::image; + +template +void WithDeinterlacingFilter(const IntSize& aSize, bool aProgressiveDisplay, + Func aFunc) { + RefPtr decoder = CreateTrivialDecoder(); + ASSERT_TRUE(bool(decoder)); + + WithFilterPipeline( + decoder, std::forward(aFunc), + DeinterlacingConfig{aProgressiveDisplay}, + SurfaceConfig{decoder, aSize, SurfaceFormat::OS_RGBA, false}); +} + +void AssertConfiguringDeinterlacingFilterFails(const IntSize& aSize) { + RefPtr decoder = CreateTrivialDecoder(); + ASSERT_TRUE(decoder != nullptr); + + AssertConfiguringPipelineFails( + decoder, DeinterlacingConfig{/* mProgressiveDisplay = */ true}, + SurfaceConfig{decoder, aSize, SurfaceFormat::OS_RGBA, false}); +} + +class ImageDeinterlacingFilter : public ::testing::Test { + protected: + AutoInitializeImageLib mInit; +}; + +TEST_F(ImageDeinterlacingFilter, WritePixels100_100) { + WithDeinterlacingFilter( + IntSize(100, 100), /* aProgressiveDisplay = */ true, + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputRect = */ Some(IntRect(0, 0, 100, 100))); + }); +} + +TEST_F(ImageDeinterlacingFilter, WritePixels99_99) { + WithDeinterlacingFilter(IntSize(99, 99), /* aProgressiveDisplay = */ true, + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels( + aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 99, 99)), + /* aInputRect = */ Some(IntRect(0, 0, 99, 99))); + }); +} + +TEST_F(ImageDeinterlacingFilter, WritePixels8_8) { + WithDeinterlacingFilter(IntSize(8, 8), /* aProgressiveDisplay = */ true, + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels( + aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 8, 8)), + /* aInputRect = */ Some(IntRect(0, 0, 8, 8))); + }); +} + +TEST_F(ImageDeinterlacingFilter, WritePixels7_7) { + WithDeinterlacingFilter(IntSize(7, 7), /* aProgressiveDisplay = */ true, + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels( + aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 7, 7)), + /* aInputRect = */ Some(IntRect(0, 0, 7, 7))); + }); +} + +TEST_F(ImageDeinterlacingFilter, WritePixels3_3) { + WithDeinterlacingFilter(IntSize(3, 3), /* aProgressiveDisplay = */ true, + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels( + aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 3, 3)), + /* aInputRect = */ Some(IntRect(0, 0, 3, 3))); + }); +} + +TEST_F(ImageDeinterlacingFilter, WritePixels1_1) { + WithDeinterlacingFilter(IntSize(1, 1), /* aProgressiveDisplay = */ true, + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels( + aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 1, 1)), + /* aInputRect = */ Some(IntRect(0, 0, 1, 1))); + }); +} + +TEST_F(ImageDeinterlacingFilter, WritePixelsNonProgressiveOutput51_52) { + WithDeinterlacingFilter( + IntSize(51, 52), /* aProgressiveDisplay = */ false, + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + // Fill the image. The output should be green for even rows and red for + // odd rows but we need to write the rows in the order that the + // deinterlacer expects them. + uint32_t count = 0; + auto result = aFilter->WritePixels([&]() { + uint32_t row = count / 51; // Integer division. + ++count; + + // Note that we use a switch statement here, even though it's quite + // verbose, because it's useful to have the mappings between input and + // output rows available when debugging these tests. + + switch (row) { + // First pass. Output rows are positioned at 8n + 0. + case 0: // Output row 0. + case 1: // Output row 8. + case 2: // Output row 16. + case 3: // Output row 24. + case 4: // Output row 32. + case 5: // Output row 40. + case 6: // Output row 48. + return AsVariant(BGRAColor::Green().AsPixel()); + + // Second pass. Rows are positioned at 8n + 4. + case 7: // Output row 4. + case 8: // Output row 12. + case 9: // Output row 20. + case 10: // Output row 28. + case 11: // Output row 36. + case 12: // Output row 44. + return AsVariant(BGRAColor::Green().AsPixel()); + + // Third pass. Rows are positioned at 4n + 2. + case 13: // Output row 2. + case 14: // Output row 6. + case 15: // Output row 10. + case 16: // Output row 14. + case 17: // Output row 18. + case 18: // Output row 22. + case 19: // Output row 26. + case 20: // Output row 30. + case 21: // Output row 34. + case 22: // Output row 38. + case 23: // Output row 42. + case 24: // Output row 46. + case 25: // Output row 50. + return AsVariant(BGRAColor::Green().AsPixel()); + + // Fourth pass. Rows are positioned at 2n + 1. + case 26: // Output row 1. + case 27: // Output row 3. + case 28: // Output row 5. + case 29: // Output row 7. + case 30: // Output row 9. + case 31: // Output row 11. + case 32: // Output row 13. + case 33: // Output row 15. + case 34: // Output row 17. + case 35: // Output row 19. + case 36: // Output row 21. + case 37: // Output row 23. + case 38: // Output row 25. + case 39: // Output row 27. + case 40: // Output row 29. + case 41: // Output row 31. + case 42: // Output row 33. + case 43: // Output row 35. + case 44: // Output row 37. + case 45: // Output row 39. + case 46: // Output row 41. + case 47: // Output row 43. + case 48: // Output row 45. + case 49: // Output row 47. + case 50: // Output row 49. + case 51: // Output row 51. + return AsVariant(BGRAColor::Red().AsPixel()); + + default: + MOZ_ASSERT_UNREACHABLE("Unexpected row"); + return AsVariant(BGRAColor::Transparent().AsPixel()); + } + }); + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(51u * 52u, count); + + AssertCorrectPipelineFinalState(aFilter, IntRect(0, 0, 51, 52), + IntRect(0, 0, 51, 52)); + + // Check that the generated image is correct. As mentioned above, we + // expect even rows to be green and odd rows to be red. + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + + for (uint32_t row = 0; row < 52; ++row) { + EXPECT_TRUE(RowsAreSolidColor( + surface, row, 1, + row % 2 == 0 ? BGRAColor::Green() : BGRAColor::Red())); + } + }); +} + +TEST_F(ImageDeinterlacingFilter, WritePixelsOutput20_20) { + WithDeinterlacingFilter( + IntSize(20, 20), /* aProgressiveDisplay = */ true, + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + // Fill the image. The output should be green for even rows and red for + // odd rows but we need to write the rows in the order that the + // deinterlacer expects them. + uint32_t count = 0; + auto result = aFilter->WritePixels([&]() { + uint32_t row = count / 20; // Integer division. + ++count; + + // Note that we use a switch statement here, even though it's quite + // verbose, because it's useful to have the mappings between input and + // output rows available when debugging these tests. + + switch (row) { + // First pass. Output rows are positioned at 8n + 0. + case 0: // Output row 0. + case 1: // Output row 8. + case 2: // Output row 16. + return AsVariant(BGRAColor::Green().AsPixel()); + + // Second pass. Rows are positioned at 8n + 4. + case 3: // Output row 4. + case 4: // Output row 12. + return AsVariant(BGRAColor::Green().AsPixel()); + + // Third pass. Rows are positioned at 4n + 2. + case 5: // Output row 2. + case 6: // Output row 6. + case 7: // Output row 10. + case 8: // Output row 14. + case 9: // Output row 18. + return AsVariant(BGRAColor::Green().AsPixel()); + + // Fourth pass. Rows are positioned at 2n + 1. + case 10: // Output row 1. + case 11: // Output row 3. + case 12: // Output row 5. + case 13: // Output row 7. + case 14: // Output row 9. + case 15: // Output row 11. + case 16: // Output row 13. + case 17: // Output row 15. + case 18: // Output row 17. + case 19: // Output row 19. + return AsVariant(BGRAColor::Red().AsPixel()); + + default: + MOZ_ASSERT_UNREACHABLE("Unexpected row"); + return AsVariant(BGRAColor::Transparent().AsPixel()); + } + }); + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(20u * 20u, count); + + AssertCorrectPipelineFinalState(aFilter, IntRect(0, 0, 20, 20), + IntRect(0, 0, 20, 20)); + + // Check that the generated image is correct. As mentioned above, we + // expect even rows to be green and odd rows to be red. + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + + for (uint32_t row = 0; row < 20; ++row) { + EXPECT_TRUE(RowsAreSolidColor( + surface, row, 1, + row % 2 == 0 ? BGRAColor::Green() : BGRAColor::Red())); + } + }); +} + +TEST_F(ImageDeinterlacingFilter, WritePixelsOutput7_7) { + WithDeinterlacingFilter( + IntSize(7, 7), /* aProgressiveDisplay = */ true, + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + // Fill the image. The output should be a repeating pattern of two green + // rows followed by two red rows but we need to write the rows in the + // order that the deinterlacer expects them. + uint32_t count = 0; + auto result = aFilter->WritePixels([&]() { + uint32_t row = count / 7; // Integer division. + ++count; + + switch (row) { + // First pass. Output rows are positioned at 8n + 0. + case 0: // Output row 0. + return AsVariant(BGRAColor::Green().AsPixel()); + + // Second pass. Rows are positioned at 8n + 4. + case 1: // Output row 4. + return AsVariant(BGRAColor::Green().AsPixel()); + + // Third pass. Rows are positioned at 4n + 2. + case 2: // Output row 2. + case 3: // Output row 6. + return AsVariant(BGRAColor::Red().AsPixel()); + + // Fourth pass. Rows are positioned at 2n + 1. + case 4: // Output row 1. + return AsVariant(BGRAColor::Green().AsPixel()); + + case 5: // Output row 3. + return AsVariant(BGRAColor::Red().AsPixel()); + + case 6: // Output row 5. + return AsVariant(BGRAColor::Green().AsPixel()); + + default: + MOZ_ASSERT_UNREACHABLE("Unexpected row"); + return AsVariant(BGRAColor::Transparent().AsPixel()); + } + }); + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(7u * 7u, count); + + AssertCorrectPipelineFinalState(aFilter, IntRect(0, 0, 7, 7), + IntRect(0, 0, 7, 7)); + + // Check that the generated image is correct. As mentioned above, we + // expect two green rows, followed by two red rows, then two green rows, + // etc. + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + + for (uint32_t row = 0; row < 7; ++row) { + BGRAColor color = row == 0 || row == 1 || row == 4 || row == 5 + ? BGRAColor::Green() + : BGRAColor::Red(); + EXPECT_TRUE(RowsAreSolidColor(surface, row, 1, color)); + } + }); +} + +TEST_F(ImageDeinterlacingFilter, WritePixelsOutput3_3) { + WithDeinterlacingFilter( + IntSize(3, 3), /* aProgressiveDisplay = */ true, + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + // Fill the image. The output should be green, red, green in that order, + // but we need to write the rows in the order that the deinterlacer + // expects them. + uint32_t count = 0; + auto result = aFilter->WritePixels([&]() { + uint32_t row = count / 3; // Integer division. + ++count; + + switch (row) { + // First pass. Output rows are positioned at 8n + 0. + case 0: // Output row 0. + return AsVariant(BGRAColor::Green().AsPixel()); + + // Second pass. Rows are positioned at 8n + 4. + // No rows for this pass. + + // Third pass. Rows are positioned at 4n + 2. + case 1: // Output row 2. + return AsVariant(BGRAColor::Green().AsPixel()); + + // Fourth pass. Rows are positioned at 2n + 1. + case 2: // Output row 1. + return AsVariant(BGRAColor::Red().AsPixel()); + + default: + MOZ_ASSERT_UNREACHABLE("Unexpected row"); + return AsVariant(BGRAColor::Transparent().AsPixel()); + } + }); + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(3u * 3u, count); + + AssertCorrectPipelineFinalState(aFilter, IntRect(0, 0, 3, 3), + IntRect(0, 0, 3, 3)); + + // Check that the generated image is correct. As mentioned above, we + // expect green, red, green in that order. + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + + for (uint32_t row = 0; row < 3; ++row) { + EXPECT_TRUE(RowsAreSolidColor( + surface, row, 1, + row == 0 || row == 2 ? BGRAColor::Green() : BGRAColor::Red())); + } + }); +} + +TEST_F(ImageDeinterlacingFilter, WritePixelsOutput1_1) { + WithDeinterlacingFilter( + IntSize(1, 1), /* aProgressiveDisplay = */ true, + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + // Fill the image. The output should be a single red row. + uint32_t count = 0; + auto result = aFilter->WritePixels([&]() { + ++count; + return AsVariant(BGRAColor::Red().AsPixel()); + }); + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(1u, count); + + AssertCorrectPipelineFinalState(aFilter, IntRect(0, 0, 1, 1), + IntRect(0, 0, 1, 1)); + + // Check that the generated image is correct. As mentioned above, we + // expect a single red row. + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + + EXPECT_TRUE(RowsAreSolidColor(surface, 0, 1, BGRAColor::Red())); + }); +} + +void WriteRowAndCheckInterlacerOutput(image::Decoder* aDecoder, + SurfaceFilter* aFilter, BGRAColor aColor, + WriteState aNextState, + OrientedIntRect aInvalidRect, + uint32_t aFirstHaeberliRow, + uint32_t aLastHaeberliRow) { + uint32_t count = 0; + + auto result = aFilter->WritePixels([&]() -> NextPixel { + if (count < 7) { + ++count; + return AsVariant(aColor.AsPixel()); + } + return AsVariant(WriteState::NEED_MORE_DATA); + }); + + EXPECT_EQ(aNextState, result); + EXPECT_EQ(7u, count); + + // Assert that we got the expected invalidation region. + Maybe invalidRect = aFilter->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isSome()); + EXPECT_EQ(aInvalidRect, invalidRect->mInputSpaceRect); + EXPECT_EQ(aInvalidRect, invalidRect->mOutputSpaceRect); + + // Check that the portion of the image generated so far is correct. The rows + // from aFirstHaeberliRow to aLastHaeberliRow should be filled with aColor. + // Note that this is not the same as the set of rows in aInvalidRect, because + // after writing a row the deinterlacer seeks to the next row to write, which + // may involve copying previously-written rows in the buffer to the output + // even though they don't change in this pass. + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + + for (uint32_t row = aFirstHaeberliRow; row <= aLastHaeberliRow; ++row) { + EXPECT_TRUE(RowsAreSolidColor(surface, row, 1, aColor)); + } +} + +TEST_F(ImageDeinterlacingFilter, WritePixelsIntermediateOutput7_7) { + WithDeinterlacingFilter( + IntSize(7, 7), /* aProgressiveDisplay = */ true, + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + // Fill the image. The output should be a repeating pattern of two green + // rows followed by two red rows but we need to write the rows in the + // order that the deinterlacer expects them. + + // First pass. Output rows are positioned at 8n + 0. + + // Output row 0. The invalid rect is the entire image because this is + // the end of the first pass. + WriteRowAndCheckInterlacerOutput(aDecoder, aFilter, BGRAColor::Green(), + WriteState::NEED_MORE_DATA, + OrientedIntRect(0, 0, 7, 7), 0, 4); + + // Second pass. Rows are positioned at 8n + 4. + + // Output row 4. The invalid rect is the entire image because this is + // the end of the second pass. + WriteRowAndCheckInterlacerOutput(aDecoder, aFilter, BGRAColor::Green(), + WriteState::NEED_MORE_DATA, + OrientedIntRect(0, 0, 7, 7), 1, 4); + + // Third pass. Rows are positioned at 4n + 2. + + // Output row 2. The invalid rect contains the Haeberli rows for this + // output row (rows 2 and 3) as well as the rows that we copy from + // previous passes when seeking to the next output row (rows 4 and 5). + WriteRowAndCheckInterlacerOutput(aDecoder, aFilter, BGRAColor::Red(), + WriteState::NEED_MORE_DATA, + OrientedIntRect(0, 2, 7, 4), 2, 3); + + // Output row 6. The invalid rect is the entire image because this is + // the end of the third pass. + WriteRowAndCheckInterlacerOutput(aDecoder, aFilter, BGRAColor::Red(), + WriteState::NEED_MORE_DATA, + OrientedIntRect(0, 0, 7, 7), 6, 6); + + // Fourth pass. Rows are positioned at 2n + 1. + + // Output row 1. The invalid rect contains the Haeberli rows for this + // output row (just row 1) as well as the rows that we copy from + // previous passes when seeking to the next output row (row 2). + WriteRowAndCheckInterlacerOutput(aDecoder, aFilter, BGRAColor::Green(), + WriteState::NEED_MORE_DATA, + OrientedIntRect(0, 1, 7, 2), 1, 1); + + // Output row 3. The invalid rect contains the Haeberli rows for this + // output row (just row 3) as well as the rows that we copy from + // previous passes when seeking to the next output row (row 4). + WriteRowAndCheckInterlacerOutput(aDecoder, aFilter, BGRAColor::Red(), + WriteState::NEED_MORE_DATA, + OrientedIntRect(0, 3, 7, 2), 3, 3); + + // Output row 5. The invalid rect contains the Haeberli rows for this + // output row (just row 5) as well as the rows that we copy from + // previous passes when seeking to the next output row (row 6). + WriteRowAndCheckInterlacerOutput(aDecoder, aFilter, BGRAColor::Green(), + WriteState::FINISHED, + OrientedIntRect(0, 5, 7, 2), 5, 5); + + // Assert that we're in the expected final state. + EXPECT_TRUE(aFilter->IsSurfaceFinished()); + Maybe invalidRect = aFilter->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isNothing()); + + // Check that the generated image is correct. As mentioned above, we + // expect two green rows, followed by two red rows, then two green rows, + // etc. + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + + for (uint32_t row = 0; row < 7; ++row) { + BGRAColor color = row == 0 || row == 1 || row == 4 || row == 5 + ? BGRAColor::Green() + : BGRAColor::Red(); + EXPECT_TRUE(RowsAreSolidColor(surface, row, 1, color)); + } + }); +} + +TEST_F(ImageDeinterlacingFilter, + WritePixelsNonProgressiveIntermediateOutput7_7) { + WithDeinterlacingFilter( + IntSize(7, 7), /* aProgressiveDisplay = */ false, + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + // Fill the image. The output should be a repeating pattern of two green + // rows followed by two red rows but we need to write the rows in the + // order that the deinterlacer expects them. + + // First pass. Output rows are positioned at 8n + 0. + + // Output row 0. The invalid rect is the entire image because this is + // the end of the first pass. + WriteRowAndCheckInterlacerOutput(aDecoder, aFilter, BGRAColor::Green(), + WriteState::NEED_MORE_DATA, + OrientedIntRect(0, 0, 7, 7), 0, 0); + + // Second pass. Rows are positioned at 8n + 4. + + // Output row 4. The invalid rect is the entire image because this is + // the end of the second pass. + WriteRowAndCheckInterlacerOutput(aDecoder, aFilter, BGRAColor::Green(), + WriteState::NEED_MORE_DATA, + OrientedIntRect(0, 0, 7, 7), 4, 4); + + // Third pass. Rows are positioned at 4n + 2. + + // Output row 2. The invalid rect contains the Haeberli rows for this + // output row (rows 2 and 3) as well as the rows that we copy from + // previous passes when seeking to the next output row (rows 4 and 5). + WriteRowAndCheckInterlacerOutput(aDecoder, aFilter, BGRAColor::Red(), + WriteState::NEED_MORE_DATA, + OrientedIntRect(0, 2, 7, 4), 2, 2); + + // Output row 6. The invalid rect is the entire image because this is + // the end of the third pass. + WriteRowAndCheckInterlacerOutput(aDecoder, aFilter, BGRAColor::Red(), + WriteState::NEED_MORE_DATA, + OrientedIntRect(0, 0, 7, 7), 6, 6); + + // Fourth pass. Rows are positioned at 2n + 1. + + // Output row 1. The invalid rect contains the Haeberli rows for this + // output row (just row 1) as well as the rows that we copy from + // previous passes when seeking to the next output row (row 2). + WriteRowAndCheckInterlacerOutput(aDecoder, aFilter, BGRAColor::Green(), + WriteState::NEED_MORE_DATA, + OrientedIntRect(0, 1, 7, 2), 1, 1); + + // Output row 3. The invalid rect contains the Haeberli rows for this + // output row (just row 3) as well as the rows that we copy from + // previous passes when seeking to the next output row (row 4). + WriteRowAndCheckInterlacerOutput(aDecoder, aFilter, BGRAColor::Red(), + WriteState::NEED_MORE_DATA, + OrientedIntRect(0, 3, 7, 2), 3, 3); + + // Output row 5. The invalid rect contains the Haeberli rows for this + // output row (just row 5) as well as the rows that we copy from + // previous passes when seeking to the next output row (row 6). + WriteRowAndCheckInterlacerOutput(aDecoder, aFilter, BGRAColor::Green(), + WriteState::FINISHED, + OrientedIntRect(0, 5, 7, 2), 5, 5); + + // Assert that we're in the expected final state. + EXPECT_TRUE(aFilter->IsSurfaceFinished()); + Maybe invalidRect = aFilter->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isNothing()); + + // Check that the generated image is correct. As mentioned above, we + // expect two green rows, followed by two red rows, then two green rows, + // etc. + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + + for (uint32_t row = 0; row < 7; ++row) { + BGRAColor color = row == 0 || row == 1 || row == 4 || row == 5 + ? BGRAColor::Green() + : BGRAColor::Red(); + EXPECT_TRUE(RowsAreSolidColor(surface, row, 1, color)); + } + }); +} + +TEST_F(ImageDeinterlacingFilter, DeinterlacingFailsFor0_0) { + // A 0x0 input size is invalid, so configuration should fail. + AssertConfiguringDeinterlacingFilterFails(IntSize(0, 0)); +} + +TEST_F(ImageDeinterlacingFilter, DeinterlacingFailsForMinus1_Minus1) { + // A negative input size is invalid, so configuration should fail. + AssertConfiguringDeinterlacingFilterFails(IntSize(-1, -1)); +} diff --git a/image/test/gtest/TestDownscalingFilter.cpp b/image/test/gtest/TestDownscalingFilter.cpp new file mode 100644 index 0000000000..d00f67d188 --- /dev/null +++ b/image/test/gtest/TestDownscalingFilter.cpp @@ -0,0 +1,231 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=8 sts=2 et sw=2 tw=80: */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "gtest/gtest.h" + +#include "mozilla/gfx/2D.h" +#include "Common.h" +#include "Decoder.h" +#include "DecoderFactory.h" +#include "SourceBuffer.h" +#include "SurfaceFilters.h" +#include "SurfacePipe.h" + +using namespace mozilla; +using namespace mozilla::gfx; +using namespace mozilla::image; + +template +void WithDownscalingFilter(const IntSize& aInputSize, + const IntSize& aOutputSize, Func aFunc) { + RefPtr decoder = CreateTrivialDecoder(); + ASSERT_TRUE(decoder != nullptr); + + WithFilterPipeline( + decoder, std::forward(aFunc), + DownscalingConfig{aInputSize, SurfaceFormat::OS_RGBA}, + SurfaceConfig{decoder, aOutputSize, SurfaceFormat::OS_RGBA, false}); +} + +void AssertConfiguringDownscalingFilterFails(const IntSize& aInputSize, + const IntSize& aOutputSize) { + RefPtr decoder = CreateTrivialDecoder(); + ASSERT_TRUE(decoder != nullptr); + + AssertConfiguringPipelineFails( + decoder, DownscalingConfig{aInputSize, SurfaceFormat::OS_RGBA}, + SurfaceConfig{decoder, aOutputSize, SurfaceFormat::OS_RGBA, false}); +} + +TEST(ImageDownscalingFilter, WritePixels100_100to99_99) +{ + WithDownscalingFilter(IntSize(100, 100), IntSize(99, 99), + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels( + aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 99, 99))); + }); +} + +TEST(ImageDownscalingFilter, WritePixels100_100to33_33) +{ + WithDownscalingFilter(IntSize(100, 100), IntSize(33, 33), + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels( + aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 33, 33))); + }); +} + +TEST(ImageDownscalingFilter, WritePixels100_100to1_1) +{ + WithDownscalingFilter(IntSize(100, 100), IntSize(1, 1), + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels( + aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 1, 1))); + }); +} + +TEST(ImageDownscalingFilter, WritePixels100_100to33_99) +{ + WithDownscalingFilter(IntSize(100, 100), IntSize(33, 99), + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels( + aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 33, 99))); + }); +} + +TEST(ImageDownscalingFilter, WritePixels100_100to99_33) +{ + WithDownscalingFilter(IntSize(100, 100), IntSize(99, 33), + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels( + aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 99, 33))); + }); +} + +TEST(ImageDownscalingFilter, WritePixels100_100to99_1) +{ + WithDownscalingFilter(IntSize(100, 100), IntSize(99, 1), + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels( + aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 99, 1))); + }); +} + +TEST(ImageDownscalingFilter, WritePixels100_100to1_99) +{ + WithDownscalingFilter(IntSize(100, 100), IntSize(1, 99), + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels( + aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 1, 99))); + }); +} + +TEST(ImageDownscalingFilter, DownscalingFailsFor100_100to101_101) +{ + // Upscaling is disallowed. + AssertConfiguringDownscalingFilterFails(IntSize(100, 100), IntSize(101, 101)); +} + +TEST(ImageDownscalingFilter, DownscalingFailsFor100_100to100_100) +{ + // "Scaling" to the same size is disallowed. + AssertConfiguringDownscalingFilterFails(IntSize(100, 100), IntSize(100, 100)); +} + +TEST(ImageDownscalingFilter, DownscalingFailsFor0_0toMinus1_Minus1) +{ + // A 0x0 input size is disallowed. + AssertConfiguringDownscalingFilterFails(IntSize(0, 0), IntSize(-1, -1)); +} + +TEST(ImageDownscalingFilter, DownscalingFailsForMinus1_Minus1toMinus2_Minus2) +{ + // A negative input size is disallowed. + AssertConfiguringDownscalingFilterFails(IntSize(-1, -1), IntSize(-2, -2)); +} + +TEST(ImageDownscalingFilter, DownscalingFailsFor100_100to0_0) +{ + // A 0x0 output size is disallowed. + AssertConfiguringDownscalingFilterFails(IntSize(100, 100), IntSize(0, 0)); +} + +TEST(ImageDownscalingFilter, DownscalingFailsFor100_100toMinus1_Minus1) +{ + // A negative output size is disallowed. + AssertConfiguringDownscalingFilterFails(IntSize(100, 100), IntSize(-1, -1)); +} + +TEST(ImageDownscalingFilter, WritePixelsOutput100_100to20_20) +{ + WithDownscalingFilter( + IntSize(100, 100), IntSize(20, 20), + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + // Fill the image. It consists of 25 lines of green, followed by 25 + // lines of red, followed by 25 lines of green, followed by 25 more + // lines of red. + uint32_t count = 0; + auto result = + aFilter->WritePixels([&]() -> NextPixel { + uint32_t color = + (count <= 25 * 100) || (count > 50 * 100 && count <= 75 * 100) + ? BGRAColor::Green().AsPixel() + : BGRAColor::Red().AsPixel(); + ++count; + return AsVariant(color); + }); + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(100u * 100u, count); + + AssertCorrectPipelineFinalState(aFilter, IntRect(0, 0, 100, 100), + IntRect(0, 0, 20, 20)); + + // Check that the generated image is correct. Note that we skip rows + // near the transitions between colors, since the downscaler does not + // produce a sharp boundary at these points. Even some of the rows we + // test need a small amount of fuzz; this is just the nature of Lanczos + // downscaling. + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + EXPECT_TRUE(RowsAreSolidColor(surface, 0, 4, BGRAColor::Green(), + /* aFuzz = */ 2)); + EXPECT_TRUE(RowsAreSolidColor(surface, 6, 3, BGRAColor::Red(), + /* aFuzz = */ 3)); + EXPECT_TRUE(RowsAreSolidColor(surface, 11, 3, BGRAColor::Green(), + /* aFuzz = */ 3)); + EXPECT_TRUE(RowsAreSolidColor(surface, 16, 4, BGRAColor::Red(), + /* aFuzz = */ 3)); + }); +} + +TEST(ImageDownscalingFilter, WritePixelsOutput100_100to10_20) +{ + WithDownscalingFilter( + IntSize(100, 100), IntSize(10, 20), + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + // Fill the image. It consists of 25 lines of green, followed by 25 + // lines of red, followed by 25 lines of green, followed by 25 more + // lines of red. + uint32_t count = 0; + auto result = + aFilter->WritePixels([&]() -> NextPixel { + uint32_t color = + (count <= 25 * 100) || (count > 50 * 100 && count <= 75 * 100) + ? BGRAColor::Green().AsPixel() + : BGRAColor::Red().AsPixel(); + ++count; + return AsVariant(color); + }); + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(100u * 100u, count); + + AssertCorrectPipelineFinalState(aFilter, IntRect(0, 0, 100, 100), + IntRect(0, 0, 10, 20)); + + // Check that the generated image is correct. Note that we skip rows + // near the transitions between colors, since the downscaler does not + // produce a sharp boundary at these points. Even some of the rows we + // test need a small amount of fuzz; this is just the nature of Lanczos + // downscaling. + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + EXPECT_TRUE(RowsAreSolidColor(surface, 0, 4, BGRAColor::Green(), + /* aFuzz = */ 2)); + EXPECT_TRUE(RowsAreSolidColor(surface, 6, 3, BGRAColor::Red(), + /* aFuzz = */ 3)); + EXPECT_TRUE(RowsAreSolidColor(surface, 11, 3, BGRAColor::Green(), + /* aFuzz = */ 3)); + EXPECT_TRUE(RowsAreSolidColor(surface, 16, 4, BGRAColor::Red(), + /* aFuzz = */ 3)); + }); +} diff --git a/image/test/gtest/TestFrameAnimator.cpp b/image/test/gtest/TestFrameAnimator.cpp new file mode 100644 index 0000000000..cd23f132f8 --- /dev/null +++ b/image/test/gtest/TestFrameAnimator.cpp @@ -0,0 +1,130 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "gtest/gtest.h" + +#include "Common.h" +#include "AnimationSurfaceProvider.h" +#include "Decoder.h" +#include "ImageFactory.h" +#include "nsIInputStream.h" +#include "RasterImage.h" + +using namespace mozilla; +using namespace mozilla::gfx; +using namespace mozilla::image; + +static void CheckFrameAnimatorBlendResults(const ImageTestCase& aTestCase, + RasterImage* aImage, uint8_t aFuzz) { + // Allow the animation to actually begin. + aImage->IncrementAnimationConsumers(); + + // Initialize for the first frame so we can advance. + TimeStamp now = TimeStamp::Now(); + aImage->RequestRefresh(now); + EXPECT_EQ(aImage->GetFrameIndex(imgIContainer::FRAME_CURRENT), 0); + + RefPtr surface = + aImage->GetFrame(imgIContainer::FRAME_CURRENT, imgIContainer::FLAG_NONE); + ASSERT_TRUE(surface != nullptr); + + CheckGeneratedSurface(surface, IntRect(0, 0, 50, 50), + BGRAColor::Transparent(), + aTestCase.ChooseColor(BGRAColor::Red()), aFuzz); + + // Advance to the next/final frame. + now = TimeStamp::Now() + TimeDuration::FromMilliseconds(500); + aImage->RequestRefresh(now); + EXPECT_EQ(aImage->GetFrameIndex(imgIContainer::FRAME_CURRENT), 1); + + surface = + aImage->GetFrame(imgIContainer::FRAME_CURRENT, imgIContainer::FLAG_NONE); + ASSERT_TRUE(surface != nullptr); + CheckGeneratedSurface(surface, IntRect(0, 0, 50, 50), + aTestCase.ChooseColor(BGRAColor::Green()), + aTestCase.ChooseColor(BGRAColor::Red()), aFuzz); +} + +template +static void WithFrameAnimatorDecode(const ImageTestCase& aTestCase, + Func aResultChecker) { + // Create an image. + RefPtr image = ImageFactory::CreateAnonymousImage( + nsDependentCString(aTestCase.mMimeType)); + ASSERT_TRUE(!image->HasError()); + + NotNull> rasterImage = + WrapNotNull(static_cast(image.get())); + + nsCOMPtr inputStream = LoadFile(aTestCase.mPath); + ASSERT_TRUE(inputStream != nullptr); + + // Figure out how much data we have. + uint64_t length; + nsresult rv = inputStream->Available(&length); + ASSERT_NS_SUCCEEDED(rv); + + // Write the data into a SourceBuffer. + NotNull> sourceBuffer = WrapNotNull(new SourceBuffer()); + sourceBuffer->ExpectLength(length); + rv = sourceBuffer->AppendFromInputStream(inputStream, length); + ASSERT_NS_SUCCEEDED(rv); + sourceBuffer->Complete(NS_OK); + + // Create a metadata decoder first, because otherwise RasterImage will get + // unhappy about finding out the image is animated during a full decode. + DecoderType decoderType = DecoderFactory::GetDecoderType(aTestCase.mMimeType); + DecoderFlags decoderFlags = + DecoderFactory::GetDefaultDecoderFlagsForType(decoderType); + RefPtr task = DecoderFactory::CreateMetadataDecoder( + decoderType, rasterImage, decoderFlags, sourceBuffer); + ASSERT_TRUE(task != nullptr); + + // Run the metadata decoder synchronously. + task->Run(); + task = nullptr; + + // Create an AnimationSurfaceProvider which will manage the decoding process + // and make this decoder's output available in the surface cache. + SurfaceFlags surfaceFlags = aTestCase.mSurfaceFlags; + rv = DecoderFactory::CreateAnimationDecoder( + decoderType, rasterImage, sourceBuffer, aTestCase.mSize, decoderFlags, + surfaceFlags, 0, getter_AddRefs(task)); + EXPECT_EQ(rv, NS_OK); + ASSERT_TRUE(task != nullptr); + + // Run the full decoder synchronously. + task->Run(); + + // Call the lambda to verify the expected results. + aResultChecker(rasterImage.get()); +} + +static void CheckFrameAnimatorBlend(const ImageTestCase& aTestCase, + uint8_t aFuzz = 0) { + WithFrameAnimatorDecode(aTestCase, [&](RasterImage* aImage) { + CheckFrameAnimatorBlendResults(aTestCase, aImage, aFuzz); + }); +} + +class ImageFrameAnimator : public ::testing::Test { + protected: + AutoInitializeImageLib mInit; +}; + +TEST_F(ImageFrameAnimator, BlendGIFWithFilter) { + CheckFrameAnimatorBlend(BlendAnimatedGIFTestCase()); +} + +TEST_F(ImageFrameAnimator, BlendPNGWithFilter) { + CheckFrameAnimatorBlend(BlendAnimatedPNGTestCase()); +} + +TEST_F(ImageFrameAnimator, BlendWebPWithFilter) { + CheckFrameAnimatorBlend(BlendAnimatedWebPTestCase()); +} + +TEST_F(ImageFrameAnimator, BlendAVIFWithFilter) { + CheckFrameAnimatorBlend(BlendAnimatedAVIFTestCase(), 1); +} diff --git a/image/test/gtest/TestLoader.cpp b/image/test/gtest/TestLoader.cpp new file mode 100644 index 0000000000..d18302f37a --- /dev/null +++ b/image/test/gtest/TestLoader.cpp @@ -0,0 +1,118 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=8 sts=2 et sw=2 tw=80: */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "gtest/gtest.h" + +#include "Common.h" +#include "imgLoader.h" +#include "nsMimeTypes.h" +#include "nsString.h" + +using namespace mozilla; +using namespace mozilla::image; + +static void CheckMimeType(const char* aContents, size_t aLength, + const char* aExpected) { + nsAutoCString detected; + nsresult rv = imgLoader::GetMimeTypeFromContent(aContents, aLength, detected); + if (aExpected) { + ASSERT_NS_SUCCEEDED(rv); + EXPECT_TRUE(detected.EqualsASCII(aExpected)); + } else { + ASSERT_NS_FAILED(rv); + EXPECT_TRUE(detected.IsEmpty()); + } +} + +class ImageLoader : public ::testing::Test { + protected: + AutoInitializeImageLib mInit; +}; + +TEST_F(ImageLoader, DetectGIF) { + const char buffer[] = "GIF87a"; + CheckMimeType(buffer, sizeof(buffer), IMAGE_GIF); +} + +TEST_F(ImageLoader, DetectPNG) { + const char buffer[] = "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A"; + CheckMimeType(buffer, sizeof(buffer), IMAGE_PNG); +} + +TEST_F(ImageLoader, DetectJPEG) { + const char buffer[] = "\xFF\xD8\xFF"; + CheckMimeType(buffer, sizeof(buffer), IMAGE_JPEG); +} + +TEST_F(ImageLoader, DetectART) { + const char buffer[] = "\x4A\x47\xFF\xFF\x00"; + CheckMimeType(buffer, sizeof(buffer), IMAGE_ART); +} + +TEST_F(ImageLoader, DetectBMP) { + const char buffer[] = "BM"; + CheckMimeType(buffer, sizeof(buffer), IMAGE_BMP); +} + +TEST_F(ImageLoader, DetectICO) { + const char buffer[] = "\x00\x00\x01\x00"; + CheckMimeType(buffer, sizeof(buffer), IMAGE_ICO); +} + +TEST_F(ImageLoader, DetectWebP) { + const char buffer[] = "RIFF\xFF\xFF\xFF\xFFWEBPVP8L"; + CheckMimeType(buffer, sizeof(buffer), IMAGE_WEBP); +} + +TEST_F(ImageLoader, DetectAVIFMajorBrand) { + const char buffer[] = + "\x00\x00\x00\x20" // box length + "ftyp" // box type + "avif" // major brand + "\x00\x00\x00\x00" // minor version + "avifmif1miafMA1B"; // compatible brands + CheckMimeType(buffer, sizeof(buffer), IMAGE_AVIF); +} + +TEST_F(ImageLoader, DetectAVIFCompatibleBrand) { + const char buffer[] = + "\x00\x00\x00\x20" // box length + "ftyp" // box type + "XXXX" // major brand + "\x00\x00\x00\x00" // minor version + "avifmif1miafMA1B"; // compatible brands + CheckMimeType(buffer, sizeof(buffer), IMAGE_AVIF); +} + +#ifdef MOZ_JXL +TEST_F(ImageLoader, DetectJXLCodestream) { + const char buffer[] = "\xff\x0a"; + CheckMimeType(buffer, sizeof(buffer), IMAGE_JXL); +} + +TEST_F(ImageLoader, DetectJXLContainer) { + const char buffer[] = + "\x00\x00\x00\x0c" + "JXL " + "\x0d\x0a\x87\x0a"; + CheckMimeType(buffer, sizeof(buffer), IMAGE_JXL); +} +#endif + +TEST_F(ImageLoader, DetectNonImageMP4) { + const char buffer[] = + "\x00\x00\x00\x1c" // box length + "ftyp" // box type + "isom" // major brand + "\x00\x00\x02\x00" // minor version + "isomiso2mp41"; // compatible brands + CheckMimeType(buffer, sizeof(buffer), nullptr); +} + +TEST_F(ImageLoader, DetectNone) { + const char buffer[] = "abcdefghijklmnop"; + CheckMimeType(buffer, sizeof(buffer), nullptr); +} diff --git a/image/test/gtest/TestMetadata.cpp b/image/test/gtest/TestMetadata.cpp new file mode 100644 index 0000000000..d230bf42b9 --- /dev/null +++ b/image/test/gtest/TestMetadata.cpp @@ -0,0 +1,260 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "gtest/gtest.h" + +#include "Common.h" +#include "Decoder.h" +#include "DecoderFactory.h" +#include "decoders/nsBMPDecoder.h" +#include "IDecodingTask.h" +#include "imgIContainer.h" +#include "ImageFactory.h" +#include "mozilla/gfx/2D.h" +#include "nsComponentManagerUtils.h" +#include "nsCOMPtr.h" +#include "nsIInputStream.h" +#include "mozilla/RefPtr.h" +#include "nsStreamUtils.h" +#include "nsString.h" +#include "nsThreadUtils.h" +#include "ProgressTracker.h" +#include "SourceBuffer.h" + +using namespace mozilla; +using namespace mozilla::gfx; +using namespace mozilla::image; + +enum class BMPWithinICO { NO, YES }; + +static void CheckMetadata(const ImageTestCase& aTestCase, + BMPWithinICO aBMPWithinICO = BMPWithinICO::NO) { + nsCOMPtr inputStream = LoadFile(aTestCase.mPath); + ASSERT_TRUE(inputStream != nullptr); + + // Figure out how much data we have. + uint64_t length; + nsresult rv = inputStream->Available(&length); + ASSERT_NS_SUCCEEDED(rv); + + // Write the data into a SourceBuffer. + auto sourceBuffer = MakeNotNull>(); + sourceBuffer->ExpectLength(length); + rv = sourceBuffer->AppendFromInputStream(inputStream, length); + ASSERT_NS_SUCCEEDED(rv); + sourceBuffer->Complete(NS_OK); + + // Create a metadata decoder. + DecoderType decoderType = DecoderFactory::GetDecoderType(aTestCase.mMimeType); + RefPtr decoder = + DecoderFactory::CreateAnonymousMetadataDecoder(decoderType, sourceBuffer); + ASSERT_TRUE(decoder != nullptr); + RefPtr task = + new AnonymousDecodingTask(WrapNotNull(decoder), /* aResumable */ false); + + if (aBMPWithinICO == BMPWithinICO::YES) { + static_cast(decoder.get())->SetIsWithinICO(); + } + + // Run the metadata decoder synchronously. + task->Run(); + + // Ensure that the metadata decoder didn't make progress it shouldn't have + // (which would indicate that it decoded past the header of the image). + Progress metadataProgress = decoder->TakeProgress(); + EXPECT_TRUE( + 0 == (metadataProgress & + ~(FLAG_SIZE_AVAILABLE | FLAG_HAS_TRANSPARENCY | FLAG_IS_ANIMATED))); + + // If the test case is corrupt, assert what we can and return early. + if (aTestCase.mFlags & TEST_CASE_HAS_ERROR) { + EXPECT_TRUE(decoder->GetDecodeDone()); + EXPECT_TRUE(decoder->HasError()); + return; + } + + EXPECT_TRUE(decoder->GetDecodeDone() && !decoder->HasError()); + + // Check that we got the expected metadata. + EXPECT_TRUE(metadataProgress & FLAG_SIZE_AVAILABLE); + + OrientedIntSize metadataSize = decoder->Size(); + EXPECT_EQ(aTestCase.mSize.width, metadataSize.width); + if (aBMPWithinICO == BMPWithinICO::YES) { + // Half the data is considered to be part of the AND mask if embedded + EXPECT_EQ(aTestCase.mSize.height / 2, metadataSize.height); + } else { + EXPECT_EQ(aTestCase.mSize.height, metadataSize.height); + } + + bool expectTransparency = + aBMPWithinICO == BMPWithinICO::YES + ? true + : bool(aTestCase.mFlags & TEST_CASE_IS_TRANSPARENT); + EXPECT_EQ(expectTransparency, bool(metadataProgress & FLAG_HAS_TRANSPARENCY)); + + EXPECT_EQ(bool(aTestCase.mFlags & TEST_CASE_IS_ANIMATED), + bool(metadataProgress & FLAG_IS_ANIMATED)); + + // Create a full decoder, so we can compare the result. + decoder = DecoderFactory::CreateAnonymousDecoder( + decoderType, sourceBuffer, Nothing(), DecoderFlags::FIRST_FRAME_ONLY, + aTestCase.mSurfaceFlags); + ASSERT_TRUE(decoder != nullptr); + task = + new AnonymousDecodingTask(WrapNotNull(decoder), /* aResumable */ false); + + if (aBMPWithinICO == BMPWithinICO::YES) { + static_cast(decoder.get())->SetIsWithinICO(); + } + + // Run the full decoder synchronously. + task->Run(); + + EXPECT_TRUE(decoder->GetDecodeDone() && !decoder->HasError()); + Progress fullProgress = decoder->TakeProgress(); + + // If the metadata decoder set a progress bit, the full decoder should also + // have set the same bit. + EXPECT_EQ(fullProgress, metadataProgress | fullProgress); + + // The full decoder and the metadata decoder should agree on the image's size. + OrientedIntSize fullSize = decoder->Size(); + EXPECT_EQ(metadataSize.width, fullSize.width); + EXPECT_EQ(metadataSize.height, fullSize.height); + + // We should not discover transparency during the full decode that we didn't + // discover during the metadata decode, unless the image is animated. + EXPECT_TRUE(!(fullProgress & FLAG_HAS_TRANSPARENCY) || + (metadataProgress & FLAG_HAS_TRANSPARENCY) || + (fullProgress & FLAG_IS_ANIMATED)); +} + +class ImageDecoderMetadata : public ::testing::Test { + protected: + AutoInitializeImageLib mInit; +}; + +TEST_F(ImageDecoderMetadata, TransparentAVIF) { + CheckMetadata(TransparentAVIFTestCase()); +} + +TEST_F(ImageDecoderMetadata, PNG) { CheckMetadata(GreenPNGTestCase()); } +TEST_F(ImageDecoderMetadata, TransparentPNG) { + CheckMetadata(TransparentPNGTestCase()); +} +TEST_F(ImageDecoderMetadata, GIF) { CheckMetadata(GreenGIFTestCase()); } +TEST_F(ImageDecoderMetadata, TransparentGIF) { + CheckMetadata(TransparentGIFTestCase()); +} +TEST_F(ImageDecoderMetadata, JPG) { CheckMetadata(GreenJPGTestCase()); } +TEST_F(ImageDecoderMetadata, BMP) { CheckMetadata(GreenBMPTestCase()); } +TEST_F(ImageDecoderMetadata, ICO) { CheckMetadata(GreenICOTestCase()); } +TEST_F(ImageDecoderMetadata, Icon) { CheckMetadata(GreenIconTestCase()); } +TEST_F(ImageDecoderMetadata, WebP) { CheckMetadata(GreenWebPTestCase()); } + +#ifdef MOZ_JXL +TEST_F(ImageDecoderMetadata, JXL) { CheckMetadata(GreenJXLTestCase()); } +TEST_F(ImageDecoderMetadata, TransparentJXL) { + CheckMetadata(TransparentJXLTestCase()); +} +#endif + +TEST_F(ImageDecoderMetadata, AnimatedGIF) { + CheckMetadata(GreenFirstFrameAnimatedGIFTestCase()); +} + +TEST_F(ImageDecoderMetadata, AnimatedPNG) { + CheckMetadata(GreenFirstFrameAnimatedPNGTestCase()); +} + +TEST_F(ImageDecoderMetadata, FirstFramePaddingGIF) { + CheckMetadata(FirstFramePaddingGIFTestCase()); +} + +TEST_F(ImageDecoderMetadata, TransparentIfWithinICOBMPNotWithinICO) { + CheckMetadata(TransparentIfWithinICOBMPTestCase(TEST_CASE_DEFAULT_FLAGS), + BMPWithinICO::NO); +} + +TEST_F(ImageDecoderMetadata, TransparentIfWithinICOBMPWithinICO) { + CheckMetadata(TransparentIfWithinICOBMPTestCase(TEST_CASE_IS_TRANSPARENT), + BMPWithinICO::YES); +} + +TEST_F(ImageDecoderMetadata, RLE4BMP) { CheckMetadata(RLE4BMPTestCase()); } +TEST_F(ImageDecoderMetadata, RLE8BMP) { CheckMetadata(RLE8BMPTestCase()); } + +TEST_F(ImageDecoderMetadata, Corrupt) { CheckMetadata(CorruptTestCase()); } + +TEST_F(ImageDecoderMetadata, NoFrameDelayGIF) { + CheckMetadata(NoFrameDelayGIFTestCase()); +} + +TEST_F(ImageDecoderMetadata, NoFrameDelayGIFFullDecode) { + ImageTestCase testCase = NoFrameDelayGIFTestCase(); + + // The previous test (NoFrameDelayGIF) verifies that we *don't* detect that + // this test case is animated, because it has a zero frame delay for the first + // frame. This test verifies that when we do a full decode, we detect the + // animation at that point and successfully decode all the frames. + + // Create an image. + RefPtr image = ImageFactory::CreateAnonymousImage( + nsDependentCString(testCase.mMimeType)); + ASSERT_TRUE(!image->HasError()); + + nsCOMPtr inputStream = LoadFile(testCase.mPath); + ASSERT_TRUE(inputStream != nullptr); + + // Figure out how much data we have. + uint64_t length; + nsresult rv = inputStream->Available(&length); + ASSERT_NS_SUCCEEDED(rv); + + // Write the data into the image. + rv = image->OnImageDataAvailable(nullptr, inputStream, 0, + static_cast(length)); + ASSERT_NS_SUCCEEDED(rv); + + // Let the image know we've sent all the data. + rv = image->OnImageDataComplete(nullptr, NS_OK, true); + ASSERT_NS_SUCCEEDED(rv); + + RefPtr tracker = image->GetProgressTracker(); + tracker->SyncNotifyProgress(FLAG_LOAD_COMPLETE); + + // Use GetFrame() to force a sync decode of the image. + RefPtr surface = image->GetFrame( + imgIContainer::FRAME_CURRENT, imgIContainer::FLAG_SYNC_DECODE); + + // Ensure that the image's metadata meets our expectations. + IntSize imageSize(0, 0); + rv = image->GetWidth(&imageSize.width); + EXPECT_NS_SUCCEEDED(rv); + rv = image->GetHeight(&imageSize.height); + EXPECT_NS_SUCCEEDED(rv); + + EXPECT_EQ(testCase.mSize.width, imageSize.width); + EXPECT_EQ(testCase.mSize.height, imageSize.height); + + Progress imageProgress = tracker->GetProgress(); + + EXPECT_TRUE(bool(imageProgress & FLAG_HAS_TRANSPARENCY) == false); + EXPECT_TRUE(bool(imageProgress & FLAG_IS_ANIMATED) == true); + + // Ensure that we decoded both frames of the image. + LookupResult result = + SurfaceCache::Lookup(ImageKey(image.get()), + RasterSurfaceKey(imageSize, testCase.mSurfaceFlags, + PlaybackType::eAnimated), + /* aMarkUsed = */ true); + ASSERT_EQ(MatchType::EXACT, result.Type()); + + EXPECT_NS_SUCCEEDED(result.Surface().Seek(0)); + EXPECT_TRUE(bool(result.Surface())); + + RefPtr partialFrame = result.Surface().GetFrame(1); + EXPECT_TRUE(bool(partialFrame)); +} diff --git a/image/test/gtest/TestRemoveFrameRectFilter.cpp b/image/test/gtest/TestRemoveFrameRectFilter.cpp new file mode 100644 index 0000000000..59549f3ddb --- /dev/null +++ b/image/test/gtest/TestRemoveFrameRectFilter.cpp @@ -0,0 +1,311 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=8 sts=2 et sw=2 tw=80: */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "gtest/gtest.h" + +#include "mozilla/gfx/2D.h" +#include "Common.h" +#include "Decoder.h" +#include "DecoderFactory.h" +#include "SourceBuffer.h" +#include "SurfaceFilters.h" +#include "SurfacePipe.h" + +using namespace mozilla; +using namespace mozilla::gfx; +using namespace mozilla::image; + +template +void WithRemoveFrameRectFilter(const IntSize& aSize, const IntRect& aFrameRect, + Func aFunc) { + RefPtr decoder = CreateTrivialDecoder(); + ASSERT_TRUE(decoder != nullptr); + + WithFilterPipeline( + decoder, std::forward(aFunc), RemoveFrameRectConfig{aFrameRect}, + SurfaceConfig{decoder, aSize, SurfaceFormat::OS_RGBA, false}); +} + +void AssertConfiguringRemoveFrameRectFilterFails(const IntSize& aSize, + const IntRect& aFrameRect) { + RefPtr decoder = CreateTrivialDecoder(); + ASSERT_TRUE(decoder != nullptr); + + AssertConfiguringPipelineFails( + decoder, RemoveFrameRectConfig{aFrameRect}, + SurfaceConfig{decoder, aSize, SurfaceFormat::OS_RGBA, false}); +} + +TEST(ImageRemoveFrameRectFilter, WritePixels100_100_to_0_0_100_100) +{ + WithRemoveFrameRectFilter( + IntSize(100, 100), IntRect(0, 0, 100, 100), + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputWriteRect = */ Some(IntRect(0, 0, 100, 100))); + }); +} + +TEST(ImageRemoveFrameRectFilter, WritePixels100_100_to_0_0_0_0) +{ + WithRemoveFrameRectFilter( + IntSize(100, 100), IntRect(0, 0, 0, 0), + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputWriteRect = */ Some(IntRect(0, 0, 0, 0)), + /* aOutputWriteRect = */ Some(IntRect(0, 0, 0, 0))); + }); +} + +TEST(ImageRemoveFrameRectFilter, WritePixels100_100_to_Minus50_50_0_0) +{ + WithRemoveFrameRectFilter( + IntSize(100, 100), IntRect(-50, 50, 0, 0), + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputWriteRect = */ Some(IntRect(0, 0, 0, 0)), + /* aOutputWriteRect = */ Some(IntRect(0, 0, 0, 0))); + }); +} + +TEST(ImageRemoveFrameRectFilter, WritePixels100_100_to_50_Minus50_0_0) +{ + WithRemoveFrameRectFilter( + IntSize(100, 100), IntRect(50, -50, 0, 0), + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputWriteRect = */ Some(IntRect(0, 0, 0, 0)), + /* aOutputWriteRect = */ Some(IntRect(0, 0, 0, 0))); + }); +} + +TEST(ImageRemoveFrameRectFilter, WritePixels100_100_to_150_50_0_0) +{ + WithRemoveFrameRectFilter( + IntSize(100, 100), IntRect(150, 50, 0, 0), + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputWriteRect = */ Some(IntRect(0, 0, 0, 0)), + /* aOutputWriteRect = */ Some(IntRect(0, 0, 0, 0))); + }); +} + +TEST(ImageRemoveFrameRectFilter, WritePixels100_100_to_50_150_0_0) +{ + WithRemoveFrameRectFilter( + IntSize(100, 100), IntRect(50, 150, 0, 0), + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputWriteRect = */ Some(IntRect(0, 0, 0, 0)), + /* aOutputWriteRect = */ Some(IntRect(0, 0, 0, 0))); + }); +} + +TEST(ImageRemoveFrameRectFilter, WritePixels100_100_to_200_200_100_100) +{ + WithRemoveFrameRectFilter( + IntSize(100, 100), IntRect(200, 200, 100, 100), + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + // Note that aInputRect is zero-size because RemoveFrameRectFilter + // ignores trailing rows that don't show up in the output. (Leading rows + // unfortunately can't be ignored.) + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputWriteRect = */ Some(IntRect(0, 0, 0, 0)), + /* aOutputWriteRect = */ Some(IntRect(0, 0, 0, 0))); + }); +} + +TEST(ImageRemoveFrameRectFilter, WritePixels100_100_to_Minus200_25_100_100) +{ + WithRemoveFrameRectFilter( + IntSize(100, 100), IntRect(-200, 25, 100, 100), + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + // Note that aInputRect is zero-size because RemoveFrameRectFilter + // ignores trailing rows that don't show up in the output. (Leading rows + // unfortunately can't be ignored.) + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputWriteRect = */ Some(IntRect(0, 0, 0, 0)), + /* aOutputWriteRect = */ Some(IntRect(0, 0, 0, 0))); + }); +} + +TEST(ImageRemoveFrameRectFilter, WritePixels100_100_to_25_Minus200_100_100) +{ + WithRemoveFrameRectFilter( + IntSize(100, 100), IntRect(25, -200, 100, 100), + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + // Note that aInputRect is zero-size because RemoveFrameRectFilter + // ignores trailing rows that don't show up in the output. (Leading rows + // unfortunately can't be ignored.) + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputWriteRect = */ Some(IntRect(0, 0, 0, 0)), + /* aOutputWriteRect = */ Some(IntRect(0, 0, 0, 0))); + }); +} + +TEST(ImageRemoveFrameRectFilter, WritePixels100_100_to_200_25_100_100) +{ + WithRemoveFrameRectFilter( + IntSize(100, 100), IntRect(200, 25, 100, 100), + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + // Note that aInputRect is zero-size because RemoveFrameRectFilter + // ignores trailing rows that don't show up in the output. (Leading rows + // unfortunately can't be ignored.) + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputWriteRect = */ Some(IntRect(0, 0, 0, 0)), + /* aOutputWriteRect = */ Some(IntRect(0, 0, 0, 0))); + }); +} + +TEST(ImageRemoveFrameRectFilter, WritePixels100_100_to_25_200_100_100) +{ + WithRemoveFrameRectFilter( + IntSize(100, 100), IntRect(25, 200, 100, 100), + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + // Note that aInputRect is zero-size because RemoveFrameRectFilter + // ignores trailing rows that don't show up in the output. (Leading rows + // unfortunately can't be ignored.) + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputWriteRect = */ Some(IntRect(0, 0, 0, 0)), + /* aOutputWriteRect = */ Some(IntRect(0, 0, 0, 0))); + }); +} + +TEST(ImageRemoveFrameRectFilter, + WritePixels100_100_to_Minus200_Minus200_100_100) +{ + WithRemoveFrameRectFilter( + IntSize(100, 100), IntRect(-200, -200, 100, 100), + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputWriteRect = */ Some(IntRect(0, 0, 0, 0)), + /* aOutputWriteRect = */ Some(IntRect(0, 0, 0, 0))); + }); +} + +TEST(ImageRemoveFrameRectFilter, WritePixels100_100_to_Minus50_Minus50_100_100) +{ + WithRemoveFrameRectFilter( + IntSize(100, 100), IntRect(-50, -50, 100, 100), + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputWriteRect = */ Some(IntRect(0, 0, 100, 100)), + /* aOutputWriteRect = */ Some(IntRect(0, 0, 50, 50))); + }); +} + +TEST(ImageRemoveFrameRectFilter, WritePixels100_100_to_Minus50_25_100_50) +{ + WithRemoveFrameRectFilter( + IntSize(100, 100), IntRect(-50, 25, 100, 50), + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputWriteRect = */ Some(IntRect(0, 0, 100, 50)), + /* aOutputWriteRect = */ Some(IntRect(0, 25, 50, 50))); + }); +} + +TEST(ImageRemoveFrameRectFilter, WritePixels100_100_to_25_Minus50_50_100) +{ + WithRemoveFrameRectFilter( + IntSize(100, 100), IntRect(25, -50, 50, 100), + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputWriteRect = */ Some(IntRect(0, 0, 50, 100)), + /* aOutputWriteRect = */ Some(IntRect(25, 0, 50, 50))); + }); +} + +TEST(ImageRemoveFrameRectFilter, WritePixels100_100_to_50_25_100_50) +{ + WithRemoveFrameRectFilter( + IntSize(100, 100), IntRect(50, 25, 100, 50), + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels( + aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputWriteRect = */ Some(IntRect(0, 0, 100, 50)), + /* aOutputWriteRect = */ Some(IntRect(50, 25, 50, 50))); + }); +} + +TEST(ImageRemoveFrameRectFilter, WritePixels100_100_to_25_50_50_100) +{ + WithRemoveFrameRectFilter( + IntSize(100, 100), IntRect(25, 50, 50, 100), + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + // Note that aInputRect is 50x50 because RemoveFrameRectFilter ignores + // trailing rows that don't show up in the output. (Leading rows + // unfortunately can't be ignored.) + CheckWritePixels( + aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputWriteRect = */ Some(IntRect(0, 0, 50, 50)), + /* aOutputWriteRect = */ Some(IntRect(25, 50, 50, 100))); + }); +} + +TEST(ImageRemoveFrameRectFilter, RemoveFrameRectFailsFor0_0_to_0_0_100_100) +{ + // A zero-size image is disallowed. + AssertConfiguringRemoveFrameRectFilterFails(IntSize(0, 0), + IntRect(0, 0, 100, 100)); +} + +TEST(ImageRemoveFrameRectFilter, + RemoveFrameRectFailsForMinus1_Minus1_to_0_0_100_100) +{ + // A negative-size image is disallowed. + AssertConfiguringRemoveFrameRectFilterFails(IntSize(-1, -1), + IntRect(0, 0, 100, 100)); +} + +TEST(ImageRemoveFrameRectFilter, RemoveFrameRectFailsFor100_100_to_0_0_0_0) +{ + // A zero size frame rect is disallowed. + AssertConfiguringRemoveFrameRectFilterFails(IntSize(100, 100), + IntRect(0, 0, -1, -1)); +} + +TEST(ImageRemoveFrameRectFilter, + RemoveFrameRectFailsFor100_100_to_0_0_Minus1_Minus1) +{ + // A negative size frame rect is disallowed. + AssertConfiguringRemoveFrameRectFilterFails(IntSize(100, 100), + IntRect(0, 0, -1, -1)); +} diff --git a/image/test/gtest/TestSourceBuffer.cpp b/image/test/gtest/TestSourceBuffer.cpp new file mode 100644 index 0000000000..478ab56610 --- /dev/null +++ b/image/test/gtest/TestSourceBuffer.cpp @@ -0,0 +1,822 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include +#include +#include + +#include "Common.h" +#include "SourceBuffer.h" +#include "SurfaceCache.h" +#include "gtest/gtest.h" +#include "nsIInputStream.h" + +using namespace mozilla; +using namespace mozilla::image; + +using std::min; + +void ExpectChunkAndByteCount(const SourceBufferIterator& aIterator, + uint32_t aChunks, size_t aBytes) { + EXPECT_EQ(aChunks, aIterator.ChunkCount()); + EXPECT_EQ(aBytes, aIterator.ByteCount()); +} + +void ExpectRemainingBytes(const SourceBufferIterator& aIterator, + size_t aBytes) { + EXPECT_TRUE(aIterator.RemainingBytesIsNoMoreThan(aBytes)); + EXPECT_TRUE(aIterator.RemainingBytesIsNoMoreThan(aBytes + 1)); + + if (aBytes > 0) { + EXPECT_FALSE(aIterator.RemainingBytesIsNoMoreThan(0)); + EXPECT_FALSE(aIterator.RemainingBytesIsNoMoreThan(aBytes - 1)); + } +} + +char GenerateByte(size_t aIndex) { + uint8_t byte = aIndex % 256; + return *reinterpret_cast(&byte); +} + +void GenerateData(char* aOutput, size_t aOffset, size_t aLength) { + for (size_t i = 0; i < aLength; ++i) { + aOutput[i] = GenerateByte(aOffset + i); + } +} + +void GenerateData(char* aOutput, size_t aLength) { + GenerateData(aOutput, 0, aLength); +} + +void CheckData(const char* aData, size_t aOffset, size_t aLength) { + for (size_t i = 0; i < aLength; ++i) { + ASSERT_EQ(GenerateByte(aOffset + i), aData[i]); + } +} + +enum class AdvanceMode { eAdvanceAsMuchAsPossible, eAdvanceByLengthExactly }; + +class ImageSourceBuffer : public ::testing::Test { + public: + ImageSourceBuffer() + : mSourceBuffer(new SourceBuffer), + mExpectNoResume(new ExpectNoResume), + mCountResumes(new CountResumes) { + GenerateData(mData, sizeof(mData)); + EXPECT_FALSE(mSourceBuffer->IsComplete()); + } + + protected: + void CheckedAppendToBuffer(const char* aData, size_t aLength) { + EXPECT_NS_SUCCEEDED(mSourceBuffer->Append(aData, aLength)); + } + + void CheckedAppendToBufferLastByteForLength(size_t aLength) { + const char lastByte = GenerateByte(aLength); + CheckedAppendToBuffer(&lastByte, 1); + } + + void CheckedAppendToBufferInChunks(size_t aChunkLength, size_t aTotalLength) { + char* data = new char[aChunkLength]; + + size_t bytesWritten = 0; + while (bytesWritten < aTotalLength) { + GenerateData(data, bytesWritten, aChunkLength); + size_t toWrite = min(aChunkLength, aTotalLength - bytesWritten); + CheckedAppendToBuffer(data, toWrite); + bytesWritten += toWrite; + } + + delete[] data; + } + + void CheckedCompleteBuffer(nsresult aCompletionStatus = NS_OK) { + mSourceBuffer->Complete(aCompletionStatus); + EXPECT_TRUE(mSourceBuffer->IsComplete()); + } + + void CheckedCompleteBuffer(SourceBufferIterator& aIterator, size_t aLength, + nsresult aCompletionStatus = NS_OK) { + CheckedCompleteBuffer(aCompletionStatus); + ExpectRemainingBytes(aIterator, aLength); + } + + void CheckedAdvanceIteratorStateOnly( + SourceBufferIterator& aIterator, size_t aLength, uint32_t aChunks, + size_t aTotalLength, + AdvanceMode aAdvanceMode = AdvanceMode::eAdvanceAsMuchAsPossible) { + const size_t advanceBy = + aAdvanceMode == AdvanceMode::eAdvanceAsMuchAsPossible ? SIZE_MAX + : aLength; + + auto state = aIterator.AdvanceOrScheduleResume(advanceBy, mExpectNoResume); + ASSERT_EQ(SourceBufferIterator::READY, state); + EXPECT_TRUE(aIterator.Data()); + EXPECT_EQ(aLength, aIterator.Length()); + + ExpectChunkAndByteCount(aIterator, aChunks, aTotalLength); + } + + void CheckedAdvanceIteratorStateOnly(SourceBufferIterator& aIterator, + size_t aLength) { + CheckedAdvanceIteratorStateOnly(aIterator, aLength, 1, aLength); + } + + void CheckedAdvanceIterator( + SourceBufferIterator& aIterator, size_t aLength, uint32_t aChunks, + size_t aTotalLength, + AdvanceMode aAdvanceMode = AdvanceMode::eAdvanceAsMuchAsPossible) { + // Check that the iterator is in the expected state. + CheckedAdvanceIteratorStateOnly(aIterator, aLength, aChunks, aTotalLength, + aAdvanceMode); + + // Check that we read the expected data. To do this, we need to compute our + // offset in the SourceBuffer, but fortunately that's pretty easy: it's the + // total number of bytes the iterator has advanced through, minus the length + // of the current chunk. + const size_t offset = aIterator.ByteCount() - aIterator.Length(); + CheckData(aIterator.Data(), offset, aIterator.Length()); + } + + void CheckedAdvanceIterator(SourceBufferIterator& aIterator, size_t aLength) { + CheckedAdvanceIterator(aIterator, aLength, 1, aLength); + } + + void CheckIteratorMustWait(SourceBufferIterator& aIterator, + IResumable* aOnResume) { + auto state = aIterator.AdvanceOrScheduleResume(1, aOnResume); + EXPECT_EQ(SourceBufferIterator::WAITING, state); + } + + void CheckIteratorIsComplete(SourceBufferIterator& aIterator, + uint32_t aChunks, size_t aTotalLength, + nsresult aCompletionStatus = NS_OK) { + ASSERT_TRUE(mSourceBuffer->IsComplete()); + auto state = aIterator.AdvanceOrScheduleResume(1, mExpectNoResume); + ASSERT_EQ(SourceBufferIterator::COMPLETE, state); + EXPECT_EQ(aCompletionStatus, aIterator.CompletionStatus()); + ExpectRemainingBytes(aIterator, 0); + ExpectChunkAndByteCount(aIterator, aChunks, aTotalLength); + } + + void CheckIteratorIsComplete(SourceBufferIterator& aIterator, + size_t aTotalLength) { + CheckIteratorIsComplete(aIterator, 1, aTotalLength); + } + + AutoInitializeImageLib mInit; + char mData[9]; + RefPtr mSourceBuffer; + RefPtr mExpectNoResume; + RefPtr mCountResumes; +}; + +TEST_F(ImageSourceBuffer, InitialState) { + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // RemainingBytesIsNoMoreThan() should always return false in the initial + // state, since we can't know the answer until Complete() has been called. + EXPECT_FALSE(iterator.RemainingBytesIsNoMoreThan(0)); + EXPECT_FALSE(iterator.RemainingBytesIsNoMoreThan(SIZE_MAX)); + + // We haven't advanced our iterator at all, so its counters should be zero. + ExpectChunkAndByteCount(iterator, 0, 0); + + // Attempt to advance; we should fail, and end up in the WAITING state. We + // expect no resumes because we don't actually append anything to the + // SourceBuffer in this test. + CheckIteratorMustWait(iterator, mExpectNoResume); +} + +TEST_F(ImageSourceBuffer, ZeroLengthBufferAlwaysFails) { + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // Complete the buffer without writing to it, providing a successful + // completion status. + CheckedCompleteBuffer(iterator, 0); + + // Completing a buffer without writing to it results in an automatic failure; + // make sure that the actual completion status we get from the iterator + // reflects this. + CheckIteratorIsComplete(iterator, 0, 0, NS_ERROR_FAILURE); +} + +TEST_F(ImageSourceBuffer, CompleteSuccess) { + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // Write a single byte to the buffer and complete the buffer. (We have to + // write at least one byte because completing a zero length buffer always + // fails; see the ZeroLengthBufferAlwaysFails test.) + CheckedAppendToBuffer(mData, 1); + CheckedCompleteBuffer(iterator, 1); + + // We should be able to advance once (to read the single byte) and then should + // reach the COMPLETE state with a successful status. + CheckedAdvanceIterator(iterator, 1); + CheckIteratorIsComplete(iterator, 1); +} + +TEST_F(ImageSourceBuffer, CompleteFailure) { + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // Write a single byte to the buffer and complete the buffer. (We have to + // write at least one byte because completing a zero length buffer always + // fails; see the ZeroLengthBufferAlwaysFails test.) + CheckedAppendToBuffer(mData, 1); + CheckedCompleteBuffer(iterator, 1, NS_ERROR_FAILURE); + + // Advance the iterator. Because a failing status is propagated to the + // iterator as soon as it advances, we won't be able to read the single byte + // that we wrote above; we go directly into the COMPLETE state. + CheckIteratorIsComplete(iterator, 0, 0, NS_ERROR_FAILURE); +} + +TEST_F(ImageSourceBuffer, Append) { + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // Write test data to the buffer. + EXPECT_NS_SUCCEEDED(mSourceBuffer->ExpectLength(sizeof(mData))); + CheckedAppendToBuffer(mData, sizeof(mData)); + CheckedCompleteBuffer(iterator, sizeof(mData)); + + // Verify that we can read it back via the iterator, and that the final state + // is what we expect. + CheckedAdvanceIterator(iterator, sizeof(mData)); + CheckIteratorIsComplete(iterator, sizeof(mData)); +} + +TEST_F(ImageSourceBuffer, HugeAppendFails) { + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // We should fail to append anything bigger than what the SurfaceCache can + // hold, so use the SurfaceCache's maximum capacity to calculate what a + // "massive amount of data" (see below) consists of on this platform. + ASSERT_LT(SurfaceCache::MaximumCapacity(), SIZE_MAX); + const size_t hugeSize = SurfaceCache::MaximumCapacity() + 1; + + // Attempt to write a massive amount of data and verify that it fails. (We'd + // get a buffer overrun during the test if it succeeds, but if it succeeds + // that's the least of our problems.) + EXPECT_NS_FAILED(mSourceBuffer->Append(mData, hugeSize)); + EXPECT_TRUE(mSourceBuffer->IsComplete()); + CheckIteratorIsComplete(iterator, 0, 0, NS_ERROR_OUT_OF_MEMORY); +} + +TEST_F(ImageSourceBuffer, AppendFromInputStream) { + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // Construct an input stream with some arbitrary data. (We use test data from + // one of the decoder tests.) + nsCOMPtr inputStream = LoadFile(GreenPNGTestCase().mPath); + ASSERT_TRUE(inputStream != nullptr); + + // Figure out how much data we have. + uint64_t length; + ASSERT_NS_SUCCEEDED(inputStream->Available(&length)); + + // Write test data to the buffer. + EXPECT_TRUE( + NS_SUCCEEDED(mSourceBuffer->AppendFromInputStream(inputStream, length))); + CheckedCompleteBuffer(iterator, length); + + // Verify that the iterator sees the appropriate amount of data. + CheckedAdvanceIteratorStateOnly(iterator, length); + CheckIteratorIsComplete(iterator, length); +} + +TEST_F(ImageSourceBuffer, AppendAfterComplete) { + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // Write test data to the buffer. + EXPECT_NS_SUCCEEDED(mSourceBuffer->ExpectLength(sizeof(mData))); + CheckedAppendToBuffer(mData, sizeof(mData)); + CheckedCompleteBuffer(iterator, sizeof(mData)); + + // Verify that we can read it back via the iterator, and that the final state + // is what we expect. + CheckedAdvanceIterator(iterator, sizeof(mData)); + CheckIteratorIsComplete(iterator, sizeof(mData)); + + // Write more data to the completed buffer. + EXPECT_NS_FAILED(mSourceBuffer->Append(mData, sizeof(mData))); + + // Try to read with a new iterator and verify that the new data got ignored. + SourceBufferIterator iterator2 = mSourceBuffer->Iterator(); + CheckedAdvanceIterator(iterator2, sizeof(mData)); + CheckIteratorIsComplete(iterator2, sizeof(mData)); +} + +TEST_F(ImageSourceBuffer, MinChunkCapacity) { + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // Write test data to the buffer using many small appends. Since + // ExpectLength() isn't being called, we should be able to write up to + // SourceBuffer::MIN_CHUNK_CAPACITY bytes without a second chunk being + // allocated. + CheckedAppendToBufferInChunks(10, SourceBuffer::MIN_CHUNK_CAPACITY); + + // Verify that the iterator sees the appropriate amount of data. + CheckedAdvanceIterator(iterator, SourceBuffer::MIN_CHUNK_CAPACITY); + + // Write one more byte; we expect to see that it triggers an allocation. + CheckedAppendToBufferLastByteForLength(SourceBuffer::MIN_CHUNK_CAPACITY); + CheckedCompleteBuffer(iterator, 1); + + // Verify that the iterator sees the new byte and a new chunk has been + // allocated. + CheckedAdvanceIterator(iterator, 1, 2, SourceBuffer::MIN_CHUNK_CAPACITY + 1); + CheckIteratorIsComplete(iterator, 2, SourceBuffer::MIN_CHUNK_CAPACITY + 1); +} + +TEST_F(ImageSourceBuffer, ExpectLengthAllocatesRequestedCapacity) { + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // Write SourceBuffer::MIN_CHUNK_CAPACITY bytes of test data to the buffer, + // but call ExpectLength() first to make SourceBuffer expect only a single + // byte. We expect this to still result in two chunks, because we trust the + // initial guess of ExpectLength() but after that it will only allocate chunks + // of at least MIN_CHUNK_CAPACITY bytes. + EXPECT_NS_SUCCEEDED(mSourceBuffer->ExpectLength(1)); + CheckedAppendToBufferInChunks(10, SourceBuffer::MIN_CHUNK_CAPACITY); + CheckedCompleteBuffer(iterator, SourceBuffer::MIN_CHUNK_CAPACITY); + + // Verify that the iterator sees a first chunk with 1 byte, and a second chunk + // with the remaining data. + CheckedAdvanceIterator(iterator, 1, 1, 1); + CheckedAdvanceIterator(iterator, SourceBuffer::MIN_CHUNK_CAPACITY - 1, 2, + SourceBuffer::MIN_CHUNK_CAPACITY); + CheckIteratorIsComplete(iterator, 2, SourceBuffer::MIN_CHUNK_CAPACITY); +} + +TEST_F(ImageSourceBuffer, ExpectLengthGrowsAboveMinCapacity) { + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // Write two times SourceBuffer::MIN_CHUNK_CAPACITY bytes of test data to the + // buffer, calling ExpectLength() with the correct length first. We expect + // this to result in only one chunk, because ExpectLength() allows us to + // allocate a larger first chunk than MIN_CHUNK_CAPACITY bytes. + const size_t length = 2 * SourceBuffer::MIN_CHUNK_CAPACITY; + EXPECT_NS_SUCCEEDED(mSourceBuffer->ExpectLength(length)); + CheckedAppendToBufferInChunks(10, length); + + // Verify that the iterator sees a single chunk. + CheckedAdvanceIterator(iterator, length); + + // Write one more byte; we expect to see that it triggers an allocation. + CheckedAppendToBufferLastByteForLength(length); + CheckedCompleteBuffer(iterator, 1); + + // Verify that the iterator sees the new byte and a new chunk has been + // allocated. + CheckedAdvanceIterator(iterator, 1, 2, length + 1); + CheckIteratorIsComplete(iterator, 2, length + 1); +} + +TEST_F(ImageSourceBuffer, HugeExpectLengthFails) { + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // ExpectLength() should fail if the length is bigger than what the + // SurfaceCache can hold, so use the SurfaceCache's maximum capacity to + // calculate what a "massive amount of data" (see below) consists of on this + // platform. + ASSERT_LT(SurfaceCache::MaximumCapacity(), SIZE_MAX); + const size_t hugeSize = SurfaceCache::MaximumCapacity() + 1; + + // Attempt to write a massive amount of data and verify that it fails. (We'd + // get a buffer overrun during the test if it succeeds, but if it succeeds + // that's the least of our problems.) + EXPECT_NS_FAILED(mSourceBuffer->ExpectLength(hugeSize)); + EXPECT_TRUE(mSourceBuffer->IsComplete()); + CheckIteratorIsComplete(iterator, 0, 0, NS_ERROR_INVALID_ARG); +} + +TEST_F(ImageSourceBuffer, LargeAppendsAllocateOnlyOneChunk) { + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // Write two times SourceBuffer::MIN_CHUNK_CAPACITY bytes of test data to the + // buffer in a single Append() call. We expect this to result in only one + // chunk even though ExpectLength() wasn't called, because we should always + // allocate a new chunk large enough to store the data we have at hand. + constexpr size_t length = 2 * SourceBuffer::MIN_CHUNK_CAPACITY; + char data[length]; + GenerateData(data, sizeof(data)); + CheckedAppendToBuffer(data, length); + + // Verify that the iterator sees a single chunk. + CheckedAdvanceIterator(iterator, length); + + // Write one more byte; we expect to see that it triggers an allocation. + CheckedAppendToBufferLastByteForLength(length); + CheckedCompleteBuffer(iterator, 1); + + // Verify that the iterator sees the new byte and a new chunk has been + // allocated. + CheckedAdvanceIterator(iterator, 1, 2, length + 1); + CheckIteratorIsComplete(iterator, 2, length + 1); +} + +TEST_F(ImageSourceBuffer, LargeAppendsAllocateAtMostOneChunk) { + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // Allocate some data we'll use below. + constexpr size_t firstWriteLength = SourceBuffer::MIN_CHUNK_CAPACITY / 2; + constexpr size_t secondWriteLength = 3 * SourceBuffer::MIN_CHUNK_CAPACITY; + constexpr size_t totalLength = firstWriteLength + secondWriteLength; + char data[totalLength]; + GenerateData(data, sizeof(data)); + + // Write half of SourceBuffer::MIN_CHUNK_CAPACITY bytes of test data to the + // buffer in a single Append() call. This should fill half of the first chunk. + CheckedAppendToBuffer(data, firstWriteLength); + + // Write three times SourceBuffer::MIN_CHUNK_CAPACITY bytes of test data to + // the buffer in a single Append() call. We expect this to result in the first + // of the first chunk being filled and a new chunk being allocated for the + // remainder. + CheckedAppendToBuffer(data + firstWriteLength, secondWriteLength); + + // Verify that the iterator sees a MIN_CHUNK_CAPACITY-length chunk. + CheckedAdvanceIterator(iterator, SourceBuffer::MIN_CHUNK_CAPACITY); + + // Verify that the iterator sees a second chunk of the length we expect. + const size_t expectedSecondChunkLength = + totalLength - SourceBuffer::MIN_CHUNK_CAPACITY; + CheckedAdvanceIterator(iterator, expectedSecondChunkLength, 2, totalLength); + + // Write one more byte; we expect to see that it triggers an allocation. + CheckedAppendToBufferLastByteForLength(totalLength); + CheckedCompleteBuffer(iterator, 1); + + // Verify that the iterator sees the new byte and a new chunk has been + // allocated. + CheckedAdvanceIterator(iterator, 1, 3, totalLength + 1); + CheckIteratorIsComplete(iterator, 3, totalLength + 1); +} + +TEST_F(ImageSourceBuffer, OversizedAppendsAllocateAtMostOneChunk) { + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // Allocate some data we'll use below. + constexpr size_t writeLength = SourceBuffer::MAX_CHUNK_CAPACITY + 1; + + // Write SourceBuffer::MAX_CHUNK_CAPACITY + 1 bytes of test data to the + // buffer in a single Append() call. This should cause one chunk to be + // allocated because we wrote it as a single block. + CheckedAppendToBufferInChunks(writeLength, writeLength); + + // Verify that the iterator sees a MAX_CHUNK_CAPACITY+1-length chunk. + CheckedAdvanceIterator(iterator, writeLength); + + CheckedCompleteBuffer(NS_OK); + CheckIteratorIsComplete(iterator, 1, writeLength); +} + +TEST_F(ImageSourceBuffer, CompactionHappensWhenBufferIsComplete) { + constexpr size_t chunkLength = SourceBuffer::MIN_CHUNK_CAPACITY; + constexpr size_t totalLength = 2 * chunkLength; + + // Write enough data to create two chunks. + CheckedAppendToBufferInChunks(chunkLength, totalLength); + + { + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // Verify that the iterator sees two chunks. + CheckedAdvanceIterator(iterator, chunkLength); + CheckedAdvanceIterator(iterator, chunkLength, 2, totalLength); + } + + // Complete the buffer, which should trigger compaction implicitly. + CheckedCompleteBuffer(); + + { + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // Verify that compaction happened and there's now only one chunk. + CheckedAdvanceIterator(iterator, totalLength); + CheckIteratorIsComplete(iterator, 1, totalLength); + } +} + +TEST_F(ImageSourceBuffer, CompactionIsDelayedWhileIteratorsExist) { + constexpr size_t chunkLength = SourceBuffer::MIN_CHUNK_CAPACITY; + constexpr size_t totalLength = 2 * chunkLength; + + { + SourceBufferIterator outerIterator = mSourceBuffer->Iterator(); + + { + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // Write enough data to create two chunks. + CheckedAppendToBufferInChunks(chunkLength, totalLength); + CheckedCompleteBuffer(iterator, totalLength); + + // Verify that the iterator sees two chunks. Since there are live + // iterators, compaction shouldn't have happened when we completed the + // buffer. + CheckedAdvanceIterator(iterator, chunkLength); + CheckedAdvanceIterator(iterator, chunkLength, 2, totalLength); + CheckIteratorIsComplete(iterator, 2, totalLength); + } + + // Now |iterator| has been destroyed, but |outerIterator| still exists, so + // we expect no compaction to have occurred at this point. + CheckedAdvanceIterator(outerIterator, chunkLength); + CheckedAdvanceIterator(outerIterator, chunkLength, 2, totalLength); + CheckIteratorIsComplete(outerIterator, 2, totalLength); + } + + // Now all iterators have been destroyed. Since the buffer was already + // complete, we expect compaction to happen implicitly here. + + { + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // Verify that compaction happened and there's now only one chunk. + CheckedAdvanceIterator(iterator, totalLength); + CheckIteratorIsComplete(iterator, 1, totalLength); + } +} + +TEST_F(ImageSourceBuffer, SourceBufferIteratorsCanBeMoved) { + constexpr size_t chunkLength = SourceBuffer::MIN_CHUNK_CAPACITY; + constexpr size_t totalLength = 2 * chunkLength; + + // Write enough data to create two chunks. We create an iterator here to make + // sure that compaction doesn't happen during the test. + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + CheckedAppendToBufferInChunks(chunkLength, totalLength); + CheckedCompleteBuffer(iterator, totalLength); + + auto GetIterator = [&] { + SourceBufferIterator lambdaIterator = mSourceBuffer->Iterator(); + CheckedAdvanceIterator(lambdaIterator, chunkLength); + return lambdaIterator; + }; + + // Move-construct |movedIterator| from the iterator returned from + // GetIterator() and check that its state is as we expect. + SourceBufferIterator tmpIterator = GetIterator(); + SourceBufferIterator movedIterator(std::move(tmpIterator)); + EXPECT_TRUE(movedIterator.Data()); + EXPECT_EQ(chunkLength, movedIterator.Length()); + ExpectChunkAndByteCount(movedIterator, 1, chunkLength); + + // Make sure that we can advance the iterator. + CheckedAdvanceIterator(movedIterator, chunkLength, 2, totalLength); + + // Make sure that the iterator handles completion properly. + CheckIteratorIsComplete(movedIterator, 2, totalLength); + + // Move-assign |movedIterator| from the iterator returned from + // GetIterator() and check that its state is as we expect. + tmpIterator = GetIterator(); + movedIterator = std::move(tmpIterator); + EXPECT_TRUE(movedIterator.Data()); + EXPECT_EQ(chunkLength, movedIterator.Length()); + ExpectChunkAndByteCount(movedIterator, 1, chunkLength); + + // Make sure that we can advance the iterator. + CheckedAdvanceIterator(movedIterator, chunkLength, 2, totalLength); + + // Make sure that the iterator handles completion properly. + CheckIteratorIsComplete(movedIterator, 2, totalLength); +} + +TEST_F(ImageSourceBuffer, SubchunkAdvance) { + constexpr size_t chunkLength = SourceBuffer::MIN_CHUNK_CAPACITY; + constexpr size_t totalLength = 2 * chunkLength; + + // Write enough data to create two chunks. We create our iterator here to make + // sure that compaction doesn't happen during the test. + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + CheckedAppendToBufferInChunks(chunkLength, totalLength); + CheckedCompleteBuffer(iterator, totalLength); + + // Advance through the first chunk. The chunk count should not increase. + // We check that by always passing 1 for the |aChunks| parameter of + // CheckedAdvanceIteratorStateOnly(). We have to call CheckData() manually + // because the offset calculation in CheckedAdvanceIterator() assumes that + // we're advancing a chunk at a time. + size_t offset = 0; + while (offset < chunkLength) { + CheckedAdvanceIteratorStateOnly(iterator, 1, 1, chunkLength, + AdvanceMode::eAdvanceByLengthExactly); + CheckData(iterator.Data(), offset++, iterator.Length()); + } + + // Read the first byte of the second chunk. This is the point at which we + // can't advance within the same chunk, so the chunk count should increase. We + // check that by passing 2 for the |aChunks| parameter of + // CheckedAdvanceIteratorStateOnly(). + CheckedAdvanceIteratorStateOnly(iterator, 1, 2, totalLength, + AdvanceMode::eAdvanceByLengthExactly); + CheckData(iterator.Data(), offset++, iterator.Length()); + + // Read the rest of the second chunk. The chunk count should not increase. + while (offset < totalLength) { + CheckedAdvanceIteratorStateOnly(iterator, 1, 2, totalLength, + AdvanceMode::eAdvanceByLengthExactly); + CheckData(iterator.Data(), offset++, iterator.Length()); + } + + // Make sure we reached the end. + CheckIteratorIsComplete(iterator, 2, totalLength); +} + +TEST_F(ImageSourceBuffer, SubchunkZeroByteAdvance) { + constexpr size_t chunkLength = SourceBuffer::MIN_CHUNK_CAPACITY; + constexpr size_t totalLength = 2 * chunkLength; + + // Write enough data to create two chunks. We create our iterator here to make + // sure that compaction doesn't happen during the test. + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + CheckedAppendToBufferInChunks(chunkLength, totalLength); + CheckedCompleteBuffer(iterator, totalLength); + + // Make an initial zero-length advance. Although a zero-length advance + // normally won't cause us to read a chunk from the SourceBuffer, we'll do so + // if the iterator is in the initial state to keep the invariant that + // SourceBufferIterator in the READY state always returns a non-null pointer + // from Data(). + CheckedAdvanceIteratorStateOnly(iterator, 0, 1, chunkLength, + AdvanceMode::eAdvanceByLengthExactly); + + // Advance through the first chunk. As in the |SubchunkAdvance| test, the + // chunk count should not increase. We do a zero-length advance after each + // normal advance to ensure that zero-length advances do not change the + // iterator's position or cause a new chunk to be read. + size_t offset = 0; + while (offset < chunkLength) { + CheckedAdvanceIteratorStateOnly(iterator, 1, 1, chunkLength, + AdvanceMode::eAdvanceByLengthExactly); + CheckData(iterator.Data(), offset++, iterator.Length()); + CheckedAdvanceIteratorStateOnly(iterator, 0, 1, chunkLength, + AdvanceMode::eAdvanceByLengthExactly); + } + + // Read the first byte of the second chunk. This is the point at which we + // can't advance within the same chunk, so the chunk count should increase. As + // before, we do a zero-length advance afterward. + CheckedAdvanceIteratorStateOnly(iterator, 1, 2, totalLength, + AdvanceMode::eAdvanceByLengthExactly); + CheckData(iterator.Data(), offset++, iterator.Length()); + CheckedAdvanceIteratorStateOnly(iterator, 0, 2, totalLength, + AdvanceMode::eAdvanceByLengthExactly); + + // Read the rest of the second chunk. The chunk count should not increase. As + // before, we do a zero-length advance after each normal advance. + while (offset < totalLength) { + CheckedAdvanceIteratorStateOnly(iterator, 1, 2, totalLength, + AdvanceMode::eAdvanceByLengthExactly); + CheckData(iterator.Data(), offset++, iterator.Length()); + CheckedAdvanceIteratorStateOnly(iterator, 0, 2, totalLength, + AdvanceMode::eAdvanceByLengthExactly); + } + + // Make sure we reached the end. + CheckIteratorIsComplete(iterator, 2, totalLength); +} + +TEST_F(ImageSourceBuffer, SubchunkZeroByteAdvanceWithNoData) { + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // Check that advancing by zero bytes still makes us enter the WAITING state. + // This is because if we entered the READY state before reading any data at + // all, we'd break the invariant that SourceBufferIterator::Data() always + // returns a non-null pointer in the READY state. + auto state = iterator.AdvanceOrScheduleResume(0, mCountResumes); + EXPECT_EQ(SourceBufferIterator::WAITING, state); + + // Call Complete(). This should trigger a resume. + CheckedCompleteBuffer(); + EXPECT_EQ(1u, mCountResumes->Count()); +} + +TEST_F(ImageSourceBuffer, NullIResumable) { + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // Check that we can't advance. + CheckIteratorMustWait(iterator, nullptr); + + // Append to the buffer, which would cause a resume if we had passed a + // non-null IResumable. + CheckedAppendToBuffer(mData, sizeof(mData)); + CheckedCompleteBuffer(iterator, sizeof(mData)); +} + +TEST_F(ImageSourceBuffer, AppendTriggersResume) { + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // Check that we can't advance. + CheckIteratorMustWait(iterator, mCountResumes); + + // Call Append(). This should trigger a resume. + mSourceBuffer->Append(mData, sizeof(mData)); + EXPECT_EQ(1u, mCountResumes->Count()); +} + +TEST_F(ImageSourceBuffer, OnlyOneResumeTriggeredPerAppend) { + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // Check that we can't advance. + CheckIteratorMustWait(iterator, mCountResumes); + + // Allocate some data we'll use below. + constexpr size_t firstWriteLength = SourceBuffer::MIN_CHUNK_CAPACITY / 2; + constexpr size_t secondWriteLength = 3 * SourceBuffer::MIN_CHUNK_CAPACITY; + constexpr size_t totalLength = firstWriteLength + secondWriteLength; + char data[totalLength]; + GenerateData(data, sizeof(data)); + + // Write half of SourceBuffer::MIN_CHUNK_CAPACITY bytes of test data to the + // buffer in a single Append() call. This should fill half of the first chunk. + // This should trigger a resume. + CheckedAppendToBuffer(data, firstWriteLength); + EXPECT_EQ(1u, mCountResumes->Count()); + + // Advance past the new data and wait again. + CheckedAdvanceIterator(iterator, firstWriteLength); + CheckIteratorMustWait(iterator, mCountResumes); + + // Write three times SourceBuffer::MIN_CHUNK_CAPACITY bytes of test data to + // the buffer in a single Append() call. We expect this to result in the first + // of the first chunk being filled and a new chunk being allocated for the + // remainder. Even though two chunks are getting written to here, only *one* + // resume should get triggered, for a total of two in this test. + CheckedAppendToBuffer(data + firstWriteLength, secondWriteLength); + EXPECT_EQ(2u, mCountResumes->Count()); +} + +TEST_F(ImageSourceBuffer, CompleteTriggersResume) { + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // Check that we can't advance. + CheckIteratorMustWait(iterator, mCountResumes); + + // Call Complete(). This should trigger a resume. + CheckedCompleteBuffer(); + EXPECT_EQ(1u, mCountResumes->Count()); +} + +TEST_F(ImageSourceBuffer, ExpectLengthDoesNotTriggerResume) { + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + + // Check that we can't advance. + CheckIteratorMustWait(iterator, mExpectNoResume); + + // Call ExpectLength(). If this triggers a resume, |mExpectNoResume| will + // ensure that the test fails. + mSourceBuffer->ExpectLength(1000); +} + +TEST_F(ImageSourceBuffer, CompleteSuccessWithSameReadLength) { + SourceBufferIterator iterator = mSourceBuffer->Iterator(1); + + // Write a single byte to the buffer and complete the buffer. (We have to + // write at least one byte because completing a zero length buffer always + // fails; see the ZeroLengthBufferAlwaysFails test.) + CheckedAppendToBuffer(mData, 1); + CheckedCompleteBuffer(iterator, 1); + + // We should be able to advance once (to read the single byte) and then should + // reach the COMPLETE state with a successful status. + CheckedAdvanceIterator(iterator, 1); + CheckIteratorIsComplete(iterator, 1); +} + +TEST_F(ImageSourceBuffer, CompleteSuccessWithSmallerReadLength) { + // Create an iterator limited to one byte. + SourceBufferIterator iterator = mSourceBuffer->Iterator(1); + + // Write two bytes to the buffer and complete the buffer. (We have to + // write at least one byte because completing a zero length buffer always + // fails; see the ZeroLengthBufferAlwaysFails test.) + CheckedAppendToBuffer(mData, 2); + CheckedCompleteBuffer(iterator, 2); + + // We should be able to advance once (to read the single byte) and then should + // reach the COMPLETE state with a successful status, because our iterator is + // limited to a single byte, rather than the full length. + CheckedAdvanceIterator(iterator, 1); + CheckIteratorIsComplete(iterator, 1); +} + +TEST_F(ImageSourceBuffer, CompleteSuccessWithGreaterReadLength) { + // Create an iterator limited to one byte. + SourceBufferIterator iterator = mSourceBuffer->Iterator(2); + + // Write a single byte to the buffer and complete the buffer. (We have to + // write at least one byte because completing a zero length buffer always + // fails; see the ZeroLengthBufferAlwaysFails test.) + CheckedAppendToBuffer(mData, 1); + CheckedCompleteBuffer(iterator, 1); + + // We should be able to advance once (to read the single byte) and then should + // reach the COMPLETE state with a successful status. Our iterator lets us + // read more but the underlying buffer has been completed. + CheckedAdvanceIterator(iterator, 1); + CheckIteratorIsComplete(iterator, 1); +} diff --git a/image/test/gtest/TestStreamingLexer.cpp b/image/test/gtest/TestStreamingLexer.cpp new file mode 100644 index 0000000000..c83569a7b9 --- /dev/null +++ b/image/test/gtest/TestStreamingLexer.cpp @@ -0,0 +1,935 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "gtest/gtest.h" + +#include "Common.h" +#include "mozilla/Vector.h" +#include "StreamingLexer.h" + +using namespace mozilla; +using namespace mozilla::image; + +enum class TestState { + ONE, + TWO, + THREE, + UNBUFFERED, + TRUNCATED_SUCCESS, + TRUNCATED_FAILURE +}; + +void CheckLexedData(const char* aData, size_t aLength, size_t aOffset, + size_t aExpectedLength) { + EXPECT_TRUE(aLength == aExpectedLength); + + for (size_t i = 0; i < aLength; ++i) { + EXPECT_EQ(aData[i], char(aOffset + i + 1)); + } +} + +LexerTransition DoLex(TestState aState, const char* aData, + size_t aLength) { + switch (aState) { + case TestState::ONE: + CheckLexedData(aData, aLength, 0, 3); + return Transition::To(TestState::TWO, 3); + case TestState::TWO: + CheckLexedData(aData, aLength, 3, 3); + return Transition::To(TestState::THREE, 3); + case TestState::THREE: + CheckLexedData(aData, aLength, 6, 3); + return Transition::TerminateSuccess(); + case TestState::TRUNCATED_SUCCESS: + return Transition::TerminateSuccess(); + case TestState::TRUNCATED_FAILURE: + return Transition::TerminateFailure(); + default: + MOZ_CRASH("Unexpected or unhandled TestState"); + } +} + +LexerTransition DoLexWithUnbuffered( + TestState aState, const char* aData, size_t aLength, + Vector& aUnbufferedVector) { + switch (aState) { + case TestState::ONE: + CheckLexedData(aData, aLength, 0, 3); + return Transition::ToUnbuffered(TestState::TWO, TestState::UNBUFFERED, 3); + case TestState::TWO: + CheckLexedData(aUnbufferedVector.begin(), aUnbufferedVector.length(), 3, + 3); + return Transition::To(TestState::THREE, 3); + case TestState::THREE: + CheckLexedData(aData, aLength, 6, 3); + return Transition::TerminateSuccess(); + case TestState::UNBUFFERED: + EXPECT_TRUE(aLength <= 3); + EXPECT_TRUE(aUnbufferedVector.append(aData, aLength)); + return Transition::ContinueUnbuffered(TestState::UNBUFFERED); + default: + MOZ_CRASH("Unexpected or unhandled TestState"); + } +} + +LexerTransition DoLexWithUnbufferedTerminate(TestState aState, + const char* aData, + size_t aLength) { + switch (aState) { + case TestState::ONE: + CheckLexedData(aData, aLength, 0, 3); + return Transition::ToUnbuffered(TestState::TWO, TestState::UNBUFFERED, 3); + case TestState::UNBUFFERED: + return Transition::TerminateSuccess(); + default: + MOZ_CRASH("Unexpected or unhandled TestState"); + } +} + +LexerTransition DoLexWithYield(TestState aState, const char* aData, + size_t aLength) { + switch (aState) { + case TestState::ONE: + CheckLexedData(aData, aLength, 0, 3); + return Transition::ToAfterYield(TestState::TWO); + case TestState::TWO: + CheckLexedData(aData, aLength, 0, 3); + return Transition::To(TestState::THREE, 6); + case TestState::THREE: + CheckLexedData(aData, aLength, 3, 6); + return Transition::TerminateSuccess(); + default: + MOZ_CRASH("Unexpected or unhandled TestState"); + } +} + +LexerTransition DoLexWithTerminateAfterYield(TestState aState, + const char* aData, + size_t aLength) { + switch (aState) { + case TestState::ONE: + CheckLexedData(aData, aLength, 0, 3); + return Transition::ToAfterYield(TestState::TWO); + case TestState::TWO: + return Transition::TerminateSuccess(); + default: + MOZ_CRASH("Unexpected or unhandled TestState"); + } +} + +LexerTransition DoLexWithZeroLengthStates(TestState aState, + const char* aData, + size_t aLength) { + switch (aState) { + case TestState::ONE: + EXPECT_TRUE(aLength == 0); + return Transition::To(TestState::TWO, 0); + case TestState::TWO: + EXPECT_TRUE(aLength == 0); + return Transition::To(TestState::THREE, 9); + case TestState::THREE: + CheckLexedData(aData, aLength, 0, 9); + return Transition::TerminateSuccess(); + default: + MOZ_CRASH("Unexpected or unhandled TestState"); + } +} + +LexerTransition DoLexWithZeroLengthStatesAtEnd(TestState aState, + const char* aData, + size_t aLength) { + switch (aState) { + case TestState::ONE: + CheckLexedData(aData, aLength, 0, 9); + return Transition::To(TestState::TWO, 0); + case TestState::TWO: + EXPECT_TRUE(aLength == 0); + return Transition::To(TestState::THREE, 0); + case TestState::THREE: + EXPECT_TRUE(aLength == 0); + return Transition::TerminateSuccess(); + default: + MOZ_CRASH("Unexpected or unhandled TestState"); + } +} + +LexerTransition DoLexWithZeroLengthYield(TestState aState, + const char* aData, + size_t aLength) { + switch (aState) { + case TestState::ONE: + EXPECT_EQ(0u, aLength); + return Transition::ToAfterYield(TestState::TWO); + case TestState::TWO: + EXPECT_EQ(0u, aLength); + return Transition::To(TestState::THREE, 9); + case TestState::THREE: + CheckLexedData(aData, aLength, 0, 9); + return Transition::TerminateSuccess(); + default: + MOZ_CRASH("Unexpected or unhandled TestState"); + } +} + +LexerTransition DoLexWithZeroLengthStatesUnbuffered( + TestState aState, const char* aData, size_t aLength) { + switch (aState) { + case TestState::ONE: + EXPECT_TRUE(aLength == 0); + return Transition::ToUnbuffered(TestState::TWO, TestState::UNBUFFERED, 0); + case TestState::TWO: + EXPECT_TRUE(aLength == 0); + return Transition::To(TestState::THREE, 9); + case TestState::THREE: + CheckLexedData(aData, aLength, 0, 9); + return Transition::TerminateSuccess(); + case TestState::UNBUFFERED: + ADD_FAILURE() << "Should not enter zero-length unbuffered state"; + return Transition::TerminateFailure(); + default: + MOZ_CRASH("Unexpected or unhandled TestState"); + } +} + +LexerTransition DoLexWithZeroLengthStatesAfterUnbuffered( + TestState aState, const char* aData, size_t aLength) { + switch (aState) { + case TestState::ONE: + EXPECT_TRUE(aLength == 0); + return Transition::ToUnbuffered(TestState::TWO, TestState::UNBUFFERED, 9); + case TestState::TWO: + EXPECT_TRUE(aLength == 0); + return Transition::To(TestState::THREE, 0); + case TestState::THREE: + EXPECT_TRUE(aLength == 0); + return Transition::TerminateSuccess(); + case TestState::UNBUFFERED: + CheckLexedData(aData, aLength, 0, 9); + return Transition::ContinueUnbuffered(TestState::UNBUFFERED); + default: + MOZ_CRASH("Unexpected or unhandled TestState"); + } +} + +class ImageStreamingLexer : public ::testing::Test { + public: + // Note that mLexer is configured to enter TerminalState::FAILURE immediately + // if the input data is truncated. We don't expect that to happen in most + // tests, so we want to detect that issue. If a test needs a different + // behavior, we create a special StreamingLexer just for that test. + ImageStreamingLexer() + : mLexer(Transition::To(TestState::ONE, 3), + Transition::TerminateFailure()), + mSourceBuffer(new SourceBuffer), + mIterator(mSourceBuffer->Iterator()), + mExpectNoResume(new ExpectNoResume), + mCountResumes(new CountResumes) {} + + protected: + void CheckTruncatedState(StreamingLexer& aLexer, + TerminalState aExpectedTerminalState, + nsresult aCompletionStatus = NS_OK) { + for (unsigned i = 0; i < 9; ++i) { + if (i < 2) { + mSourceBuffer->Append(mData + i, 1); + } else if (i == 2) { + mSourceBuffer->Complete(aCompletionStatus); + } + + LexerResult result = aLexer.Lex(mIterator, mCountResumes, DoLex); + + if (i >= 2) { + EXPECT_TRUE(result.is()); + EXPECT_EQ(aExpectedTerminalState, result.as()); + } else { + EXPECT_TRUE(result.is()); + EXPECT_EQ(Yield::NEED_MORE_DATA, result.as()); + } + } + + EXPECT_EQ(2u, mCountResumes->Count()); + } + + AutoInitializeImageLib mInit; + const char mData[9]{1, 2, 3, 4, 5, 6, 7, 8, 9}; + StreamingLexer mLexer; + RefPtr mSourceBuffer; + SourceBufferIterator mIterator; + RefPtr mExpectNoResume; + RefPtr mCountResumes; +}; + +TEST_F(ImageStreamingLexer, ZeroLengthData) { + // Test a zero-length input. + mSourceBuffer->Complete(NS_OK); + + LexerResult result = mLexer.Lex(mIterator, mExpectNoResume, DoLex); + + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::FAILURE, result.as()); +} + +TEST_F(ImageStreamingLexer, ZeroLengthDataUnbuffered) { + // Test a zero-length input. + mSourceBuffer->Complete(NS_OK); + + // Create a special StreamingLexer for this test because we want the first + // state to be unbuffered. + StreamingLexer lexer( + Transition::ToUnbuffered(TestState::ONE, TestState::UNBUFFERED, + sizeof(mData)), + Transition::TerminateFailure()); + + LexerResult result = lexer.Lex(mIterator, mExpectNoResume, DoLex); + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::FAILURE, result.as()); +} + +TEST_F(ImageStreamingLexer, StartWithTerminal) { + // Create a special StreamingLexer for this test because we want the first + // state to be a terminal state. This doesn't really make sense, but we should + // handle it. + StreamingLexer lexer(Transition::TerminateSuccess(), + Transition::TerminateFailure()); + LexerResult result = lexer.Lex(mIterator, mExpectNoResume, DoLex); + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::SUCCESS, result.as()); + + mSourceBuffer->Complete(NS_OK); +} + +TEST_F(ImageStreamingLexer, SingleChunk) { + // Test delivering all the data at once. + mSourceBuffer->Append(mData, sizeof(mData)); + mSourceBuffer->Complete(NS_OK); + + LexerResult result = mLexer.Lex(mIterator, mExpectNoResume, DoLex); + + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::SUCCESS, result.as()); +} + +TEST_F(ImageStreamingLexer, SingleChunkWithUnbuffered) { + Vector unbufferedVector; + + // Test delivering all the data at once. + mSourceBuffer->Append(mData, sizeof(mData)); + mSourceBuffer->Complete(NS_OK); + + LexerResult result = mLexer.Lex( + mIterator, mExpectNoResume, + [&](TestState aState, const char* aData, size_t aLength) { + return DoLexWithUnbuffered(aState, aData, aLength, unbufferedVector); + }); + + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::SUCCESS, result.as()); +} + +TEST_F(ImageStreamingLexer, SingleChunkWithYield) { + // Test delivering all the data at once. + mSourceBuffer->Append(mData, sizeof(mData)); + mSourceBuffer->Complete(NS_OK); + + LexerResult result = mLexer.Lex(mIterator, mExpectNoResume, DoLexWithYield); + ASSERT_TRUE(result.is()); + EXPECT_EQ(Yield::OUTPUT_AVAILABLE, result.as()); + + result = mLexer.Lex(mIterator, mExpectNoResume, DoLexWithYield); + ASSERT_TRUE(result.is()); + EXPECT_EQ(TerminalState::SUCCESS, result.as()); +} + +TEST_F(ImageStreamingLexer, ChunkPerState) { + // Test delivering in perfectly-sized chunks, one per state. + for (unsigned i = 0; i < 3; ++i) { + mSourceBuffer->Append(mData + 3 * i, 3); + LexerResult result = mLexer.Lex(mIterator, mCountResumes, DoLex); + + if (i == 2) { + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::SUCCESS, result.as()); + } else { + EXPECT_TRUE(result.is()); + EXPECT_EQ(Yield::NEED_MORE_DATA, result.as()); + } + } + + EXPECT_EQ(2u, mCountResumes->Count()); + mSourceBuffer->Complete(NS_OK); +} + +TEST_F(ImageStreamingLexer, ChunkPerStateWithUnbuffered) { + Vector unbufferedVector; + + // Test delivering in perfectly-sized chunks, one per state. + for (unsigned i = 0; i < 3; ++i) { + mSourceBuffer->Append(mData + 3 * i, 3); + LexerResult result = mLexer.Lex( + mIterator, mCountResumes, + [&](TestState aState, const char* aData, size_t aLength) { + return DoLexWithUnbuffered(aState, aData, aLength, unbufferedVector); + }); + + if (i == 2) { + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::SUCCESS, result.as()); + } else { + EXPECT_TRUE(result.is()); + EXPECT_EQ(Yield::NEED_MORE_DATA, result.as()); + } + } + + EXPECT_EQ(2u, mCountResumes->Count()); + mSourceBuffer->Complete(NS_OK); +} + +TEST_F(ImageStreamingLexer, ChunkPerStateWithYield) { + // Test delivering in perfectly-sized chunks, one per state. + mSourceBuffer->Append(mData, 3); + LexerResult result = mLexer.Lex(mIterator, mCountResumes, DoLexWithYield); + EXPECT_TRUE(result.is()); + EXPECT_EQ(Yield::OUTPUT_AVAILABLE, result.as()); + + result = mLexer.Lex(mIterator, mCountResumes, DoLexWithYield); + EXPECT_TRUE(result.is()); + EXPECT_EQ(Yield::NEED_MORE_DATA, result.as()); + + mSourceBuffer->Append(mData + 3, 6); + result = mLexer.Lex(mIterator, mCountResumes, DoLexWithYield); + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::SUCCESS, result.as()); + + EXPECT_EQ(1u, mCountResumes->Count()); + mSourceBuffer->Complete(NS_OK); +} + +TEST_F(ImageStreamingLexer, ChunkPerStateWithUnbufferedYield) { + size_t unbufferedCallCount = 0; + Vector unbufferedVector; + auto lexerFunc = [&](TestState aState, const char* aData, + size_t aLength) -> LexerTransition { + switch (aState) { + case TestState::ONE: + CheckLexedData(aData, aLength, 0, 3); + return Transition::ToUnbuffered(TestState::TWO, TestState::UNBUFFERED, + 3); + case TestState::TWO: + CheckLexedData(unbufferedVector.begin(), unbufferedVector.length(), 3, + 3); + return Transition::To(TestState::THREE, 3); + case TestState::THREE: + CheckLexedData(aData, aLength, 6, 3); + return Transition::TerminateSuccess(); + case TestState::UNBUFFERED: + switch (unbufferedCallCount) { + case 0: + CheckLexedData(aData, aLength, 3, 3); + EXPECT_TRUE(unbufferedVector.append(aData, 2)); + unbufferedCallCount++; + + // Continue after yield, telling StreamingLexer we consumed 2 bytes. + return Transition::ContinueUnbufferedAfterYield( + TestState::UNBUFFERED, 2); + + case 1: + CheckLexedData(aData, aLength, 5, 1); + EXPECT_TRUE(unbufferedVector.append(aData, 1)); + unbufferedCallCount++; + + // Continue after yield, telling StreamingLexer we consumed 1 byte. + // We should end up in the TWO state. + return Transition::ContinueUnbuffered(TestState::UNBUFFERED); + } + ADD_FAILURE() << "Too many invocations of TestState::UNBUFFERED"; + return Transition::TerminateFailure(); + default: + MOZ_CRASH("Unexpected or unhandled TestState"); + } + }; + + // Test delivering in perfectly-sized chunks, one per state. + for (unsigned i = 0; i < 3; ++i) { + mSourceBuffer->Append(mData + 3 * i, 3); + LexerResult result = mLexer.Lex(mIterator, mCountResumes, lexerFunc); + + switch (i) { + case 0: + EXPECT_TRUE(result.is()); + EXPECT_EQ(Yield::NEED_MORE_DATA, result.as()); + EXPECT_EQ(0u, unbufferedCallCount); + break; + + case 1: + EXPECT_TRUE(result.is()); + EXPECT_EQ(Yield::OUTPUT_AVAILABLE, result.as()); + EXPECT_EQ(1u, unbufferedCallCount); + + result = mLexer.Lex(mIterator, mCountResumes, lexerFunc); + EXPECT_TRUE(result.is()); + EXPECT_EQ(Yield::NEED_MORE_DATA, result.as()); + EXPECT_EQ(2u, unbufferedCallCount); + break; + + case 2: + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::SUCCESS, result.as()); + break; + } + } + + EXPECT_EQ(2u, mCountResumes->Count()); + mSourceBuffer->Complete(NS_OK); + + LexerResult result = mLexer.Lex(mIterator, mCountResumes, lexerFunc); + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::SUCCESS, result.as()); +} + +TEST_F(ImageStreamingLexer, OneByteChunks) { + // Test delivering in one byte chunks. + for (unsigned i = 0; i < 9; ++i) { + mSourceBuffer->Append(mData + i, 1); + LexerResult result = mLexer.Lex(mIterator, mCountResumes, DoLex); + + if (i == 8) { + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::SUCCESS, result.as()); + } else { + EXPECT_TRUE(result.is()); + EXPECT_EQ(Yield::NEED_MORE_DATA, result.as()); + } + } + + EXPECT_EQ(8u, mCountResumes->Count()); + mSourceBuffer->Complete(NS_OK); +} + +TEST_F(ImageStreamingLexer, OneByteChunksWithUnbuffered) { + Vector unbufferedVector; + + // Test delivering in one byte chunks. + for (unsigned i = 0; i < 9; ++i) { + mSourceBuffer->Append(mData + i, 1); + LexerResult result = mLexer.Lex( + mIterator, mCountResumes, + [&](TestState aState, const char* aData, size_t aLength) { + return DoLexWithUnbuffered(aState, aData, aLength, unbufferedVector); + }); + + if (i == 8) { + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::SUCCESS, result.as()); + } else { + EXPECT_TRUE(result.is()); + EXPECT_EQ(Yield::NEED_MORE_DATA, result.as()); + } + } + + EXPECT_EQ(8u, mCountResumes->Count()); + mSourceBuffer->Complete(NS_OK); +} + +TEST_F(ImageStreamingLexer, OneByteChunksWithYield) { + // Test delivering in one byte chunks. + for (unsigned i = 0; i < 9; ++i) { + mSourceBuffer->Append(mData + i, 1); + LexerResult result = mLexer.Lex(mIterator, mCountResumes, DoLexWithYield); + + switch (i) { + case 2: + EXPECT_TRUE(result.is()); + EXPECT_EQ(Yield::OUTPUT_AVAILABLE, result.as()); + + result = mLexer.Lex(mIterator, mCountResumes, DoLexWithYield); + EXPECT_TRUE(result.is()); + EXPECT_EQ(Yield::NEED_MORE_DATA, result.as()); + break; + + case 8: + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::SUCCESS, result.as()); + break; + + default: + EXPECT_TRUE(i < 9); + EXPECT_TRUE(result.is()); + EXPECT_EQ(Yield::NEED_MORE_DATA, result.as()); + } + } + + EXPECT_EQ(8u, mCountResumes->Count()); + mSourceBuffer->Complete(NS_OK); +} + +TEST_F(ImageStreamingLexer, ZeroLengthState) { + mSourceBuffer->Append(mData, sizeof(mData)); + mSourceBuffer->Complete(NS_OK); + + // Create a special StreamingLexer for this test because we want the first + // state to be zero length. + StreamingLexer lexer(Transition::To(TestState::ONE, 0), + Transition::TerminateFailure()); + + LexerResult result = + lexer.Lex(mIterator, mExpectNoResume, DoLexWithZeroLengthStates); + + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::SUCCESS, result.as()); +} + +TEST_F(ImageStreamingLexer, ZeroLengthStatesAtEnd) { + mSourceBuffer->Append(mData, sizeof(mData)); + mSourceBuffer->Complete(NS_OK); + + // Create a special StreamingLexer for this test because we want the first + // state to consume the full input. + StreamingLexer lexer(Transition::To(TestState::ONE, 9), + Transition::TerminateFailure()); + + LexerResult result = + lexer.Lex(mIterator, mExpectNoResume, DoLexWithZeroLengthStatesAtEnd); + + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::SUCCESS, result.as()); +} + +TEST_F(ImageStreamingLexer, ZeroLengthStateWithYield) { + // Create a special StreamingLexer for this test because we want the first + // state to be zero length. + StreamingLexer lexer(Transition::To(TestState::ONE, 0), + Transition::TerminateFailure()); + + mSourceBuffer->Append(mData, 3); + LexerResult result = + lexer.Lex(mIterator, mExpectNoResume, DoLexWithZeroLengthYield); + ASSERT_TRUE(result.is()); + EXPECT_EQ(Yield::OUTPUT_AVAILABLE, result.as()); + + result = lexer.Lex(mIterator, mCountResumes, DoLexWithZeroLengthYield); + ASSERT_TRUE(result.is()); + EXPECT_EQ(Yield::NEED_MORE_DATA, result.as()); + + mSourceBuffer->Append(mData + 3, sizeof(mData) - 3); + mSourceBuffer->Complete(NS_OK); + result = lexer.Lex(mIterator, mExpectNoResume, DoLexWithZeroLengthYield); + ASSERT_TRUE(result.is()); + EXPECT_EQ(TerminalState::SUCCESS, result.as()); + EXPECT_EQ(1u, mCountResumes->Count()); +} + +TEST_F(ImageStreamingLexer, ZeroLengthStateWithUnbuffered) { + mSourceBuffer->Append(mData, sizeof(mData)); + mSourceBuffer->Complete(NS_OK); + + // Create a special StreamingLexer for this test because we want the first + // state to be both zero length and unbuffered. + StreamingLexer lexer( + Transition::ToUnbuffered(TestState::ONE, TestState::UNBUFFERED, 0), + Transition::TerminateFailure()); + + LexerResult result = lexer.Lex(mIterator, mExpectNoResume, + DoLexWithZeroLengthStatesUnbuffered); + + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::SUCCESS, result.as()); +} + +TEST_F(ImageStreamingLexer, ZeroLengthStateAfterUnbuffered) { + mSourceBuffer->Append(mData, sizeof(mData)); + mSourceBuffer->Complete(NS_OK); + + // Create a special StreamingLexer for this test because we want the first + // state to be zero length. + StreamingLexer lexer(Transition::To(TestState::ONE, 0), + Transition::TerminateFailure()); + + LexerResult result = lexer.Lex(mIterator, mExpectNoResume, + DoLexWithZeroLengthStatesAfterUnbuffered); + + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::SUCCESS, result.as()); +} + +TEST_F(ImageStreamingLexer, ZeroLengthStateWithUnbufferedYield) { + size_t unbufferedCallCount = 0; + auto lexerFunc = [&](TestState aState, const char* aData, + size_t aLength) -> LexerTransition { + switch (aState) { + case TestState::ONE: + EXPECT_EQ(0u, aLength); + return Transition::TerminateSuccess(); + + case TestState::UNBUFFERED: + switch (unbufferedCallCount) { + case 0: + CheckLexedData(aData, aLength, 0, 3); + unbufferedCallCount++; + + // Continue after yield, telling StreamingLexer we consumed 0 bytes. + return Transition::ContinueUnbufferedAfterYield( + TestState::UNBUFFERED, 0); + + case 1: + CheckLexedData(aData, aLength, 0, 3); + unbufferedCallCount++; + + // Continue after yield, telling StreamingLexer we consumed 2 bytes. + return Transition::ContinueUnbufferedAfterYield( + TestState::UNBUFFERED, 2); + + case 2: + EXPECT_EQ(1u, aLength); + CheckLexedData(aData, aLength, 2, 1); + unbufferedCallCount++; + + // Continue after yield, telling StreamingLexer we consumed 1 bytes. + return Transition::ContinueUnbufferedAfterYield( + TestState::UNBUFFERED, 1); + + case 3: + CheckLexedData(aData, aLength, 3, 6); + unbufferedCallCount++; + + // Continue after yield, telling StreamingLexer we consumed 6 bytes. + // We should transition to TestState::ONE when we return from the + // yield. + return Transition::ContinueUnbufferedAfterYield( + TestState::UNBUFFERED, 6); + } + + ADD_FAILURE() << "Too many invocations of TestState::UNBUFFERED"; + return Transition::TerminateFailure(); + + default: + MOZ_CRASH("Unexpected or unhandled TestState"); + } + }; + + // Create a special StreamingLexer for this test because we want the first + // state to be unbuffered. + StreamingLexer lexer( + Transition::ToUnbuffered(TestState::ONE, TestState::UNBUFFERED, + sizeof(mData)), + Transition::TerminateFailure()); + + mSourceBuffer->Append(mData, 3); + LexerResult result = lexer.Lex(mIterator, mExpectNoResume, lexerFunc); + ASSERT_TRUE(result.is()); + EXPECT_EQ(Yield::OUTPUT_AVAILABLE, result.as()); + EXPECT_EQ(1u, unbufferedCallCount); + + result = lexer.Lex(mIterator, mExpectNoResume, lexerFunc); + ASSERT_TRUE(result.is()); + EXPECT_EQ(Yield::OUTPUT_AVAILABLE, result.as()); + EXPECT_EQ(2u, unbufferedCallCount); + + result = lexer.Lex(mIterator, mExpectNoResume, lexerFunc); + ASSERT_TRUE(result.is()); + EXPECT_EQ(Yield::OUTPUT_AVAILABLE, result.as()); + EXPECT_EQ(3u, unbufferedCallCount); + + result = lexer.Lex(mIterator, mCountResumes, lexerFunc); + ASSERT_TRUE(result.is()); + EXPECT_EQ(Yield::NEED_MORE_DATA, result.as()); + EXPECT_EQ(3u, unbufferedCallCount); + + mSourceBuffer->Append(mData + 3, 6); + mSourceBuffer->Complete(NS_OK); + EXPECT_EQ(1u, mCountResumes->Count()); + result = lexer.Lex(mIterator, mExpectNoResume, lexerFunc); + ASSERT_TRUE(result.is()); + EXPECT_EQ(Yield::OUTPUT_AVAILABLE, result.as()); + EXPECT_EQ(4u, unbufferedCallCount); + + result = lexer.Lex(mIterator, mExpectNoResume, lexerFunc); + ASSERT_TRUE(result.is()); + EXPECT_EQ(TerminalState::SUCCESS, result.as()); +} + +TEST_F(ImageStreamingLexer, TerminateSuccess) { + mSourceBuffer->Append(mData, sizeof(mData)); + mSourceBuffer->Complete(NS_OK); + + // Test that Terminate is "sticky". + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + LexerResult result = + mLexer.Lex(iterator, mExpectNoResume, + [&](TestState aState, const char* aData, size_t aLength) { + EXPECT_TRUE(aState == TestState::ONE); + return Transition::TerminateSuccess(); + }); + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::SUCCESS, result.as()); + + SourceBufferIterator iterator2 = mSourceBuffer->Iterator(); + result = mLexer.Lex(iterator2, mExpectNoResume, + [&](TestState aState, const char* aData, size_t aLength) { + EXPECT_TRUE(false); // Shouldn't get here. + return Transition::TerminateFailure(); + }); + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::SUCCESS, result.as()); +} + +TEST_F(ImageStreamingLexer, TerminateFailure) { + mSourceBuffer->Append(mData, sizeof(mData)); + mSourceBuffer->Complete(NS_OK); + + // Test that Terminate is "sticky". + SourceBufferIterator iterator = mSourceBuffer->Iterator(); + LexerResult result = + mLexer.Lex(iterator, mExpectNoResume, + [&](TestState aState, const char* aData, size_t aLength) { + EXPECT_TRUE(aState == TestState::ONE); + return Transition::TerminateFailure(); + }); + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::FAILURE, result.as()); + + SourceBufferIterator iterator2 = mSourceBuffer->Iterator(); + result = mLexer.Lex(iterator2, mExpectNoResume, + [&](TestState aState, const char* aData, size_t aLength) { + EXPECT_TRUE(false); // Shouldn't get here. + return Transition::TerminateFailure(); + }); + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::FAILURE, result.as()); +} + +TEST_F(ImageStreamingLexer, TerminateUnbuffered) { + // Test that Terminate works during an unbuffered read. + for (unsigned i = 0; i < 9; ++i) { + mSourceBuffer->Append(mData + i, 1); + LexerResult result = + mLexer.Lex(mIterator, mCountResumes, DoLexWithUnbufferedTerminate); + + if (i > 2) { + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::SUCCESS, result.as()); + } else { + EXPECT_TRUE(result.is()); + EXPECT_EQ(Yield::NEED_MORE_DATA, result.as()); + } + } + + // We expect 3 resumes because TestState::ONE consumes 3 bytes and then + // transitions to TestState::UNBUFFERED, which calls TerminateSuccess() as + // soon as it receives a single byte. That's four bytes total, which are + // delivered one at a time, requiring 3 resumes. + EXPECT_EQ(3u, mCountResumes->Count()); + + mSourceBuffer->Complete(NS_OK); +} + +TEST_F(ImageStreamingLexer, TerminateAfterYield) { + // Test that Terminate works after yielding. + for (unsigned i = 0; i < 9; ++i) { + mSourceBuffer->Append(mData + i, 1); + LexerResult result = + mLexer.Lex(mIterator, mCountResumes, DoLexWithTerminateAfterYield); + + if (i > 2) { + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::SUCCESS, result.as()); + } else if (i == 2) { + EXPECT_TRUE(result.is()); + EXPECT_EQ(Yield::OUTPUT_AVAILABLE, result.as()); + } else { + EXPECT_TRUE(result.is()); + EXPECT_EQ(Yield::NEED_MORE_DATA, result.as()); + } + } + + // We expect 2 resumes because TestState::ONE consumes 3 bytes and then + // yields. When the lexer resumes at TestState::TWO, which receives the same 3 + // bytes, TerminateSuccess() gets called immediately. That's three bytes + // total, which are delivered one at a time, requiring 2 resumes. + EXPECT_EQ(2u, mCountResumes->Count()); + + mSourceBuffer->Complete(NS_OK); +} + +TEST_F(ImageStreamingLexer, SourceBufferImmediateComplete) { + // Test calling SourceBuffer::Complete() without appending any data. This + // causes the SourceBuffer to automatically have a failing completion status, + // no matter what you pass, so we expect TerminalState::FAILURE below. + mSourceBuffer->Complete(NS_OK); + + LexerResult result = mLexer.Lex(mIterator, mExpectNoResume, DoLex); + + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::FAILURE, result.as()); +} + +TEST_F(ImageStreamingLexer, SourceBufferTruncatedTerminalStateSuccess) { + // Test that using a terminal state (in this case TerminalState::SUCCESS) as a + // truncated state works. + StreamingLexer lexer(Transition::To(TestState::ONE, 3), + Transition::TerminateSuccess()); + + CheckTruncatedState(lexer, TerminalState::SUCCESS); +} + +TEST_F(ImageStreamingLexer, SourceBufferTruncatedTerminalStateFailure) { + // Test that using a terminal state (in this case TerminalState::FAILURE) as a + // truncated state works. + StreamingLexer lexer(Transition::To(TestState::ONE, 3), + Transition::TerminateFailure()); + + CheckTruncatedState(lexer, TerminalState::FAILURE); +} + +TEST_F(ImageStreamingLexer, SourceBufferTruncatedStateReturningSuccess) { + // Test that a truncated state that returns TerminalState::SUCCESS works. When + // |lexer| discovers that the data is truncated, it invokes the + // TRUNCATED_SUCCESS state, which returns TerminalState::SUCCESS. + // CheckTruncatedState() verifies that this happens. + StreamingLexer lexer( + Transition::To(TestState::ONE, 3), + Transition::To(TestState::TRUNCATED_SUCCESS, 0)); + + CheckTruncatedState(lexer, TerminalState::SUCCESS); +} + +TEST_F(ImageStreamingLexer, SourceBufferTruncatedStateReturningFailure) { + // Test that a truncated state that returns TerminalState::FAILURE works. When + // |lexer| discovers that the data is truncated, it invokes the + // TRUNCATED_FAILURE state, which returns TerminalState::FAILURE. + // CheckTruncatedState() verifies that this happens. + StreamingLexer lexer( + Transition::To(TestState::ONE, 3), + Transition::To(TestState::TRUNCATED_FAILURE, 0)); + + CheckTruncatedState(lexer, TerminalState::FAILURE); +} + +TEST_F(ImageStreamingLexer, SourceBufferTruncatedFailingCompleteStatus) { + // Test that calling SourceBuffer::Complete() with a failing status results in + // an immediate TerminalState::FAILURE result. (Note that |lexer|'s truncated + // state is TerminalState::SUCCESS, so if we ignore the failing status, the + // test will fail.) + StreamingLexer lexer(Transition::To(TestState::ONE, 3), + Transition::TerminateSuccess()); + + CheckTruncatedState(lexer, TerminalState::FAILURE, NS_ERROR_FAILURE); +} + +TEST_F(ImageStreamingLexer, NoSourceBufferResumable) { + // Test delivering in one byte chunks with no IResumable. + for (unsigned i = 0; i < 9; ++i) { + mSourceBuffer->Append(mData + i, 1); + LexerResult result = mLexer.Lex(mIterator, nullptr, DoLex); + + if (i == 8) { + EXPECT_TRUE(result.is()); + EXPECT_EQ(TerminalState::SUCCESS, result.as()); + } else { + EXPECT_TRUE(result.is()); + EXPECT_EQ(Yield::NEED_MORE_DATA, result.as()); + } + } + + mSourceBuffer->Complete(NS_OK); +} diff --git a/image/test/gtest/TestSurfaceCache.cpp b/image/test/gtest/TestSurfaceCache.cpp new file mode 100644 index 0000000000..53193b1a88 --- /dev/null +++ b/image/test/gtest/TestSurfaceCache.cpp @@ -0,0 +1,159 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "gtest/gtest.h" + +#include "Common.h" +#include "imgIContainer.h" +#include "ImageFactory.h" +#include "mozilla/gfx/2D.h" +#include "mozilla/RefPtr.h" +#include "mozilla/StaticPrefs_image.h" +#include "nsIInputStream.h" +#include "nsString.h" +#include "ProgressTracker.h" + +using namespace mozilla; +using namespace mozilla::gfx; +using namespace mozilla::image; + +class ImageSurfaceCache : public ::testing::Test { + protected: + AutoInitializeImageLib mInit; +}; + +TEST_F(ImageSurfaceCache, Factor2) { + ImageTestCase testCase = GreenPNGTestCase(); + + // Create an image. + RefPtr image = ImageFactory::CreateAnonymousImage( + nsDependentCString(testCase.mMimeType)); + ASSERT_TRUE(!image->HasError()); + + nsCOMPtr inputStream = LoadFile(testCase.mPath); + ASSERT_TRUE(inputStream); + + // Figure out how much data we have. + uint64_t length; + nsresult rv = inputStream->Available(&length); + ASSERT_NS_SUCCEEDED(rv); + + // Ensures we meet the threshold for FLAG_SYNC_DECODE_IF_FAST to do sync + // decoding without the implications of FLAG_SYNC_DECODE. + ASSERT_LT(length, + static_cast( + StaticPrefs::image_mem_decode_bytes_at_a_time_AtStartup())); + + // Write the data into the image. + rv = image->OnImageDataAvailable(nullptr, inputStream, 0, + static_cast(length)); + ASSERT_NS_SUCCEEDED(rv); + + // Let the image know we've sent all the data. + rv = image->OnImageDataComplete(nullptr, NS_OK, true); + ASSERT_NS_SUCCEEDED(rv); + + RefPtr tracker = image->GetProgressTracker(); + tracker->SyncNotifyProgress(FLAG_LOAD_COMPLETE); + + const uint32_t whichFrame = imgIContainer::FRAME_CURRENT; + + // FLAG_SYNC_DECODE will make RasterImage::LookupFrame use + // SurfaceCache::Lookup to force an exact match lookup (and potential decode). + const uint32_t exactFlags = imgIContainer::FLAG_HIGH_QUALITY_SCALING | + imgIContainer::FLAG_SYNC_DECODE; + + // If the data stream is small enough, as we assert above, + // FLAG_SYNC_DECODE_IF_FAST will allow us to decode sync, but avoid forcing + // SurfaceCache::Lookup. Instead it will use SurfaceCache::LookupBestMatch. + const uint32_t bestMatchFlags = imgIContainer::FLAG_HIGH_QUALITY_SCALING | + imgIContainer::FLAG_SYNC_DECODE_IF_FAST; + + // We need the default threshold to be enabled (otherwise we should disable + // this test). + int32_t threshold = StaticPrefs::image_cache_factor2_threshold_surfaces(); + ASSERT_TRUE(threshold >= 0); + + // We need to know what the native sizes are, otherwise factor of 2 mode will + // be disabled. + size_t nativeSizes = image->GetNativeSizesLength(); + ASSERT_EQ(nativeSizes, 1u); + + // Threshold is the native size count and the pref threshold added together. + // Make sure the image is big enough that we can simply decrement and divide + // off the size as we please and not hit unexpected duplicates. + int32_t totalThreshold = static_cast(nativeSizes) + threshold; + ASSERT_TRUE(testCase.mSize.width > totalThreshold * 4); + + // Request a bunch of slightly different sizes. We won't trip factor of 2 mode + // in this loop. + IntSize size = testCase.mSize; + for (int32_t i = 0; i <= totalThreshold; ++i) { + RefPtr surf = + image->GetFrameAtSize(size, whichFrame, bestMatchFlags); + ASSERT_TRUE(surf); + EXPECT_EQ(surf->GetSize(), size); + + size.width -= 1; + size.height -= 1; + } + + // Now let's ask for a new size. Despite this being sync, it will return + // the closest factor of 2 size we have and not the requested size. + RefPtr surf = + image->GetFrameAtSize(size, whichFrame, bestMatchFlags); + ASSERT_TRUE(surf); + + EXPECT_EQ(surf->GetSize(), testCase.mSize); + + // Now we should be in factor of 2 mode but unless we trigger a decode no + // pruning of the old sized surfaces should happen. + size = testCase.mSize; + for (int32_t i = 0; i < totalThreshold; ++i) { + RefPtr surf = + image->GetFrameAtSize(size, whichFrame, bestMatchFlags); + ASSERT_TRUE(surf); + EXPECT_EQ(surf->GetSize(), size); + + size.width -= 1; + size.height -= 1; + } + + // Now force an existing surface to be marked as explicit so that it + // won't get freed upon pruning (gets marked in the Lookup). + size.width += 1; + size.height += 1; + surf = image->GetFrameAtSize(size, whichFrame, exactFlags); + ASSERT_TRUE(surf); + EXPECT_EQ(surf->GetSize(), size); + + // Now force a new decode to happen by getting a new factor of 2 size. + size.width = testCase.mSize.width / 2 - 1; + size.height = testCase.mSize.height / 2 - 1; + surf = image->GetFrameAtSize(size, whichFrame, bestMatchFlags); + ASSERT_TRUE(surf); + EXPECT_EQ(surf->GetSize().width, testCase.mSize.width / 2); + EXPECT_EQ(surf->GetSize().height, testCase.mSize.height / 2); + + // The decode above would have forced a pruning to happen, so now if + // we request all of the sizes we used to have decoded, only the explicit + // size should have been kept. + size = testCase.mSize; + for (int32_t i = 0; i < totalThreshold - 1; ++i) { + RefPtr surf = + image->GetFrameAtSize(size, whichFrame, bestMatchFlags); + ASSERT_TRUE(surf); + EXPECT_EQ(surf->GetSize(), testCase.mSize); + + size.width -= 1; + size.height -= 1; + } + + // This lookup finds the surface that already existed that we later marked + // as explicit. It should still exist after pruning. + surf = image->GetFrameAtSize(size, whichFrame, bestMatchFlags); + ASSERT_TRUE(surf); + EXPECT_EQ(surf->GetSize(), size); +} diff --git a/image/test/gtest/TestSurfacePipeIntegration.cpp b/image/test/gtest/TestSurfacePipeIntegration.cpp new file mode 100644 index 0000000000..0843ce3f77 --- /dev/null +++ b/image/test/gtest/TestSurfacePipeIntegration.cpp @@ -0,0 +1,349 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=8 sts=2 et sw=2 tw=80: */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "gtest/gtest.h" + +#include "mozilla/gfx/2D.h" +#include "Common.h" +#include "Decoder.h" +#include "DecoderFactory.h" +#include "SourceBuffer.h" +#include "SurfacePipe.h" + +using namespace mozilla; +using namespace mozilla::gfx; +using namespace mozilla::image; + +namespace mozilla { +namespace image { + +class TestSurfacePipeFactory { + public: + static SurfacePipe SimpleSurfacePipe() { + SurfacePipe pipe; + return pipe; + } + + template + static SurfacePipe SurfacePipeFromPipeline(T&& aPipeline) { + return SurfacePipe{std::move(aPipeline)}; + } + + private: + TestSurfacePipeFactory() {} +}; + +} // namespace image +} // namespace mozilla + +void CheckSurfacePipeMethodResults(SurfacePipe* aPipe, image::Decoder* aDecoder, + const IntRect& aRect = IntRect(0, 0, 100, + 100)) { + // Check that the pipeline ended up in the state we expect. Note that we're + // explicitly testing the SurfacePipe versions of these methods, so we don't + // want to use AssertCorrectPipelineFinalState() here. + EXPECT_TRUE(aPipe->IsSurfaceFinished()); + Maybe invalidRect = aPipe->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isSome()); + EXPECT_EQ(OrientedIntRect(0, 0, 100, 100), invalidRect->mInputSpaceRect); + EXPECT_EQ(OrientedIntRect(0, 0, 100, 100), invalidRect->mOutputSpaceRect); + + // Check the generated image. + CheckGeneratedImage(aDecoder, aRect); + + // Reset and clear the image before the next test. + aPipe->ResetToFirstRow(); + EXPECT_FALSE(aPipe->IsSurfaceFinished()); + invalidRect = aPipe->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isNothing()); + + uint32_t count = 0; + auto result = aPipe->WritePixels([&]() { + ++count; + return AsVariant(BGRAColor::Transparent().AsPixel()); + }); + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(100u * 100u, count); + + EXPECT_TRUE(aPipe->IsSurfaceFinished()); + invalidRect = aPipe->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isSome()); + EXPECT_EQ(OrientedIntRect(0, 0, 100, 100), invalidRect->mInputSpaceRect); + EXPECT_EQ(OrientedIntRect(0, 0, 100, 100), invalidRect->mOutputSpaceRect); + + aPipe->ResetToFirstRow(); + EXPECT_FALSE(aPipe->IsSurfaceFinished()); + invalidRect = aPipe->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isNothing()); +} + +class ImageSurfacePipeIntegration : public ::testing::Test { + protected: + AutoInitializeImageLib mInit; +}; + +TEST_F(ImageSurfacePipeIntegration, SurfacePipe) { + // Test that SurfacePipe objects can be initialized and move constructed. + SurfacePipe pipe = TestSurfacePipeFactory::SimpleSurfacePipe(); + + // Test that SurfacePipe objects can be move assigned. + pipe = TestSurfacePipeFactory::SimpleSurfacePipe(); + + // Test that SurfacePipe objects can be initialized with a pipeline. + RefPtr decoder = CreateTrivialDecoder(); + ASSERT_TRUE(decoder != nullptr); + + auto sink = MakeUnique(); + nsresult rv = sink->Configure( + SurfaceConfig{decoder, IntSize(100, 100), SurfaceFormat::OS_RGBA, false}); + ASSERT_NS_SUCCEEDED(rv); + + pipe = TestSurfacePipeFactory::SurfacePipeFromPipeline(sink); + + // Test that WritePixels() gets passed through to the underlying pipeline. + { + uint32_t count = 0; + auto result = pipe.WritePixels([&]() { + ++count; + return AsVariant(BGRAColor::Green().AsPixel()); + }); + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(100u * 100u, count); + CheckSurfacePipeMethodResults(&pipe, decoder); + } + + // Create a buffer the same size as one row of the surface, containing all + // green pixels. We'll use this for the WriteBuffer() tests. + uint32_t buffer[100]; + for (int i = 0; i < 100; ++i) { + buffer[i] = BGRAColor::Green().AsPixel(); + } + + // Test that WriteBuffer() gets passed through to the underlying pipeline. + { + uint32_t count = 0; + WriteState result = WriteState::NEED_MORE_DATA; + while (result == WriteState::NEED_MORE_DATA) { + result = pipe.WriteBuffer(buffer); + ++count; + } + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(100u, count); + CheckSurfacePipeMethodResults(&pipe, decoder); + } + + // Test that the 3 argument version of WriteBuffer() gets passed through to + // the underlying pipeline. + { + uint32_t count = 0; + WriteState result = WriteState::NEED_MORE_DATA; + while (result == WriteState::NEED_MORE_DATA) { + result = pipe.WriteBuffer(buffer, 0, 100); + ++count; + } + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(100u, count); + CheckSurfacePipeMethodResults(&pipe, decoder); + } + + // Test that WritePixelBlocks() gets passed through to the underlying + // pipeline. + { + uint32_t count = 0; + WriteState result = pipe.WritePixelBlocks( + [&](uint32_t* aBlockStart, int32_t aLength) { + ++count; + EXPECT_EQ(int32_t(100), aLength); + memcpy(aBlockStart, buffer, 100 * sizeof(uint32_t)); + return std::make_tuple(int32_t(100), Maybe()); + }); + + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(100u, count); + CheckSurfacePipeMethodResults(&pipe, decoder); + } + + // Test that WriteEmptyRow() gets passed through to the underlying pipeline. + { + uint32_t count = 0; + WriteState result = WriteState::NEED_MORE_DATA; + while (result == WriteState::NEED_MORE_DATA) { + result = pipe.WriteEmptyRow(); + ++count; + } + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(100u, count); + CheckSurfacePipeMethodResults(&pipe, decoder, IntRect(0, 0, 0, 0)); + } + + // Mark the frame as finished so we don't get an assertion. + RawAccessFrameRef currentFrame = decoder->GetCurrentFrameRef(); + currentFrame->Finish(); +} + +TEST_F(ImageSurfacePipeIntegration, DeinterlaceDownscaleWritePixels) { + RefPtr decoder = CreateTrivialDecoder(); + ASSERT_TRUE(decoder != nullptr); + + auto test = [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 25, 25))); + }; + + WithFilterPipeline( + decoder, test, + DeinterlacingConfig{/* mProgressiveDisplay = */ true}, + DownscalingConfig{IntSize(100, 100), SurfaceFormat::OS_RGBA}, + SurfaceConfig{decoder, IntSize(25, 25), SurfaceFormat::OS_RGBA, false}); +} + +TEST_F(ImageSurfacePipeIntegration, + RemoveFrameRectBottomRightDownscaleWritePixels) { + // This test case uses a frame rect that extends beyond the borders of the + // image to the bottom and to the right. It looks roughly like this (with the + // box made of '#'s representing the frame rect): + // + // +------------+ + // + + + // + +------------+ + // + +############+ + // +------+############+ + // +############+ + // +------------+ + + RefPtr decoder = CreateTrivialDecoder(); + ASSERT_TRUE(decoder != nullptr); + + // Note that aInputWriteRect is 100x50 because RemoveFrameRectFilter ignores + // trailing rows that don't show up in the output. (Leading rows unfortunately + // can't be ignored.) So the action of the pipeline is as follows: + // + // (1) RemoveFrameRectFilter reads a 100x50 region of the input. + // (aInputWriteRect captures this fact.) The remaining 50 rows are ignored + // because they extend off the bottom of the image due to the frame rect's + // (50, 50) offset. The 50 columns on the right also don't end up in the + // output, so ultimately only a 50x50 region in the output contains data + // from the input. The filter's output is not 50x50, though, but 100x100, + // because what RemoveFrameRectFilter does is introduce blank rows or + // columns as necessary to transform an image that needs a frame rect into + // an image that doesn't. + // + // (2) DownscalingFilter reads the output of RemoveFrameRectFilter (100x100) + // and downscales it to 20x20. + // + // (3) The surface owned by SurfaceSink logically has only a 10x10 region + // region in it that's non-blank; this is the downscaled version of the + // 50x50 region discussed in (1). (aOutputWriteRect captures this fact.) + // Some fuzz, as usual, is necessary when dealing with Lanczos + // downscaling. + + auto test = [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 20, 20)), + /* aInputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputWriteRect = */ Some(IntRect(50, 50, 100, 50)), + /* aOutputWriteRect = */ Some(IntRect(10, 10, 10, 10)), + /* aFuzz = */ 0x33); + }; + + WithFilterPipeline( + decoder, test, RemoveFrameRectConfig{IntRect(50, 50, 100, 100)}, + DownscalingConfig{IntSize(100, 100), SurfaceFormat::OS_RGBA}, + SurfaceConfig{decoder, IntSize(20, 20), SurfaceFormat::OS_RGBA, false}); +} + +TEST_F(ImageSurfacePipeIntegration, + RemoveFrameRectTopLeftDownscaleWritePixels) { + // This test case uses a frame rect that extends beyond the borders of the + // image to the top and to the left. It looks roughly like this (with the + // box made of '#'s representing the frame rect): + // + // +------------+ + // +############+ + // +############+------+ + // +############+ + + // +------------+ + + // + + + // +------------+ + + RefPtr decoder = CreateTrivialDecoder(); + ASSERT_TRUE(decoder != nullptr); + + auto test = [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 20, 20)), + /* aInputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputWriteRect = */ Some(IntRect(0, 0, 100, 100)), + /* aOutputWriteRect = */ Some(IntRect(0, 0, 10, 10)), + /* aFuzz = */ 0x21); + }; + + WithFilterPipeline( + decoder, test, RemoveFrameRectConfig{IntRect(-50, -50, 100, 100)}, + DownscalingConfig{IntSize(100, 100), SurfaceFormat::OS_RGBA}, + SurfaceConfig{decoder, IntSize(20, 20), SurfaceFormat::OS_RGBA, false}); +} + +TEST_F(ImageSurfacePipeIntegration, DeinterlaceRemoveFrameRectWritePixels) { + RefPtr decoder = CreateTrivialDecoder(); + ASSERT_TRUE(decoder != nullptr); + + // Note that aInputRect is the full 100x100 size even though + // RemoveFrameRectFilter is part of this pipeline, because deinterlacing + // requires reading every row. + + auto test = [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputWriteRect = */ Some(IntRect(50, 50, 100, 100)), + /* aOutputWriteRect = */ Some(IntRect(50, 50, 50, 50))); + }; + + WithFilterPipeline( + decoder, test, + DeinterlacingConfig{/* mProgressiveDisplay = */ true}, + RemoveFrameRectConfig{IntRect(50, 50, 100, 100)}, + SurfaceConfig{decoder, IntSize(100, 100), SurfaceFormat::OS_RGBA, false}); +} + +TEST_F(ImageSurfacePipeIntegration, + DeinterlaceRemoveFrameRectDownscaleWritePixels) { + RefPtr decoder = CreateTrivialDecoder(); + ASSERT_TRUE(decoder != nullptr); + + auto test = [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckWritePixels(aDecoder, aFilter, + /* aOutputRect = */ Some(IntRect(0, 0, 20, 20)), + /* aInputRect = */ Some(IntRect(0, 0, 100, 100)), + /* aInputWriteRect = */ Some(IntRect(50, 50, 100, 100)), + /* aOutputWriteRect = */ Some(IntRect(10, 10, 10, 10)), + /* aFuzz = */ 33); + }; + + WithFilterPipeline( + decoder, test, + DeinterlacingConfig{/* mProgressiveDisplay = */ true}, + RemoveFrameRectConfig{IntRect(50, 50, 100, 100)}, + DownscalingConfig{IntSize(100, 100), SurfaceFormat::OS_RGBA}, + SurfaceConfig{decoder, IntSize(20, 20), SurfaceFormat::OS_RGBA, false}); +} + +TEST_F(ImageSurfacePipeIntegration, ConfiguringHugeDeinterlacingBufferFails) { + RefPtr decoder = CreateTrivialDecoder(); + ASSERT_TRUE(decoder != nullptr); + + // When DownscalingFilter is used, we may succeed in allocating an output + // surface for huge images, because we only need to store the scaled-down + // version of the image. However, regardless of downscaling, + // DeinterlacingFilter needs to allocate a buffer as large as the size of the + // input. This can cause OOMs on operating systems that allow overcommit. This + // test makes sure that we reject such allocations. + AssertConfiguringPipelineFails( + decoder, DeinterlacingConfig{/* mProgressiveDisplay = */ true}, + DownscalingConfig{IntSize(60000, 60000), SurfaceFormat::OS_RGBA}, + SurfaceConfig{decoder, IntSize(600, 600), SurfaceFormat::OS_RGBA, false}); +} diff --git a/image/test/gtest/TestSurfaceSink.cpp b/image/test/gtest/TestSurfaceSink.cpp new file mode 100644 index 0000000000..b205f00e7f --- /dev/null +++ b/image/test/gtest/TestSurfaceSink.cpp @@ -0,0 +1,982 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=8 sts=2 et sw=2 tw=80: */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "gtest/gtest.h" + +#include "mozilla/gfx/2D.h" +#include "Common.h" +#include "Decoder.h" +#include "DecoderFactory.h" +#include "SourceBuffer.h" +#include "SurfacePipe.h" + +using namespace mozilla; +using namespace mozilla::gfx; +using namespace mozilla::image; + +enum class Orient { NORMAL, FLIP_VERTICALLY }; + +static void InitializeRowBuffer(uint32_t* aBuffer, size_t aSize, + size_t aStartPixel, size_t aEndPixel, + uint32_t aSetPixel) { + uint32_t transparentPixel = BGRAColor::Transparent().AsPixel(); + for (size_t i = 0; i < aStartPixel && i < aSize; ++i) { + aBuffer[i] = transparentPixel; + } + for (size_t i = aStartPixel; i < aEndPixel && i < aSize; ++i) { + aBuffer[i] = aSetPixel; + } + for (size_t i = aEndPixel; i < aSize; ++i) { + aBuffer[i] = transparentPixel; + } +} + +template +void WithSurfaceSink(Func aFunc) { + RefPtr decoder = CreateTrivialDecoder(); + ASSERT_TRUE(decoder != nullptr); + + const bool flipVertically = Orientation == Orient::FLIP_VERTICALLY; + + WithFilterPipeline(decoder, std::forward(aFunc), + SurfaceConfig{decoder, IntSize(100, 100), + SurfaceFormat::OS_RGBA, flipVertically}); +} + +void ResetForNextPass(SurfaceFilter* aSink) { + aSink->ResetToFirstRow(); + EXPECT_FALSE(aSink->IsSurfaceFinished()); + Maybe invalidRect = aSink->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isNothing()); +} + +template +void DoCheckIterativeWrite(SurfaceFilter* aSink, WriteFunc aWriteFunc, + CheckFunc aCheckFunc) { + // Write the buffer to successive rows until every row of the surface + // has been written. + uint32_t row = 0; + WriteState result = WriteState::NEED_MORE_DATA; + while (result == WriteState::NEED_MORE_DATA) { + result = aWriteFunc(row); + ++row; + } + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(100u, row); + + AssertCorrectPipelineFinalState(aSink, IntRect(0, 0, 100, 100), + IntRect(0, 0, 100, 100)); + + // Check that the generated image is correct. + aCheckFunc(); +} + +template +void CheckIterativeWrite(image::Decoder* aDecoder, SurfaceSink* aSink, + const IntRect& aOutputRect, WriteFunc aWriteFunc) { + // Ignore the row passed to WriteFunc, since no callers use it. + auto writeFunc = [&](uint32_t) { return aWriteFunc(); }; + + DoCheckIterativeWrite(aSink, writeFunc, + [&] { CheckGeneratedImage(aDecoder, aOutputRect); }); +} + +TEST(ImageSurfaceSink, SurfaceSinkInitialization) +{ + WithSurfaceSink( + [](image::Decoder* aDecoder, SurfaceSink* aSink) { + // Check initial state. + EXPECT_FALSE(aSink->IsSurfaceFinished()); + Maybe invalidRect = aSink->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isNothing()); + + // Check that the surface is zero-initialized. We verify this by calling + // CheckGeneratedImage() and telling it that we didn't write to the + // surface anyway (i.e., we wrote to the empty rect); it will then + // expect the entire surface to be transparent, which is what it should + // be if it was zero-initialied. + CheckGeneratedImage(aDecoder, IntRect(0, 0, 0, 0)); + }); +} + +TEST(ImageSurfaceSink, SurfaceSinkWritePixels) +{ + WithSurfaceSink( + [](image::Decoder* aDecoder, SurfaceSink* aSink) { + CheckWritePixels(aDecoder, aSink); + }); +} + +TEST(ImageSurfaceSink, SurfaceSinkWritePixelsFinish) +{ + WithSurfaceSink( + [](image::Decoder* aDecoder, SurfaceSink* aSink) { + // Write nothing into the surface; just finish immediately. + uint32_t count = 0; + auto result = aSink->WritePixels([&]() { + count++; + return AsVariant(WriteState::FINISHED); + }); + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(1u, count); + + AssertCorrectPipelineFinalState(aSink, IntRect(0, 0, 100, 100), + IntRect(0, 0, 100, 100)); + + // Attempt to write more and make sure that nothing gets written. + count = 0; + result = aSink->WritePixels([&]() { + count++; + return AsVariant(BGRAColor::Red().AsPixel()); + }); + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(0u, count); + EXPECT_TRUE(aSink->IsSurfaceFinished()); + + // Check that the generated image is correct. + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + EXPECT_TRUE(IsSolidColor(surface, BGRAColor::Transparent())); + }); +} + +TEST(ImageSurfaceSink, SurfaceSinkWritePixelsEarlyExit) +{ + auto checkEarlyExit = [](image::Decoder* aDecoder, SurfaceSink* aSink, + WriteState aState) { + // Write half a row of green pixels and then exit early with |aState|. If + // the lambda keeps getting called, we'll write red pixels, which will cause + // the test to fail. + uint32_t count = 0; + auto result = aSink->WritePixels([&]() -> NextPixel { + if (count == 50) { + return AsVariant(aState); + } + return count++ < 50 ? AsVariant(BGRAColor::Green().AsPixel()) + : AsVariant(BGRAColor::Red().AsPixel()); + }); + + EXPECT_EQ(aState, result); + EXPECT_EQ(50u, count); + CheckGeneratedImage(aDecoder, IntRect(0, 0, 50, 1)); + + if (aState != WriteState::FINISHED) { + // We should still be able to write more at this point. + EXPECT_FALSE(aSink->IsSurfaceFinished()); + + // Verify that we can resume writing. We'll finish up the same row. + count = 0; + result = aSink->WritePixels([&]() -> NextPixel { + if (count == 50) { + return AsVariant(WriteState::NEED_MORE_DATA); + } + ++count; + return AsVariant(BGRAColor::Green().AsPixel()); + }); + + EXPECT_EQ(WriteState::NEED_MORE_DATA, result); + EXPECT_EQ(50u, count); + EXPECT_FALSE(aSink->IsSurfaceFinished()); + CheckGeneratedImage(aDecoder, IntRect(0, 0, 100, 1)); + + return; + } + + // We should've finished the surface at this point. + AssertCorrectPipelineFinalState(aSink, IntRect(0, 0, 100, 100), + IntRect(0, 0, 100, 100)); + + // Attempt to write more and make sure that nothing gets written. + count = 0; + result = aSink->WritePixels([&] { + count++; + return AsVariant(BGRAColor::Red().AsPixel()); + }); + + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(0u, count); + EXPECT_TRUE(aSink->IsSurfaceFinished()); + + // Check that the generated image is still correct. + CheckGeneratedImage(aDecoder, IntRect(0, 0, 50, 1)); + }; + + WithSurfaceSink( + [&](image::Decoder* aDecoder, SurfaceSink* aSink) { + checkEarlyExit(aDecoder, aSink, WriteState::NEED_MORE_DATA); + }); + + WithSurfaceSink( + [&](image::Decoder* aDecoder, SurfaceSink* aSink) { + checkEarlyExit(aDecoder, aSink, WriteState::FAILURE); + }); + + WithSurfaceSink( + [&](image::Decoder* aDecoder, SurfaceSink* aSink) { + checkEarlyExit(aDecoder, aSink, WriteState::FINISHED); + }); +} + +TEST(ImageSurfaceSink, SurfaceSinkWritePixelsToRow) +{ + WithSurfaceSink([](image::Decoder* aDecoder, + SurfaceSink* aSink) { + // Write the first 99 rows of our 100x100 surface and verify that even + // though our lambda will yield pixels forever, only one row is written + // per call to WritePixelsToRow(). + for (int row = 0; row < 99; ++row) { + uint32_t count = 0; + WriteState result = aSink->WritePixelsToRow([&] { + ++count; + return AsVariant(BGRAColor::Green().AsPixel()); + }); + + EXPECT_EQ(WriteState::NEED_MORE_DATA, result); + EXPECT_EQ(100u, count); + EXPECT_FALSE(aSink->IsSurfaceFinished()); + + Maybe invalidRect = aSink->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isSome()); + EXPECT_EQ(OrientedIntRect(0, row, 100, 1), invalidRect->mInputSpaceRect); + EXPECT_EQ(OrientedIntRect(0, row, 100, 1), invalidRect->mOutputSpaceRect); + + CheckGeneratedImage(aDecoder, IntRect(0, 0, 100, row + 1)); + } + + // Write the final line, which should finish the surface. + uint32_t count = 0; + WriteState result = aSink->WritePixelsToRow([&] { + ++count; + return AsVariant(BGRAColor::Green().AsPixel()); + }); + + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(100u, count); + + // Note that the final invalid rect we expect here is only the last row; + // that's because we called TakeInvalidRect() repeatedly in the loop + // above. + AssertCorrectPipelineFinalState(aSink, IntRect(0, 99, 100, 1), + IntRect(0, 99, 100, 1)); + + // Check that the generated image is correct. + CheckGeneratedImage(aDecoder, IntRect(0, 0, 100, 100)); + + // Attempt to write more and make sure that nothing gets written. + count = 0; + result = aSink->WritePixelsToRow([&] { + count++; + return AsVariant(BGRAColor::Red().AsPixel()); + }); + + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(0u, count); + EXPECT_TRUE(aSink->IsSurfaceFinished()); + + // Check that the generated image is still correct. + CheckGeneratedImage(aDecoder, IntRect(0, 0, 100, 100)); + }); +} + +TEST(ImageSurfaceSink, SurfaceSinkWritePixelsToRowEarlyExit) +{ + auto checkEarlyExit = [](image::Decoder* aDecoder, SurfaceSink* aSink, + WriteState aState) { + // Write half a row of green pixels and then exit early with |aState|. If + // the lambda keeps getting called, we'll write red pixels, which will cause + // the test to fail. + uint32_t count = 0; + auto result = + aSink->WritePixelsToRow([&]() -> NextPixel { + if (count == 50) { + return AsVariant(aState); + } + return count++ < 50 ? AsVariant(BGRAColor::Green().AsPixel()) + : AsVariant(BGRAColor::Red().AsPixel()); + }); + + EXPECT_EQ(aState, result); + EXPECT_EQ(50u, count); + CheckGeneratedImage(aDecoder, IntRect(0, 0, 50, 1)); + + if (aState != WriteState::FINISHED) { + // We should still be able to write more at this point. + EXPECT_FALSE(aSink->IsSurfaceFinished()); + + // Verify that we can resume the same row and still stop at the end. + count = 0; + WriteState result = aSink->WritePixelsToRow([&] { + ++count; + return AsVariant(BGRAColor::Green().AsPixel()); + }); + + EXPECT_EQ(WriteState::NEED_MORE_DATA, result); + EXPECT_EQ(50u, count); + EXPECT_FALSE(aSink->IsSurfaceFinished()); + CheckGeneratedImage(aDecoder, IntRect(0, 0, 100, 1)); + + return; + } + + // We should've finished the surface at this point. + AssertCorrectPipelineFinalState(aSink, IntRect(0, 0, 100, 100), + IntRect(0, 0, 100, 100)); + + // Attempt to write more and make sure that nothing gets written. + count = 0; + result = aSink->WritePixelsToRow([&] { + count++; + return AsVariant(BGRAColor::Red().AsPixel()); + }); + + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(0u, count); + EXPECT_TRUE(aSink->IsSurfaceFinished()); + + // Check that the generated image is still correct. + CheckGeneratedImage(aDecoder, IntRect(0, 0, 50, 1)); + }; + + WithSurfaceSink( + [&](image::Decoder* aDecoder, SurfaceSink* aSink) { + checkEarlyExit(aDecoder, aSink, WriteState::NEED_MORE_DATA); + }); + + WithSurfaceSink( + [&](image::Decoder* aDecoder, SurfaceSink* aSink) { + checkEarlyExit(aDecoder, aSink, WriteState::FAILURE); + }); + + WithSurfaceSink( + [&](image::Decoder* aDecoder, SurfaceSink* aSink) { + checkEarlyExit(aDecoder, aSink, WriteState::FINISHED); + }); +} + +TEST(ImageSurfaceSink, SurfaceSinkWriteBuffer) +{ + WithSurfaceSink( + [](image::Decoder* aDecoder, SurfaceSink* aSink) { + // Create a green buffer the same size as one row of the surface (which + // is 100x100), containing 60 pixels of green in the middle and 20 + // transparent pixels on either side. + uint32_t buffer[100]; + InitializeRowBuffer(buffer, 100, 20, 80, BGRAColor::Green().AsPixel()); + + // Write the buffer to every row of the surface and check that the + // generated image is correct. + CheckIterativeWrite(aDecoder, aSink, IntRect(20, 0, 60, 100), + [&] { return aSink->WriteBuffer(buffer); }); + }); +} + +TEST(ImageSurfaceSink, SurfaceSinkWriteBufferPartialRow) +{ + WithSurfaceSink( + [](image::Decoder* aDecoder, SurfaceSink* aSink) { + // Create a buffer the same size as one row of the surface, containing + // all green pixels. + uint32_t buffer[100]; + for (int i = 0; i < 100; ++i) { + buffer[i] = BGRAColor::Green().AsPixel(); + } + + // Write the buffer to the middle 60 pixels of every row of the surface + // and check that the generated image is correct. + CheckIterativeWrite(aDecoder, aSink, IntRect(20, 0, 60, 100), + [&] { return aSink->WriteBuffer(buffer, 20, 60); }); + }); +} + +TEST(ImageSurfaceSink, SurfaceSinkWriteBufferPartialRowStartColOverflow) +{ + WithSurfaceSink([](image::Decoder* aDecoder, + SurfaceSink* aSink) { + // Create a buffer the same size as one row of the surface, containing all + // green pixels. + uint32_t buffer[100]; + for (int i = 0; i < 100; ++i) { + buffer[i] = BGRAColor::Green().AsPixel(); + } + + { + // Write the buffer to successive rows until every row of the surface + // has been written. We place the start column beyond the end of the row, + // which will prevent us from writing anything, so we check that the + // generated image is entirely transparent. + CheckIterativeWrite(aDecoder, aSink, IntRect(0, 0, 0, 0), + [&] { return aSink->WriteBuffer(buffer, 100, 100); }); + } + + ResetForNextPass(aSink); + + { + // Write the buffer to successive rows until every row of the surface + // has been written. We use column 50 as the start column, but we still + // write the buffer, which means we overflow the right edge of the surface + // by 50 pixels. We check that the left half of the generated image is + // transparent and the right half is green. + CheckIterativeWrite(aDecoder, aSink, IntRect(50, 0, 50, 100), + [&] { return aSink->WriteBuffer(buffer, 50, 100); }); + } + }); +} + +TEST(ImageSurfaceSink, SurfaceSinkWriteBufferPartialRowBufferOverflow) +{ + WithSurfaceSink([](image::Decoder* aDecoder, + SurfaceSink* aSink) { + // Create a buffer twice as large as a row of the surface. The first half + // (which is as large as a row of the image) will contain green pixels, + // while the second half will contain red pixels. + uint32_t buffer[200]; + for (int i = 0; i < 200; ++i) { + buffer[i] = + i < 100 ? BGRAColor::Green().AsPixel() : BGRAColor::Red().AsPixel(); + } + + { + // Write the buffer to successive rows until every row of the surface has + // been written. The buffer extends 100 pixels to the right of a row of + // the surface, but bounds checking will prevent us from overflowing the + // buffer. We check that the generated image is entirely green since the + // pixels on the right side of the buffer shouldn't have been written to + // the surface. + CheckIterativeWrite(aDecoder, aSink, IntRect(0, 0, 100, 100), + [&] { return aSink->WriteBuffer(buffer, 0, 200); }); + } + + ResetForNextPass(aSink); + + { + // Write from the buffer to the middle of each row of the surface. That + // means that the left side of each row should be transparent, since we + // didn't write anything there. A buffer overflow would cause us to write + // buffer contents into the left side of each row. We check that the + // generated image is transparent on the left side and green on the right. + CheckIterativeWrite(aDecoder, aSink, IntRect(50, 0, 50, 100), + [&] { return aSink->WriteBuffer(buffer, 50, 200); }); + } + }); +} + +TEST(ImageSurfaceSink, SurfaceSinkWriteBufferFromNullSource) +{ + WithSurfaceSink( + [](image::Decoder* aDecoder, SurfaceSink* aSink) { + // Calling WriteBuffer() with a null pointer should fail without making + // any changes to the surface. + uint32_t* nullBuffer = nullptr; + WriteState result = aSink->WriteBuffer(nullBuffer); + + EXPECT_EQ(WriteState::FAILURE, result); + EXPECT_FALSE(aSink->IsSurfaceFinished()); + Maybe invalidRect = aSink->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isNothing()); + + // Check that nothing got written to the surface. + CheckGeneratedImage(aDecoder, IntRect(0, 0, 0, 0)); + }); +} + +TEST(ImageSurfaceSink, SurfaceSinkWriteEmptyRow) +{ + WithSurfaceSink([](image::Decoder* aDecoder, + SurfaceSink* aSink) { + { + // Write an empty row to each row of the surface. We check that the + // generated image is entirely transparent. + CheckIterativeWrite(aDecoder, aSink, IntRect(0, 0, 0, 0), + [&] { return aSink->WriteEmptyRow(); }); + } + + ResetForNextPass(aSink); + + { + // Write a partial row before we begin calling WriteEmptyRow(). We check + // that the generated image is entirely transparent, which is to be + // expected since WriteEmptyRow() overwrites the current row even if some + // data has already been written to it. + uint32_t count = 0; + auto result = aSink->WritePixels([&]() -> NextPixel { + if (count == 50) { + return AsVariant(WriteState::NEED_MORE_DATA); + } + ++count; + return AsVariant(BGRAColor::Green().AsPixel()); + }); + + EXPECT_EQ(WriteState::NEED_MORE_DATA, result); + EXPECT_EQ(50u, count); + EXPECT_FALSE(aSink->IsSurfaceFinished()); + + CheckIterativeWrite(aDecoder, aSink, IntRect(0, 0, 0, 0), + [&] { return aSink->WriteEmptyRow(); }); + } + + ResetForNextPass(aSink); + + { + // Create a buffer the same size as one row of the surface, containing all + // green pixels. + uint32_t buffer[100]; + for (int i = 0; i < 100; ++i) { + buffer[i] = BGRAColor::Green().AsPixel(); + } + + // Write an empty row to the middle 60 rows of the surface. The first 20 + // and last 20 rows will be green. (We need to use DoCheckIterativeWrite() + // here because we need a custom function to check the output, since it + // can't be described by a simple rect.) + auto writeFunc = [&](uint32_t aRow) { + if (aRow < 20 || aRow >= 80) { + return aSink->WriteBuffer(buffer); + } else { + return aSink->WriteEmptyRow(); + } + }; + + auto checkFunc = [&] { + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + + EXPECT_TRUE(RowsAreSolidColor(surface, 0, 20, BGRAColor::Green())); + EXPECT_TRUE( + RowsAreSolidColor(surface, 20, 60, BGRAColor::Transparent())); + EXPECT_TRUE(RowsAreSolidColor(surface, 80, 20, BGRAColor::Green())); + }; + + DoCheckIterativeWrite(aSink, writeFunc, checkFunc); + } + }); +} + +TEST(ImageSurfaceSink, SurfaceSinkWriteUnsafeComputedRow) +{ + WithSurfaceSink( + [](image::Decoder* aDecoder, SurfaceSink* aSink) { + // Create a green buffer the same size as one row of the surface. + uint32_t buffer[100]; + for (int i = 0; i < 100; ++i) { + buffer[i] = BGRAColor::Green().AsPixel(); + } + + // Write the buffer to successive rows until every row of the surface + // has been written. We only write to the right half of each row, so we + // check that the left side of the generated image is transparent and + // the right side is green. + CheckIterativeWrite(aDecoder, aSink, IntRect(50, 0, 50, 100), [&] { + return aSink->WriteUnsafeComputedRow( + [&](uint32_t* aRow, uint32_t aLength) { + EXPECT_EQ(100u, aLength); + memcpy(aRow + 50, buffer, 50 * sizeof(uint32_t)); + }); + }); + }); +} + +TEST(ImageSurfaceSink, SurfaceSinkWritePixelBlocks) +{ + WithSurfaceSink( + [](image::Decoder* aDecoder, SurfaceSink* aSink) { + // Create a green buffer the same size as one row of the surface (which + // is 100x100), containing 60 pixels of green in the middle and 20 + // transparent pixels on either side. + uint32_t buffer[100]; + InitializeRowBuffer(buffer, 100, 20, 80, BGRAColor::Green().AsPixel()); + + uint32_t count = 0; + WriteState result = aSink->WritePixelBlocks( + [&](uint32_t* aBlockStart, int32_t aLength) { + ++count; + EXPECT_EQ(int32_t(100), aLength); + memcpy(aBlockStart, buffer, 100 * sizeof(uint32_t)); + return std::make_tuple(int32_t(100), Maybe()); + }); + + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(100u, count); + + AssertCorrectPipelineFinalState(aSink, IntRect(0, 0, 100, 100), + IntRect(0, 0, 100, 100)); + + // Check that the generated image is correct. + CheckGeneratedImage(aDecoder, IntRect(20, 0, 60, 100)); + + // Attempt to write more and make sure that nothing gets written. + count = 0; + result = aSink->WritePixelBlocks( + [&](uint32_t* aBlockStart, int32_t aLength) { + count++; + for (int32_t i = 0; i < aLength; ++i) { + aBlockStart[i] = BGRAColor::Red().AsPixel(); + } + return std::make_tuple(aLength, Maybe()); + }); + + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(0u, count); + EXPECT_TRUE(aSink->IsSurfaceFinished()); + + // Check that the generated image is still correct. + CheckGeneratedImage(aDecoder, IntRect(20, 0, 60, 100)); + }); +} + +TEST(ImageSurfaceSink, SurfaceSinkWritePixelBlocksPartialRow) +{ + WithSurfaceSink([](image::Decoder* aDecoder, + SurfaceSink* aSink) { + // Create a green buffer the same size as one row of the surface (which is + // 100x100), containing 60 pixels of green in the middle and 20 transparent + // pixels on either side. + uint32_t buffer[100]; + InitializeRowBuffer(buffer, 100, 20, 80, BGRAColor::Green().AsPixel()); + + // Write the first 99 rows of our 100x100 surface and verify that even + // though our lambda will yield pixels forever, only one row is written per + // call to WritePixelsToRow(). + for (int row = 0; row < 99; ++row) { + for (int32_t written = 0; written < 100;) { + WriteState result = aSink->WritePixelBlocks( + [&](uint32_t* aBlockStart, int32_t aLength) { + // When we write the final block of pixels, it will request we + // start another row. We should abort at that point. + if (aLength == int32_t(100) && written == int32_t(100)) { + return std::make_tuple(int32_t(0), + Some(WriteState::NEED_MORE_DATA)); + } + + // It should always request enough data to fill the row. So it + // should request 100, 75, 50, and finally 25 pixels. + EXPECT_EQ(int32_t(100) - written, aLength); + + // Only write one quarter of the pixels for the row. + memcpy(aBlockStart, &buffer[written], 25 * sizeof(uint32_t)); + written += 25; + + // We've written the last pixels remaining for the row. + if (written == int32_t(100)) { + return std::make_tuple(int32_t(25), Maybe()); + } + + // We've written another quarter of the row but not yet all of it. + return std::make_tuple(int32_t(25), + Some(WriteState::NEED_MORE_DATA)); + }); + + EXPECT_EQ(WriteState::NEED_MORE_DATA, result); + } + + EXPECT_FALSE(aSink->IsSurfaceFinished()); + + Maybe invalidRect = aSink->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isSome()); + EXPECT_EQ(OrientedIntRect(0, row, 100, 1), invalidRect->mInputSpaceRect); + EXPECT_EQ(OrientedIntRect(0, row, 100, 1), invalidRect->mOutputSpaceRect); + + CheckGeneratedImage(aDecoder, IntRect(20, 0, 60, row + 1)); + } + + // Write the final line, which should finish the surface. + uint32_t count = 0; + WriteState result = aSink->WritePixelBlocks( + [&](uint32_t* aBlockStart, int32_t aLength) { + ++count; + EXPECT_EQ(int32_t(100), aLength); + memcpy(aBlockStart, buffer, 100 * sizeof(uint32_t)); + return std::make_tuple(int32_t(100), Maybe()); + }); + + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(1u, count); + + // Note that the final invalid rect we expect here is only the last row; + // that's because we called TakeInvalidRect() repeatedly in the loop above. + AssertCorrectPipelineFinalState(aSink, IntRect(0, 99, 100, 1), + IntRect(0, 99, 100, 1)); + + // Check that the generated image is correct. + CheckGeneratedImage(aDecoder, IntRect(20, 0, 60, 100)); + + // Attempt to write more and make sure that nothing gets written. + count = 0; + result = aSink->WritePixelBlocks( + [&](uint32_t* aBlockStart, int32_t aLength) { + count++; + for (int32_t i = 0; i < aLength; ++i) { + aBlockStart[i] = BGRAColor::Red().AsPixel(); + } + return std::make_tuple(aLength, Maybe()); + }); + + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(0u, count); + EXPECT_TRUE(aSink->IsSurfaceFinished()); + + // Check that the generated image is still correct. + CheckGeneratedImage(aDecoder, IntRect(20, 0, 60, 100)); + }); +} + +TEST(ImageSurfaceSink, SurfaceSinkProgressivePasses) +{ + WithSurfaceSink( + [](image::Decoder* aDecoder, SurfaceSink* aSink) { + { + // Fill the image with a first pass of red. + uint32_t count = 0; + auto result = aSink->WritePixels([&]() { + ++count; + return AsVariant(BGRAColor::Red().AsPixel()); + }); + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(100u * 100u, count); + + AssertCorrectPipelineFinalState(aSink, IntRect(0, 0, 100, 100), + IntRect(0, 0, 100, 100)); + + // Check that the generated image is correct. + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + EXPECT_TRUE(IsSolidColor(surface, BGRAColor::Red())); + } + + { + ResetForNextPass(aSink); + + // Check that the generated image is still the first pass image. + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + EXPECT_TRUE(IsSolidColor(surface, BGRAColor::Red())); + } + + { + // Fill the image with a second pass of green. + uint32_t count = 0; + auto result = aSink->WritePixels([&]() { + ++count; + return AsVariant(BGRAColor::Green().AsPixel()); + }); + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(100u * 100u, count); + + AssertCorrectPipelineFinalState(aSink, IntRect(0, 0, 100, 100), + IntRect(0, 0, 100, 100)); + + // Check that the generated image is correct. + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + EXPECT_TRUE(IsSolidColor(surface, BGRAColor::Green())); + } + }); +} + +TEST(ImageSurfaceSink, SurfaceSinkInvalidRect) +{ + WithSurfaceSink([](image::Decoder* aDecoder, + SurfaceSink* aSink) { + { + // Write one row. + uint32_t count = 0; + auto result = aSink->WritePixels([&]() -> NextPixel { + if (count == 100) { + return AsVariant(WriteState::NEED_MORE_DATA); + } + count++; + return AsVariant(BGRAColor::Green().AsPixel()); + }); + EXPECT_EQ(WriteState::NEED_MORE_DATA, result); + EXPECT_EQ(100u, count); + EXPECT_FALSE(aSink->IsSurfaceFinished()); + + // Assert that we have the right invalid rect. + Maybe invalidRect = aSink->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isSome()); + EXPECT_EQ(OrientedIntRect(0, 0, 100, 1), invalidRect->mInputSpaceRect); + EXPECT_EQ(OrientedIntRect(0, 0, 100, 1), invalidRect->mOutputSpaceRect); + } + + { + // Write eight rows. + uint32_t count = 0; + auto result = aSink->WritePixels([&]() -> NextPixel { + if (count == 100 * 8) { + return AsVariant(WriteState::NEED_MORE_DATA); + } + count++; + return AsVariant(BGRAColor::Green().AsPixel()); + }); + EXPECT_EQ(WriteState::NEED_MORE_DATA, result); + EXPECT_EQ(100u * 8u, count); + EXPECT_FALSE(aSink->IsSurfaceFinished()); + + // Assert that we have the right invalid rect. + Maybe invalidRect = aSink->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isSome()); + EXPECT_EQ(OrientedIntRect(0, 1, 100, 8), invalidRect->mInputSpaceRect); + EXPECT_EQ(OrientedIntRect(0, 1, 100, 8), invalidRect->mOutputSpaceRect); + } + + { + // Write the left half of one row. + uint32_t count = 0; + auto result = aSink->WritePixels([&]() -> NextPixel { + if (count == 50) { + return AsVariant(WriteState::NEED_MORE_DATA); + } + count++; + return AsVariant(BGRAColor::Green().AsPixel()); + }); + EXPECT_EQ(WriteState::NEED_MORE_DATA, result); + EXPECT_EQ(50u, count); + EXPECT_FALSE(aSink->IsSurfaceFinished()); + + // Assert that we don't have an invalid rect, since the invalid rect only + // gets updated when a row gets completed. + Maybe invalidRect = aSink->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isNothing()); + } + + { + // Write the right half of the same row. + uint32_t count = 0; + auto result = aSink->WritePixels([&]() -> NextPixel { + if (count == 50) { + return AsVariant(WriteState::NEED_MORE_DATA); + } + count++; + return AsVariant(BGRAColor::Green().AsPixel()); + }); + EXPECT_EQ(WriteState::NEED_MORE_DATA, result); + EXPECT_EQ(50u, count); + EXPECT_FALSE(aSink->IsSurfaceFinished()); + + // Assert that we have the right invalid rect, which will include both the + // left and right halves of this row now that we've completed it. + Maybe invalidRect = aSink->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isSome()); + EXPECT_EQ(OrientedIntRect(0, 9, 100, 1), invalidRect->mInputSpaceRect); + EXPECT_EQ(OrientedIntRect(0, 9, 100, 1), invalidRect->mOutputSpaceRect); + } + + { + // Write no rows. + auto result = aSink->WritePixels( + [&]() { return AsVariant(WriteState::NEED_MORE_DATA); }); + EXPECT_EQ(WriteState::NEED_MORE_DATA, result); + EXPECT_FALSE(aSink->IsSurfaceFinished()); + + // Assert that we don't have an invalid rect. + Maybe invalidRect = aSink->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isNothing()); + } + + { + // Fill the rest of the image. + uint32_t count = 0; + auto result = aSink->WritePixels([&]() { + count++; + return AsVariant(BGRAColor::Green().AsPixel()); + }); + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(100u * 90u, count); + EXPECT_TRUE(aSink->IsSurfaceFinished()); + + // Assert that we have the right invalid rect. + Maybe invalidRect = aSink->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isSome()); + EXPECT_EQ(OrientedIntRect(0, 10, 100, 90), invalidRect->mInputSpaceRect); + EXPECT_EQ(OrientedIntRect(0, 10, 100, 90), invalidRect->mOutputSpaceRect); + + // Check that the generated image is correct. + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + EXPECT_TRUE(IsSolidColor(surface, BGRAColor::Green())); + } + }); +} + +TEST(ImageSurfaceSink, SurfaceSinkFlipVertically) +{ + WithSurfaceSink([](image::Decoder* aDecoder, + SurfaceSink* aSink) { + { + // Fill the image with a first pass of red. + uint32_t count = 0; + auto result = aSink->WritePixels([&]() { + ++count; + return AsVariant(BGRAColor::Red().AsPixel()); + }); + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(100u * 100u, count); + + AssertCorrectPipelineFinalState(aSink, IntRect(0, 0, 100, 100), + IntRect(0, 0, 100, 100)); + + // Check that the generated image is correct. + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + EXPECT_TRUE(IsSolidColor(surface, BGRAColor::Red())); + } + + { + ResetForNextPass(aSink); + + // Check that the generated image is still the first pass image. + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + EXPECT_TRUE(IsSolidColor(surface, BGRAColor::Red())); + } + + { + // Fill 25 rows of the image with green and make sure everything is OK. + uint32_t count = 0; + auto result = aSink->WritePixels([&]() -> NextPixel { + if (count == 25 * 100) { + return AsVariant(WriteState::NEED_MORE_DATA); + } + count++; + return AsVariant(BGRAColor::Green().AsPixel()); + }); + EXPECT_EQ(WriteState::NEED_MORE_DATA, result); + EXPECT_EQ(25u * 100u, count); + EXPECT_FALSE(aSink->IsSurfaceFinished()); + + // Assert that we have the right invalid rect, which should include the + // *bottom* (since we're flipping vertically) 25 rows of the image. + Maybe invalidRect = aSink->TakeInvalidRect(); + EXPECT_TRUE(invalidRect.isSome()); + EXPECT_EQ(OrientedIntRect(0, 75, 100, 25), invalidRect->mInputSpaceRect); + EXPECT_EQ(OrientedIntRect(0, 75, 100, 25), invalidRect->mOutputSpaceRect); + + // Check that the generated image is correct. + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + EXPECT_TRUE(RowsAreSolidColor(surface, 0, 75, BGRAColor::Red())); + EXPECT_TRUE(RowsAreSolidColor(surface, 75, 25, BGRAColor::Green())); + } + + { + // Fill the rest of the image with a second pass of green. + uint32_t count = 0; + auto result = aSink->WritePixels([&]() { + ++count; + return AsVariant(BGRAColor::Green().AsPixel()); + }); + EXPECT_EQ(WriteState::FINISHED, result); + EXPECT_EQ(75u * 100u, count); + + AssertCorrectPipelineFinalState(aSink, IntRect(0, 0, 100, 75), + IntRect(0, 0, 100, 75)); + + // Check that the generated image is correct. + RawAccessFrameRef currentFrame = aDecoder->GetCurrentFrameRef(); + RefPtr surface = currentFrame->GetSourceSurface(); + EXPECT_TRUE(IsSolidColor(surface, BGRAColor::Green())); + } + }); +} diff --git a/image/test/gtest/TestSwizzleFilter.cpp b/image/test/gtest/TestSwizzleFilter.cpp new file mode 100644 index 0000000000..65faf85155 --- /dev/null +++ b/image/test/gtest/TestSwizzleFilter.cpp @@ -0,0 +1,120 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=8 sts=2 et sw=2 tw=80: */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "gtest/gtest.h" + +#include "mozilla/gfx/2D.h" +#include "Common.h" +#include "Decoder.h" +#include "DecoderFactory.h" +#include "SurfaceFilters.h" +#include "SurfacePipe.h" + +using namespace mozilla; +using namespace mozilla::gfx; +using namespace mozilla::image; + +template +void WithSwizzleFilter(const IntSize& aSize, SurfaceFormat aInputFormat, + SurfaceFormat aOutputFormat, bool aPremultiplyAlpha, + Func aFunc) { + RefPtr decoder = CreateTrivialDecoder(); + ASSERT_TRUE(decoder != nullptr); + + WithFilterPipeline( + decoder, std::forward(aFunc), + SwizzleConfig{aInputFormat, aOutputFormat, aPremultiplyAlpha}, + SurfaceConfig{decoder, aSize, aOutputFormat, false}); +} + +TEST(ImageSwizzleFilter, WritePixels_RGBA_to_BGRA) +{ + WithSwizzleFilter( + IntSize(100, 100), SurfaceFormat::R8G8B8A8, SurfaceFormat::B8G8R8A8, + false, [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckTransformedWritePixels(aDecoder, aFilter, BGRAColor::Blue(), + BGRAColor::Red()); + }); +} + +TEST(ImageSwizzleFilter, WritePixels_RGBA_to_Premultiplied_BGRA) +{ + WithSwizzleFilter( + IntSize(100, 100), SurfaceFormat::R8G8B8A8, SurfaceFormat::B8G8R8A8, true, + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckTransformedWritePixels( + aDecoder, aFilter, BGRAColor(0x26, 0x00, 0x00, 0x7F, true), + BGRAColor(0x00, 0x00, 0x26, 0x7F), Nothing(), Nothing(), Nothing(), + Nothing(), /* aFuzz */ 1); + }); +} + +TEST(ImageSwizzleFilter, WritePixels_RGBA_to_BGRX) +{ + WithSwizzleFilter( + IntSize(100, 100), SurfaceFormat::R8G8B8A8, SurfaceFormat::B8G8R8X8, + false, [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckTransformedWritePixels(aDecoder, aFilter, + BGRAColor(0x26, 0x00, 0x00, 0x7F, true), + BGRAColor(0x00, 0x00, 0x26, 0xFF)); + }); +} + +TEST(ImageSwizzleFilter, WritePixels_RGBA_to_Premultiplied_BGRX) +{ + WithSwizzleFilter( + IntSize(100, 100), SurfaceFormat::R8G8B8A8, SurfaceFormat::B8G8R8X8, true, + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckTransformedWritePixels(aDecoder, aFilter, + BGRAColor(0x26, 0x00, 0x00, 0x7F, true), + BGRAColor(0x00, 0x00, 0x13, 0xFF)); + }); +} + +TEST(ImageSwizzleFilter, WritePixels_RGBA_to_RGBX) +{ + WithSwizzleFilter( + IntSize(100, 100), SurfaceFormat::R8G8B8A8, SurfaceFormat::R8G8B8X8, + false, [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckTransformedWritePixels(aDecoder, aFilter, + BGRAColor(0x00, 0x00, 0x26, 0x7F, true), + BGRAColor(0x00, 0x00, 0x26, 0xFF)); + }); +} + +TEST(ImageSwizzleFilter, WritePixels_RGBA_to_Premultiplied_RGRX) +{ + WithSwizzleFilter( + IntSize(100, 100), SurfaceFormat::R8G8B8A8, SurfaceFormat::R8G8B8X8, true, + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckTransformedWritePixels(aDecoder, aFilter, + BGRAColor(0x00, 0x00, 0x26, 0x7F, true), + BGRAColor(0x00, 0x00, 0x13, 0xFF)); + }); +} + +TEST(ImageSwizzleFilter, WritePixels_BGRA_to_BGRX) +{ + WithSwizzleFilter( + IntSize(100, 100), SurfaceFormat::B8G8R8A8, SurfaceFormat::B8G8R8X8, + false, [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckTransformedWritePixels(aDecoder, aFilter, + BGRAColor(0x10, 0x26, 0x00, 0x7F, true), + BGRAColor(0x10, 0x26, 0x00, 0xFF)); + }); +} + +TEST(ImageSwizzleFilter, WritePixels_BGRA_to_Premultiplied_BGRA) +{ + WithSwizzleFilter( + IntSize(100, 100), SurfaceFormat::B8G8R8A8, SurfaceFormat::B8G8R8A8, true, + [](image::Decoder* aDecoder, SurfaceFilter* aFilter) { + CheckTransformedWritePixels( + aDecoder, aFilter, BGRAColor(0x10, 0x26, 0x00, 0x7F, true), + BGRAColor(0x10, 0x26, 0x00, 0x7F), Nothing(), Nothing(), Nothing(), + Nothing(), /* aFuzz */ 1); + }); +} diff --git a/image/test/gtest/animated-with-extra-image-sub-blocks.gif b/image/test/gtest/animated-with-extra-image-sub-blocks.gif new file mode 100644 index 0000000000..a145c814a6 Binary files /dev/null and b/image/test/gtest/animated-with-extra-image-sub-blocks.gif differ diff --git a/image/test/gtest/blend.avif b/image/test/gtest/blend.avif new file mode 100644 index 0000000000..f059f04d10 Binary files /dev/null and b/image/test/gtest/blend.avif differ diff --git a/image/test/gtest/blend.gif b/image/test/gtest/blend.gif new file mode 100644 index 0000000000..2f7391454c Binary files /dev/null and b/image/test/gtest/blend.gif differ diff --git a/image/test/gtest/blend.png b/image/test/gtest/blend.png new file mode 100644 index 0000000000..c4e739f068 Binary files /dev/null and b/image/test/gtest/blend.png differ diff --git a/image/test/gtest/blend.webp b/image/test/gtest/blend.webp new file mode 100644 index 0000000000..1b95e6f377 Binary files /dev/null and b/image/test/gtest/blend.webp differ diff --git a/image/test/gtest/bug-1655846.avif b/image/test/gtest/bug-1655846.avif new file mode 100644 index 0000000000..31c7e42454 Binary files /dev/null and b/image/test/gtest/bug-1655846.avif differ diff --git a/image/test/gtest/corrupt-with-bad-bmp-height.ico b/image/test/gtest/corrupt-with-bad-bmp-height.ico new file mode 100644 index 0000000000..ee4a90fcd7 Binary files /dev/null and b/image/test/gtest/corrupt-with-bad-bmp-height.ico differ diff --git a/image/test/gtest/corrupt-with-bad-bmp-width.ico b/image/test/gtest/corrupt-with-bad-bmp-width.ico new file mode 100644 index 0000000000..aa4051cd07 Binary files /dev/null and b/image/test/gtest/corrupt-with-bad-bmp-width.ico differ diff --git a/image/test/gtest/corrupt-with-bad-ico-bpp.ico b/image/test/gtest/corrupt-with-bad-ico-bpp.ico new file mode 100644 index 0000000000..5db4922e34 Binary files /dev/null and b/image/test/gtest/corrupt-with-bad-ico-bpp.ico differ diff --git a/image/test/gtest/corrupt.jpg b/image/test/gtest/corrupt.jpg new file mode 100644 index 0000000000..555a416d7d Binary files /dev/null and b/image/test/gtest/corrupt.jpg differ diff --git a/image/test/gtest/downscaled.avif b/image/test/gtest/downscaled.avif new file mode 100644 index 0000000000..15aa14d240 Binary files /dev/null and b/image/test/gtest/downscaled.avif differ diff --git a/image/test/gtest/downscaled.bmp b/image/test/gtest/downscaled.bmp new file mode 100644 index 0000000000..9e6a29e62b Binary files /dev/null and b/image/test/gtest/downscaled.bmp differ diff --git a/image/test/gtest/downscaled.gif b/image/test/gtest/downscaled.gif new file mode 100644 index 0000000000..ff9a20bcdb Binary files /dev/null and b/image/test/gtest/downscaled.gif differ diff --git a/image/test/gtest/downscaled.ico b/image/test/gtest/downscaled.ico new file mode 100644 index 0000000000..ee112af0a9 Binary files /dev/null and b/image/test/gtest/downscaled.ico differ diff --git a/image/test/gtest/downscaled.icon b/image/test/gtest/downscaled.icon new file mode 100644 index 0000000000..0ec9139866 Binary files /dev/null and b/image/test/gtest/downscaled.icon differ diff --git a/image/test/gtest/downscaled.jpg b/image/test/gtest/downscaled.jpg new file mode 100644 index 0000000000..5a4b3cd036 Binary files /dev/null and b/image/test/gtest/downscaled.jpg differ diff --git a/image/test/gtest/downscaled.jxl b/image/test/gtest/downscaled.jxl new file mode 100644 index 0000000000..90e9f65ab2 Binary files /dev/null and b/image/test/gtest/downscaled.jxl differ diff --git a/image/test/gtest/downscaled.png b/image/test/gtest/downscaled.png new file mode 100644 index 0000000000..b71b4652d5 Binary files /dev/null and b/image/test/gtest/downscaled.png differ diff --git a/image/test/gtest/downscaled.webp b/image/test/gtest/downscaled.webp new file mode 100644 index 0000000000..c2db6d6446 Binary files /dev/null and b/image/test/gtest/downscaled.webp differ diff --git a/image/test/gtest/exif_resolution.jpg b/image/test/gtest/exif_resolution.jpg new file mode 100644 index 0000000000..757ce2d877 Binary files /dev/null and b/image/test/gtest/exif_resolution.jpg differ diff --git a/image/test/gtest/first-frame-green.avif b/image/test/gtest/first-frame-green.avif new file mode 100644 index 0000000000..9f2417664f Binary files /dev/null and b/image/test/gtest/first-frame-green.avif differ diff --git a/image/test/gtest/first-frame-green.gif b/image/test/gtest/first-frame-green.gif new file mode 100644 index 0000000000..cd3c7d3db8 Binary files /dev/null and b/image/test/gtest/first-frame-green.gif differ diff --git a/image/test/gtest/first-frame-green.png b/image/test/gtest/first-frame-green.png new file mode 100644 index 0000000000..115f035d89 Binary files /dev/null and b/image/test/gtest/first-frame-green.png differ diff --git a/image/test/gtest/first-frame-green.webp b/image/test/gtest/first-frame-green.webp new file mode 100644 index 0000000000..44db5c71c3 Binary files /dev/null and b/image/test/gtest/first-frame-green.webp differ diff --git a/image/test/gtest/first-frame-padding.gif b/image/test/gtest/first-frame-padding.gif new file mode 100644 index 0000000000..e6d7c49322 Binary files /dev/null and b/image/test/gtest/first-frame-padding.gif differ diff --git a/image/test/gtest/gray-235-10bit-full-range-bt2020.avif b/image/test/gtest/gray-235-10bit-full-range-bt2020.avif new file mode 100644 index 0000000000..33603adc6e Binary files /dev/null and b/image/test/gtest/gray-235-10bit-full-range-bt2020.avif differ diff --git a/image/test/gtest/gray-235-10bit-full-range-bt601.avif b/image/test/gtest/gray-235-10bit-full-range-bt601.avif new file mode 100644 index 0000000000..d8bbd550b1 Binary files /dev/null and b/image/test/gtest/gray-235-10bit-full-range-bt601.avif differ diff --git a/image/test/gtest/gray-235-10bit-full-range-bt709.avif b/image/test/gtest/gray-235-10bit-full-range-bt709.avif new file mode 100644 index 0000000000..a2bae8ce21 Binary files /dev/null and b/image/test/gtest/gray-235-10bit-full-range-bt709.avif differ diff --git a/image/test/gtest/gray-235-10bit-full-range-grayscale.avif b/image/test/gtest/gray-235-10bit-full-range-grayscale.avif new file mode 100644 index 0000000000..bb64ee7bfe Binary files /dev/null and b/image/test/gtest/gray-235-10bit-full-range-grayscale.avif differ diff --git a/image/test/gtest/gray-235-10bit-limited-range-bt2020.avif b/image/test/gtest/gray-235-10bit-limited-range-bt2020.avif new file mode 100644 index 0000000000..13ab0d258e Binary files /dev/null and b/image/test/gtest/gray-235-10bit-limited-range-bt2020.avif differ diff --git a/image/test/gtest/gray-235-10bit-limited-range-bt601.avif b/image/test/gtest/gray-235-10bit-limited-range-bt601.avif new file mode 100644 index 0000000000..e0bc194c3f Binary files /dev/null and b/image/test/gtest/gray-235-10bit-limited-range-bt601.avif differ diff --git a/image/test/gtest/gray-235-10bit-limited-range-bt709.avif b/image/test/gtest/gray-235-10bit-limited-range-bt709.avif new file mode 100644 index 0000000000..bff8d79aa8 Binary files /dev/null and b/image/test/gtest/gray-235-10bit-limited-range-bt709.avif differ diff --git a/image/test/gtest/gray-235-10bit-limited-range-grayscale.avif b/image/test/gtest/gray-235-10bit-limited-range-grayscale.avif new file mode 100644 index 0000000000..297be0f2bc Binary files /dev/null and b/image/test/gtest/gray-235-10bit-limited-range-grayscale.avif differ diff --git a/image/test/gtest/gray-235-12bit-full-range-bt2020.avif b/image/test/gtest/gray-235-12bit-full-range-bt2020.avif new file mode 100644 index 0000000000..5f42432364 Binary files /dev/null and b/image/test/gtest/gray-235-12bit-full-range-bt2020.avif differ diff --git a/image/test/gtest/gray-235-12bit-full-range-bt601.avif b/image/test/gtest/gray-235-12bit-full-range-bt601.avif new file mode 100644 index 0000000000..e681f44356 Binary files /dev/null and b/image/test/gtest/gray-235-12bit-full-range-bt601.avif differ diff --git a/image/test/gtest/gray-235-12bit-full-range-bt709.avif b/image/test/gtest/gray-235-12bit-full-range-bt709.avif new file mode 100644 index 0000000000..608e41d54b Binary files /dev/null and b/image/test/gtest/gray-235-12bit-full-range-bt709.avif differ diff --git a/image/test/gtest/gray-235-12bit-full-range-grayscale.avif b/image/test/gtest/gray-235-12bit-full-range-grayscale.avif new file mode 100644 index 0000000000..9ced94abfd Binary files /dev/null and b/image/test/gtest/gray-235-12bit-full-range-grayscale.avif differ diff --git a/image/test/gtest/gray-235-12bit-limited-range-bt2020.avif b/image/test/gtest/gray-235-12bit-limited-range-bt2020.avif new file mode 100644 index 0000000000..1673a67d21 Binary files /dev/null and b/image/test/gtest/gray-235-12bit-limited-range-bt2020.avif differ diff --git a/image/test/gtest/gray-235-12bit-limited-range-bt601.avif b/image/test/gtest/gray-235-12bit-limited-range-bt601.avif new file mode 100644 index 0000000000..fbd1938c90 Binary files /dev/null and b/image/test/gtest/gray-235-12bit-limited-range-bt601.avif differ diff --git a/image/test/gtest/gray-235-12bit-limited-range-bt709.avif b/image/test/gtest/gray-235-12bit-limited-range-bt709.avif new file mode 100644 index 0000000000..38e4bbff7c Binary files /dev/null and b/image/test/gtest/gray-235-12bit-limited-range-bt709.avif differ diff --git a/image/test/gtest/gray-235-12bit-limited-range-grayscale.avif b/image/test/gtest/gray-235-12bit-limited-range-grayscale.avif new file mode 100644 index 0000000000..415b09afe5 Binary files /dev/null and b/image/test/gtest/gray-235-12bit-limited-range-grayscale.avif differ diff --git a/image/test/gtest/gray-235-8bit-full-range-bt2020.avif b/image/test/gtest/gray-235-8bit-full-range-bt2020.avif new file mode 100644 index 0000000000..ad5aea1fe2 Binary files /dev/null and b/image/test/gtest/gray-235-8bit-full-range-bt2020.avif differ diff --git a/image/test/gtest/gray-235-8bit-full-range-bt601.avif b/image/test/gtest/gray-235-8bit-full-range-bt601.avif new file mode 100644 index 0000000000..a4692b2110 Binary files /dev/null and b/image/test/gtest/gray-235-8bit-full-range-bt601.avif differ diff --git a/image/test/gtest/gray-235-8bit-full-range-bt709.avif b/image/test/gtest/gray-235-8bit-full-range-bt709.avif new file mode 100644 index 0000000000..80c3406dd2 Binary files /dev/null and b/image/test/gtest/gray-235-8bit-full-range-bt709.avif differ diff --git a/image/test/gtest/gray-235-8bit-full-range-grayscale.avif b/image/test/gtest/gray-235-8bit-full-range-grayscale.avif new file mode 100644 index 0000000000..39abf34204 Binary files /dev/null and b/image/test/gtest/gray-235-8bit-full-range-grayscale.avif differ diff --git a/image/test/gtest/gray-235-8bit-limited-range-bt2020.avif b/image/test/gtest/gray-235-8bit-limited-range-bt2020.avif new file mode 100644 index 0000000000..30782d98d6 Binary files /dev/null and b/image/test/gtest/gray-235-8bit-limited-range-bt2020.avif differ diff --git a/image/test/gtest/gray-235-8bit-limited-range-bt601.avif b/image/test/gtest/gray-235-8bit-limited-range-bt601.avif new file mode 100644 index 0000000000..ccb10e3e57 Binary files /dev/null and b/image/test/gtest/gray-235-8bit-limited-range-bt601.avif differ diff --git a/image/test/gtest/gray-235-8bit-limited-range-bt709.avif b/image/test/gtest/gray-235-8bit-limited-range-bt709.avif new file mode 100644 index 0000000000..350fed532d Binary files /dev/null and b/image/test/gtest/gray-235-8bit-limited-range-bt709.avif differ diff --git a/image/test/gtest/gray-235-8bit-limited-range-grayscale.avif b/image/test/gtest/gray-235-8bit-limited-range-grayscale.avif new file mode 100644 index 0000000000..f4dc38f160 Binary files /dev/null and b/image/test/gtest/gray-235-8bit-limited-range-grayscale.avif differ diff --git a/image/test/gtest/green-1x1-truncated.gif b/image/test/gtest/green-1x1-truncated.gif new file mode 100644 index 0000000000..0829f9694d Binary files /dev/null and b/image/test/gtest/green-1x1-truncated.gif differ diff --git a/image/test/gtest/green-large-bmp.ico b/image/test/gtest/green-large-bmp.ico new file mode 100644 index 0000000000..3962cea29d Binary files /dev/null and b/image/test/gtest/green-large-bmp.ico differ diff --git a/image/test/gtest/green-large-png.ico b/image/test/gtest/green-large-png.ico new file mode 100644 index 0000000000..27b9f43cdd Binary files /dev/null and b/image/test/gtest/green-large-png.ico differ diff --git a/image/test/gtest/green-multiple-sizes.ico b/image/test/gtest/green-multiple-sizes.ico new file mode 100644 index 0000000000..b9463d0c89 Binary files /dev/null and b/image/test/gtest/green-multiple-sizes.ico differ diff --git a/image/test/gtest/green.avif b/image/test/gtest/green.avif new file mode 100644 index 0000000000..3178de7f5e Binary files /dev/null and b/image/test/gtest/green.avif differ diff --git a/image/test/gtest/green.bmp b/image/test/gtest/green.bmp new file mode 100644 index 0000000000..f79dd672ad Binary files /dev/null and b/image/test/gtest/green.bmp differ diff --git a/image/test/gtest/green.gif b/image/test/gtest/green.gif new file mode 100644 index 0000000000..ef215dfc94 Binary files /dev/null and b/image/test/gtest/green.gif differ diff --git a/image/test/gtest/green.icc_srgb.webp b/image/test/gtest/green.icc_srgb.webp new file mode 100644 index 0000000000..2a869b447b Binary files /dev/null and b/image/test/gtest/green.icc_srgb.webp differ diff --git a/image/test/gtest/green.ico b/image/test/gtest/green.ico new file mode 100644 index 0000000000..c5dfa8b538 Binary files /dev/null and b/image/test/gtest/green.ico differ diff --git a/image/test/gtest/green.icon b/image/test/gtest/green.icon new file mode 100644 index 0000000000..1de4eeb783 Binary files /dev/null and b/image/test/gtest/green.icon differ diff --git a/image/test/gtest/green.jpg b/image/test/gtest/green.jpg new file mode 100644 index 0000000000..48c454d27c Binary files /dev/null and b/image/test/gtest/green.jpg differ diff --git a/image/test/gtest/green.jxl b/image/test/gtest/green.jxl new file mode 100644 index 0000000000..357f8f392e Binary files /dev/null and b/image/test/gtest/green.jxl differ diff --git a/image/test/gtest/green.png b/image/test/gtest/green.png new file mode 100644 index 0000000000..7df25f33bd Binary files /dev/null and b/image/test/gtest/green.png differ diff --git a/image/test/gtest/green.webp b/image/test/gtest/green.webp new file mode 100644 index 0000000000..04b7f003b4 Binary files /dev/null and b/image/test/gtest/green.webp differ diff --git a/image/test/gtest/hdlr-nonzero-reserved-bug-1727033.avif b/image/test/gtest/hdlr-nonzero-reserved-bug-1727033.avif new file mode 100644 index 0000000000..e84ba63e2d Binary files /dev/null and b/image/test/gtest/hdlr-nonzero-reserved-bug-1727033.avif differ diff --git a/image/test/gtest/invalid-truncated-metadata.bmp b/image/test/gtest/invalid-truncated-metadata.bmp new file mode 100644 index 0000000000..228c5c9992 Binary files /dev/null and b/image/test/gtest/invalid-truncated-metadata.bmp differ diff --git a/image/test/gtest/large.avif b/image/test/gtest/large.avif new file mode 100644 index 0000000000..fbdf084148 Binary files /dev/null and b/image/test/gtest/large.avif differ diff --git a/image/test/gtest/large.jxl b/image/test/gtest/large.jxl new file mode 100644 index 0000000000..a244e66b7d Binary files /dev/null and b/image/test/gtest/large.jxl differ diff --git a/image/test/gtest/large.webp b/image/test/gtest/large.webp new file mode 100644 index 0000000000..9bf0b64fa8 Binary files /dev/null and b/image/test/gtest/large.webp differ diff --git a/image/test/gtest/moz.build b/image/test/gtest/moz.build new file mode 100644 index 0000000000..60987b3706 --- /dev/null +++ b/image/test/gtest/moz.build @@ -0,0 +1,156 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +Library("imagetest") + +UNIFIED_SOURCES = [ + "Common.cpp", + "TestADAM7InterpolatingFilter.cpp", + "TestAnimationFrameBuffer.cpp", + "TestBlendAnimationFilter.cpp", + "TestCopyOnWrite.cpp", + "TestDeinterlacingFilter.cpp", + "TestFrameAnimator.cpp", + "TestLoader.cpp", + "TestRemoveFrameRectFilter.cpp", + "TestStreamingLexer.cpp", + "TestSurfaceSink.cpp", + "TestSwizzleFilter.cpp", +] + +# skip the test on windows10-aarch64, aarch64 due to 1544961 +if not (CONFIG["OS_TARGET"] == "WINNT" and CONFIG["TARGET_CPU"] == "aarch64"): + UNIFIED_SOURCES += [ + "TestDecoders.cpp", + "TestDecodersPerf.cpp", + "TestDecodeToSurface.cpp", + "TestMetadata.cpp", + "TestSourceBuffer.cpp", + "TestSurfaceCache.cpp", + ] + +UNIFIED_SOURCES += [ + "TestDownscalingFilter.cpp", + "TestSurfacePipeIntegration.cpp", +] + +TEST_HARNESS_FILES.gtest += [ + "animated-with-extra-image-sub-blocks.gif", + "blend.avif", + "blend.gif", + "blend.png", + "blend.webp", + "bug-1655846.avif", + "corrupt-with-bad-bmp-height.ico", + "corrupt-with-bad-bmp-width.ico", + "corrupt-with-bad-ico-bpp.ico", + "corrupt.jpg", + "downscaled.avif", + "downscaled.bmp", + "downscaled.gif", + "downscaled.ico", + "downscaled.icon", + "downscaled.jpg", + "downscaled.jxl", + "downscaled.png", + "downscaled.webp", + "exif_resolution.jpg", + "first-frame-green.avif", + "first-frame-green.gif", + "first-frame-green.png", + "first-frame-green.webp", + "first-frame-padding.gif", + "gray-235-10bit-full-range-bt2020.avif", + "gray-235-10bit-full-range-bt601.avif", + "gray-235-10bit-full-range-bt709.avif", + "gray-235-10bit-full-range-grayscale.avif", + "gray-235-10bit-limited-range-bt2020.avif", + "gray-235-10bit-limited-range-bt601.avif", + "gray-235-10bit-limited-range-bt709.avif", + "gray-235-10bit-limited-range-grayscale.avif", + "gray-235-12bit-full-range-bt2020.avif", + "gray-235-12bit-full-range-bt601.avif", + "gray-235-12bit-full-range-bt709.avif", + "gray-235-12bit-full-range-grayscale.avif", + "gray-235-12bit-limited-range-bt2020.avif", + "gray-235-12bit-limited-range-bt601.avif", + "gray-235-12bit-limited-range-bt709.avif", + "gray-235-12bit-limited-range-grayscale.avif", + "gray-235-8bit-full-range-bt2020.avif", + "gray-235-8bit-full-range-bt601.avif", + "gray-235-8bit-full-range-bt709.avif", + "gray-235-8bit-full-range-grayscale.avif", + "gray-235-8bit-limited-range-bt2020.avif", + "gray-235-8bit-limited-range-bt601.avif", + "gray-235-8bit-limited-range-bt709.avif", + "gray-235-8bit-limited-range-grayscale.avif", + "green-1x1-truncated.gif", + "green-large-bmp.ico", + "green-large-png.ico", + "green-multiple-sizes.ico", + "green.avif", + "green.bmp", + "green.gif", + "green.icc_srgb.webp", + "green.ico", + "green.icon", + "green.jpg", + "green.jxl", + "green.png", + "green.webp", + "hdlr-nonzero-reserved-bug-1727033.avif", + "invalid-truncated-metadata.bmp", + "large.avif", + "large.jxl", + "large.webp", + "multilayer.avif", + "no-frame-delay.gif", + "perf_cmyk.jpg", + "perf_gray.jpg", + "perf_gray.png", + "perf_gray_alpha.png", + "perf_srgb.gif", + "perf_srgb.png", + "perf_srgb_alpha.png", + "perf_srgb_alpha_lossless.webp", + "perf_srgb_alpha_lossy.webp", + "perf_srgb_lossless.webp", + "perf_srgb_lossy.webp", + "perf_ycbcr.jpg", + "rle4.bmp", + "rle8.bmp", + "stackcheck.avif", + "transparent-green-50pct-10bit-yuv420.avif", + "transparent-green-50pct-10bit-yuv422.avif", + "transparent-green-50pct-10bit-yuv444.avif", + "transparent-green-50pct-12bit-yuv420.avif", + "transparent-green-50pct-12bit-yuv422.avif", + "transparent-green-50pct-12bit-yuv444.avif", + "transparent-green-50pct-8bit-yuv420.avif", + "transparent-green-50pct-8bit-yuv422.avif", + "transparent-green-50pct-8bit-yuv444.avif", + "transparent-ico-with-and-mask.ico", + "transparent-if-within-ico.bmp", + "transparent-no-alpha-header.webp", + "transparent.avif", + "transparent.gif", + "transparent.jxl", + "transparent.png", + "transparent.webp", + "valid-avif-colr-nclx-and-prof.avif", +] + +include("/ipc/chromium/chromium-config.mozbuild") + +LOCAL_INCLUDES += [ + "/dom/base", + "/gfx/2d", + "/image", +] + +LOCAL_INCLUDES += CONFIG["SKIA_INCLUDES"] + +FINAL_LIBRARY = "xul-gtest" diff --git a/image/test/gtest/multilayer.avif b/image/test/gtest/multilayer.avif new file mode 100644 index 0000000000..91857fde54 Binary files /dev/null and b/image/test/gtest/multilayer.avif differ diff --git a/image/test/gtest/no-frame-delay.gif b/image/test/gtest/no-frame-delay.gif new file mode 100644 index 0000000000..1c50b67431 Binary files /dev/null and b/image/test/gtest/no-frame-delay.gif differ diff --git a/image/test/gtest/perf_cmyk.jpg b/image/test/gtest/perf_cmyk.jpg new file mode 100644 index 0000000000..e9d329f21e Binary files /dev/null and b/image/test/gtest/perf_cmyk.jpg differ diff --git a/image/test/gtest/perf_gray.jpg b/image/test/gtest/perf_gray.jpg new file mode 100644 index 0000000000..ed75b91550 Binary files /dev/null and b/image/test/gtest/perf_gray.jpg differ diff --git a/image/test/gtest/perf_gray.png b/image/test/gtest/perf_gray.png new file mode 100644 index 0000000000..df16c72fb6 Binary files /dev/null and b/image/test/gtest/perf_gray.png differ diff --git a/image/test/gtest/perf_gray_alpha.png b/image/test/gtest/perf_gray_alpha.png new file mode 100644 index 0000000000..fc38ec549b Binary files /dev/null and b/image/test/gtest/perf_gray_alpha.png differ diff --git a/image/test/gtest/perf_srgb.gif b/image/test/gtest/perf_srgb.gif new file mode 100644 index 0000000000..4dadf118b5 Binary files /dev/null and b/image/test/gtest/perf_srgb.gif differ diff --git a/image/test/gtest/perf_srgb.png b/image/test/gtest/perf_srgb.png new file mode 100644 index 0000000000..21f28081c2 Binary files /dev/null and b/image/test/gtest/perf_srgb.png differ diff --git a/image/test/gtest/perf_srgb_alpha.png b/image/test/gtest/perf_srgb_alpha.png new file mode 100644 index 0000000000..1fa7fed59b Binary files /dev/null and b/image/test/gtest/perf_srgb_alpha.png differ diff --git a/image/test/gtest/perf_srgb_alpha_lossless.webp b/image/test/gtest/perf_srgb_alpha_lossless.webp new file mode 100644 index 0000000000..cce4c24ff4 Binary files /dev/null and b/image/test/gtest/perf_srgb_alpha_lossless.webp differ diff --git a/image/test/gtest/perf_srgb_alpha_lossy.webp b/image/test/gtest/perf_srgb_alpha_lossy.webp new file mode 100644 index 0000000000..1bc08edc7d Binary files /dev/null and b/image/test/gtest/perf_srgb_alpha_lossy.webp differ diff --git a/image/test/gtest/perf_srgb_lossless.webp b/image/test/gtest/perf_srgb_lossless.webp new file mode 100644 index 0000000000..ae85a41237 Binary files /dev/null and b/image/test/gtest/perf_srgb_lossless.webp differ diff --git a/image/test/gtest/perf_srgb_lossy.webp b/image/test/gtest/perf_srgb_lossy.webp new file mode 100644 index 0000000000..3caad7ceca Binary files /dev/null and b/image/test/gtest/perf_srgb_lossy.webp differ diff --git a/image/test/gtest/perf_ycbcr.jpg b/image/test/gtest/perf_ycbcr.jpg new file mode 100644 index 0000000000..d2ad4e2b20 Binary files /dev/null and b/image/test/gtest/perf_ycbcr.jpg differ diff --git a/image/test/gtest/rle4.bmp b/image/test/gtest/rle4.bmp new file mode 100644 index 0000000000..78a0927870 Binary files /dev/null and b/image/test/gtest/rle4.bmp differ diff --git a/image/test/gtest/rle8.bmp b/image/test/gtest/rle8.bmp new file mode 100644 index 0000000000..bd793b6b66 Binary files /dev/null and b/image/test/gtest/rle8.bmp differ diff --git a/image/test/gtest/stackcheck.avif b/image/test/gtest/stackcheck.avif new file mode 100644 index 0000000000..fbc9c34dee Binary files /dev/null and b/image/test/gtest/stackcheck.avif differ diff --git a/image/test/gtest/transparent-green-50pct-10bit-yuv420.avif b/image/test/gtest/transparent-green-50pct-10bit-yuv420.avif new file mode 100644 index 0000000000..453840f40c Binary files /dev/null and b/image/test/gtest/transparent-green-50pct-10bit-yuv420.avif differ diff --git a/image/test/gtest/transparent-green-50pct-10bit-yuv422.avif b/image/test/gtest/transparent-green-50pct-10bit-yuv422.avif new file mode 100644 index 0000000000..91e0e75417 Binary files /dev/null and b/image/test/gtest/transparent-green-50pct-10bit-yuv422.avif differ diff --git a/image/test/gtest/transparent-green-50pct-10bit-yuv444.avif b/image/test/gtest/transparent-green-50pct-10bit-yuv444.avif new file mode 100644 index 0000000000..65f265ed96 Binary files /dev/null and b/image/test/gtest/transparent-green-50pct-10bit-yuv444.avif differ diff --git a/image/test/gtest/transparent-green-50pct-12bit-yuv420.avif b/image/test/gtest/transparent-green-50pct-12bit-yuv420.avif new file mode 100644 index 0000000000..9945c50a46 Binary files /dev/null and b/image/test/gtest/transparent-green-50pct-12bit-yuv420.avif differ diff --git a/image/test/gtest/transparent-green-50pct-12bit-yuv422.avif b/image/test/gtest/transparent-green-50pct-12bit-yuv422.avif new file mode 100644 index 0000000000..f428c51f08 Binary files /dev/null and b/image/test/gtest/transparent-green-50pct-12bit-yuv422.avif differ diff --git a/image/test/gtest/transparent-green-50pct-12bit-yuv444.avif b/image/test/gtest/transparent-green-50pct-12bit-yuv444.avif new file mode 100644 index 0000000000..811acc3a10 Binary files /dev/null and b/image/test/gtest/transparent-green-50pct-12bit-yuv444.avif differ diff --git a/image/test/gtest/transparent-green-50pct-8bit-yuv420.avif b/image/test/gtest/transparent-green-50pct-8bit-yuv420.avif new file mode 100644 index 0000000000..25c1940bde Binary files /dev/null and b/image/test/gtest/transparent-green-50pct-8bit-yuv420.avif differ diff --git a/image/test/gtest/transparent-green-50pct-8bit-yuv422.avif b/image/test/gtest/transparent-green-50pct-8bit-yuv422.avif new file mode 100644 index 0000000000..2f58be6441 Binary files /dev/null and b/image/test/gtest/transparent-green-50pct-8bit-yuv422.avif differ diff --git a/image/test/gtest/transparent-green-50pct-8bit-yuv444.avif b/image/test/gtest/transparent-green-50pct-8bit-yuv444.avif new file mode 100644 index 0000000000..ab83b3ba77 Binary files /dev/null and b/image/test/gtest/transparent-green-50pct-8bit-yuv444.avif differ diff --git a/image/test/gtest/transparent-ico-with-and-mask.ico b/image/test/gtest/transparent-ico-with-and-mask.ico new file mode 100644 index 0000000000..ab0dc4bce1 Binary files /dev/null and b/image/test/gtest/transparent-ico-with-and-mask.ico differ diff --git a/image/test/gtest/transparent-if-within-ico.bmp b/image/test/gtest/transparent-if-within-ico.bmp new file mode 100644 index 0000000000..4dc04c181b Binary files /dev/null and b/image/test/gtest/transparent-if-within-ico.bmp differ diff --git a/image/test/gtest/transparent-no-alpha-header.webp b/image/test/gtest/transparent-no-alpha-header.webp new file mode 100644 index 0000000000..8ddd73ac7a Binary files /dev/null and b/image/test/gtest/transparent-no-alpha-header.webp differ diff --git a/image/test/gtest/transparent.avif b/image/test/gtest/transparent.avif new file mode 100644 index 0000000000..00ef35bf74 Binary files /dev/null and b/image/test/gtest/transparent.avif differ diff --git a/image/test/gtest/transparent.gif b/image/test/gtest/transparent.gif new file mode 100644 index 0000000000..48f5c7caf1 Binary files /dev/null and b/image/test/gtest/transparent.gif differ diff --git a/image/test/gtest/transparent.jxl b/image/test/gtest/transparent.jxl new file mode 100644 index 0000000000..c479164516 Binary files /dev/null and b/image/test/gtest/transparent.jxl differ diff --git a/image/test/gtest/transparent.png b/image/test/gtest/transparent.png new file mode 100644 index 0000000000..fc8002053a Binary files /dev/null and b/image/test/gtest/transparent.png differ diff --git a/image/test/gtest/transparent.webp b/image/test/gtest/transparent.webp new file mode 100644 index 0000000000..87b9520521 Binary files /dev/null and b/image/test/gtest/transparent.webp differ diff --git a/image/test/gtest/valid-avif-colr-nclx-and-prof.avif b/image/test/gtest/valid-avif-colr-nclx-and-prof.avif new file mode 100644 index 0000000000..683baa7f54 Binary files /dev/null and b/image/test/gtest/valid-avif-colr-nclx-and-prof.avif differ diff --git a/image/test/mochitest/12M-pixels-1.png b/image/test/mochitest/12M-pixels-1.png new file mode 100644 index 0000000000..f802dd5396 Binary files /dev/null and b/image/test/mochitest/12M-pixels-1.png differ diff --git a/image/test/mochitest/12M-pixels-2.png b/image/test/mochitest/12M-pixels-2.png new file mode 100644 index 0000000000..a6d430442e Binary files /dev/null and b/image/test/mochitest/12M-pixels-2.png differ diff --git a/image/test/mochitest/6M-pixels.png b/image/test/mochitest/6M-pixels.png new file mode 100644 index 0000000000..c813d8b569 Binary files /dev/null and b/image/test/mochitest/6M-pixels.png differ diff --git a/image/test/mochitest/INT32_MIN.bmp b/image/test/mochitest/INT32_MIN.bmp new file mode 100644 index 0000000000..d9a0016107 Binary files /dev/null and b/image/test/mochitest/INT32_MIN.bmp differ diff --git a/image/test/mochitest/animated-avif.avif b/image/test/mochitest/animated-avif.avif new file mode 100644 index 0000000000..f3cafef1e3 Binary files /dev/null and b/image/test/mochitest/animated-avif.avif differ diff --git a/image/test/mochitest/animated-gif-finalframe.gif b/image/test/mochitest/animated-gif-finalframe.gif new file mode 100644 index 0000000000..4e80d31a72 Binary files /dev/null and b/image/test/mochitest/animated-gif-finalframe.gif differ diff --git a/image/test/mochitest/animated-gif.gif b/image/test/mochitest/animated-gif.gif new file mode 100644 index 0000000000..001cbfb87a Binary files /dev/null and b/image/test/mochitest/animated-gif.gif differ diff --git a/image/test/mochitest/animated-gif2.gif b/image/test/mochitest/animated-gif2.gif new file mode 100644 index 0000000000..c66cc4b734 Binary files /dev/null and b/image/test/mochitest/animated-gif2.gif differ diff --git a/image/test/mochitest/animated-gif_trailing-garbage.gif b/image/test/mochitest/animated-gif_trailing-garbage.gif new file mode 100644 index 0000000000..02f4de2e31 Binary files /dev/null and b/image/test/mochitest/animated-gif_trailing-garbage.gif differ diff --git a/image/test/mochitest/animated1.gif b/image/test/mochitest/animated1.gif new file mode 100644 index 0000000000..2f9d8a512b Binary files /dev/null and b/image/test/mochitest/animated1.gif differ diff --git a/image/test/mochitest/animated1.svg b/image/test/mochitest/animated1.svg new file mode 100644 index 0000000000..87118c4ea0 --- /dev/null +++ b/image/test/mochitest/animated1.svg @@ -0,0 +1,12 @@ + + + + diff --git a/image/test/mochitest/animated2.gif b/image/test/mochitest/animated2.gif new file mode 100644 index 0000000000..2f9d8a512b Binary files /dev/null and b/image/test/mochitest/animated2.gif differ diff --git a/image/test/mochitest/animatedMask.gif b/image/test/mochitest/animatedMask.gif new file mode 100644 index 0000000000..72a1c51ddc Binary files /dev/null and b/image/test/mochitest/animatedMask.gif differ diff --git a/image/test/mochitest/animation.svg b/image/test/mochitest/animation.svg new file mode 100644 index 0000000000..2141d86791 --- /dev/null +++ b/image/test/mochitest/animation.svg @@ -0,0 +1,5 @@ + + + + diff --git a/image/test/mochitest/animationPolling.js b/image/test/mochitest/animationPolling.js new file mode 100644 index 0000000000..f20377cf9d --- /dev/null +++ b/image/test/mochitest/animationPolling.js @@ -0,0 +1,469 @@ +// This file expects imgutils.js to be loaded as well. +/* import-globals-from imgutils.js */ +/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ +var currentTest; +var gIsRefImageLoaded = false; +const gShouldOutputDebugInfo = false; + +function pollForSuccess() { + if (!currentTest.isTestFinished) { + if ( + !currentTest.reusingReferenceImage || + (currentTest.reusingReferenceImage && gIsRefImageLoaded) + ) { + currentTest.checkImage(); + } + + setTimeout(pollForSuccess, currentTest.pollFreq); + } +} + +function reuseImageCallback() { + gIsRefImageLoaded = true; +} + +function failTest() { + if (currentTest.isTestFinished || currentTest.closeFunc) { + return; + } + + ok( + false, + "timing out after " + + currentTest.timeout + + "ms. " + + "Animated image still doesn't look correct, after poll #" + + currentTest.pollCounter + ); + currentTest.wereFailures = true; + + if (currentTest.currentSnapshotDataURI) { + currentTest.outputDebugInfo( + "Snapshot #" + currentTest.pollCounter, + "snapNum" + currentTest.pollCounter, + currentTest.currentSnapshotDataURI + ); + } + + currentTest.enableDisplay( + document.getElementById(currentTest.debugElementId) + ); + + currentTest.cleanUpAndFinish(); +} + +/** + * Create a new AnimationTest object. + * + * @param pollFreq The amount of time (in ms) to wait between consecutive + * snapshots if the reference image and the test image don't match. + * @param timeout The total amount of time (in ms) to wait before declaring the + * test as failed. + * @param referenceElementId The id attribute of the reference image element, or + * the source of the image to change to, once the reference snapshot has + * been successfully taken. This latter option could be used if you don't + * want the image to become invisible at any time during the test. + * @param imageElementId The id attribute of the test image element. + * @param debugElementId The id attribute of the div where links should be + * appended if the test fails. + * @param cleanId The id attribute of the div or element to use as the 'clean' + * test. This element is only enabled when we are testing to verify that + * the reference image has been loaded. It can be undefined. + * @param srcAttr The location of the source of the image, for preloading. This + * is usually not required, but it useful for preloading reference + * images. + * @param xulTest A boolean value indicating whether or not this is a XUL test + * (uses hidden=true/false rather than display: none to hide/show + * elements). + * @param closeFunc A function that should be called when this test is finished. + * If null, then cleanUpAndFinish() will be called. This can be used to + * chain tests together, so they are all finished exactly once. + * @returns {AnimationTest} + */ +function AnimationTest( + pollFreq, + timeout, + referenceElementId, + imageElementId, + debugElementId, + cleanId, + srcAttr, + xulTest, + closeFunc +) { + // We want to test the cold loading behavior, so clear cache in case an + // earlier test got our image in there already. + clearAllImageCaches(); + + this.wereFailures = false; + this.pollFreq = pollFreq; + this.timeout = timeout; + this.imageElementId = imageElementId; + this.referenceElementId = referenceElementId; + + if (!document.getElementById(referenceElementId)) { + // In this case, we're assuming the user passed in a string that + // indicates the source of the image they want to change to, + // after the reference image has been taken. + this.reusingImageAsReference = true; + } + + this.srcAttr = srcAttr; + this.debugElementId = debugElementId; + this.referenceSnapshot = ""; // value will be set in takeReferenceSnapshot() + this.pollCounter = 0; + this.isTestFinished = false; + this.numRefsTaken = 0; + this.blankWaitTime = 0; + + this.cleanId = cleanId ? cleanId : ""; + this.xulTest = xulTest ? xulTest : ""; + this.closeFunc = closeFunc ? closeFunc : ""; +} + +AnimationTest.prototype.preloadImage = function () { + if (this.srcAttr) { + this.myImage = new Image(); + this.myImage.onload = function () { + currentTest.continueTest(); + }; + this.myImage.src = this.srcAttr; + } else { + this.continueTest(); + } +}; + +AnimationTest.prototype.outputDebugInfo = function (message, id, dataUri) { + if (!gShouldOutputDebugInfo) { + return; + } + var debugElement = document.getElementById(this.debugElementId); + var newDataUriElement = document.createElement("a"); + newDataUriElement.setAttribute("id", id); + newDataUriElement.setAttribute("href", dataUri); + newDataUriElement.appendChild(document.createTextNode(message)); + debugElement.appendChild(newDataUriElement); + var brElement = document.createElement("br"); + debugElement.appendChild(brElement); + todo(false, "Debug (" + id + "): " + message + " " + dataUri); +}; + +AnimationTest.prototype.isFinished = function () { + return this.isTestFinished; +}; + +AnimationTest.prototype.takeCleanSnapshot = function () { + var cleanElement; + if (this.cleanId) { + cleanElement = document.getElementById(this.cleanId); + } + + // Enable clean page comparison element + if (cleanElement) { + this.enableDisplay(cleanElement); + } + + // Take a snapshot of the initial (clean) page + this.cleanSnapshot = snapshotWindow(window, false); + + // Disable the clean page comparison element + if (cleanElement) { + this.disableDisplay(cleanElement); + } + + var dataString1 = "Clean Snapshot"; + this.outputDebugInfo( + dataString1, + "cleanSnap", + this.cleanSnapshot.toDataURL() + ); +}; + +AnimationTest.prototype.takeBlankSnapshot = function () { + // Take a snapshot of the initial (essentially blank) page + this.blankSnapshot = snapshotWindow(window, false); + + var dataString1 = "Initial Blank Snapshot"; + this.outputDebugInfo( + dataString1, + "blank1Snap", + this.blankSnapshot.toDataURL() + ); +}; + +/** + * Begin the AnimationTest. This will utilize the information provided in the + * constructor to invoke a mochitest on animated images. It will automatically + * fail if allowed to run past the timeout. This will attempt to preload an + * image, if applicable, and then asynchronously call continueTest(), or if not + * applicable, synchronously trigger a call to continueTest(). + */ +AnimationTest.prototype.beginTest = function () { + SimpleTest.waitForExplicitFinish(); + SimpleTest.requestFlakyTimeout("untriaged"); + + currentTest = this; + this.preloadImage(); +}; + +/** + * This is the second part of the test. It is triggered (eventually) from + * beginTest() either synchronously or asynchronously, as an image load + * callback. + */ +AnimationTest.prototype.continueTest = async function () { + // In case something goes wrong, fail earlier than mochitest timeout, + // and with more information. + setTimeout(failTest, this.timeout); + + if (!this.reusingImageAsReference) { + this.disableDisplay(document.getElementById(this.imageElementId)); + } + + let tookReference = new Promise(resolve => { + this.takeReferenceSnapshot(resolve); + }); + + tookReference.then(() => { + this.setupPolledImage(); + SimpleTest.executeSoon(pollForSuccess); + }); +}; + +AnimationTest.prototype.setupPolledImage = function () { + // Make sure the image is visible + if (!this.reusingImageAsReference) { + this.enableDisplay(document.getElementById(this.imageElementId)); + var currentSnapshot = snapshotWindow(window, false); + var result = compareSnapshots( + currentSnapshot, + this.referenceSnapshot, + true + ); + + this.currentSnapshotDataURI = currentSnapshot.toDataURL(); + + if (result[0]) { + // SUCCESS! + ok(true, "Animated image looks correct, at poll #" + this.pollCounter); + + this.outputDebugInfo( + "Animated image", + "animImage", + this.currentSnapshotDataURI + ); + + this.outputDebugInfo( + "Reference image", + "refImage", + this.referenceSnapshot.toDataURL() + ); + + this.cleanUpAndFinish(); + } + } else if (!gIsRefImageLoaded) { + this.myImage = new Image(); + this.myImage.onload = reuseImageCallback; + document + .getElementById(this.imageElementId) + .setAttribute("src", this.referenceElementId); + } +}; + +AnimationTest.prototype.checkImage = function () { + if (this.isTestFinished) { + return; + } + + this.pollCounter++; + + // We need this for some tests, because we need to force the + // test image to be visible. + if (!this.reusingImageAsReference) { + this.enableDisplay(document.getElementById(this.imageElementId)); + } + + var currentSnapshot = snapshotWindow(window, false); + var result = compareSnapshots(currentSnapshot, this.referenceSnapshot, true); + + this.currentSnapshotDataURI = currentSnapshot.toDataURL(); + + if (result[0]) { + // SUCCESS! + ok(true, "Animated image looks correct, at poll #" + this.pollCounter); + + this.outputDebugInfo("Animated image", "animImage", result[1]); + + this.outputDebugInfo("Reference image", "refImage", result[2]); + + this.cleanUpAndFinish(); + } +}; + +AnimationTest.prototype.takeReferenceSnapshot = function (resolve) { + this.numRefsTaken++; + + // Test to make sure the reference image doesn't match a clean snapshot + if (!this.cleanSnapshot) { + this.takeCleanSnapshot(); + } + + // Used later to verify that the reference div disappeared + if (!this.blankSnapshot) { + this.takeBlankSnapshot(); + } + + if (this.reusingImageAsReference) { + // Show reference elem (which is actually our image), & take a snapshot + var referenceElem = document.getElementById(this.imageElementId); + this.enableDisplay(referenceElem); + + this.referenceSnapshot = snapshotWindow(window, false); + + let snapResult = compareSnapshots( + this.cleanSnapshot, + this.referenceSnapshot, + false + ); + if (!snapResult[0]) { + if (this.blankWaitTime > 2000) { + // if it took longer than two seconds to load the image, we probably + // have a problem. + this.wereFailures = true; + ok( + snapResult[0], + "Reference snapshot shouldn't match clean (non-image) snapshot" + ); + } else { + this.blankWaitTime += currentTest.pollFreq; + // let's wait a bit and see if it clears up + setTimeout( + () => this.takeReferenceSnapshot(resolve), + currentTest.pollFreq + ); + return; + } + } + + ok( + snapResult[0], + "Reference snapshot shouldn't match clean (non-image) snapshot" + ); + + let dataString = "Reference Snapshot #" + this.numRefsTaken; + this.outputDebugInfo( + dataString, + "refSnapId", + this.referenceSnapshot.toDataURL() + ); + } else { + // Make sure the animation section is hidden + this.disableDisplay(document.getElementById(this.imageElementId)); + + // Show reference div, & take a snapshot + var referenceDiv = document.getElementById(this.referenceElementId); + this.enableDisplay(referenceDiv); + + this.referenceSnapshot = snapshotWindow(window, false); + let snapResult = compareSnapshots( + this.cleanSnapshot, + this.referenceSnapshot, + false + ); + if (!snapResult[0]) { + if (this.blankWaitTime > 2000) { + // if it took longer than two seconds to load the image, we probably + // have a problem. + this.wereFailures = true; + ok( + snapResult[0], + "Reference snapshot shouldn't match clean (non-image) snapshot" + ); + } else { + this.blankWaitTime += 20; + // let's wait a bit and see if it clears up + setTimeout(() => this.takeReferenceSnapshot(resolve), 20); + return; + } + } + + ok( + snapResult[0], + "Reference snapshot shouldn't match clean (non-image) snapshot" + ); + + let dataString = "Reference Snapshot #" + this.numRefsTaken; + this.outputDebugInfo( + dataString, + "refSnapId", + this.referenceSnapshot.toDataURL() + ); + + // Re-hide reference div, and take another snapshot to be sure it's gone + this.disableDisplay(referenceDiv); + this.testBlankCameBack(); + } + resolve(); +}; + +AnimationTest.prototype.enableDisplay = function (element) { + if (!element) { + return; + } + + if (!this.xulTest) { + element.style.display = ""; + } else { + element.setAttribute("hidden", "false"); + } +}; + +AnimationTest.prototype.disableDisplay = function (element) { + if (!element) { + return; + } + + if (!this.xulTest) { + element.style.display = "none"; + } else { + element.setAttribute("hidden", "true"); + } +}; + +AnimationTest.prototype.testBlankCameBack = function () { + var blankSnapshot2 = snapshotWindow(window, false); + var result = compareSnapshots(this.blankSnapshot, blankSnapshot2, true); + ok( + result[0], + "Reference image should disappear when it becomes display:none" + ); + + if (!result[0]) { + this.wereFailures = true; + var dataString = "Second Blank Snapshot"; + this.outputDebugInfo(dataString, "blank2SnapId", result[2]); + } +}; + +AnimationTest.prototype.cleanUpAndFinish = function () { + // On the off chance that failTest and checkImage are triggered + // back-to-back, use a flag to prevent multiple calls to SimpleTest.finish. + if (this.isTestFinished) { + return; + } + + this.isTestFinished = true; + + // Call our closing function, if one exists + if (this.closeFunc) { + this.closeFunc(); + return; + } + + if (this.wereFailures) { + document.getElementById(this.debugElementId).style.display = "block"; + } + + SimpleTest.finish(); + document.getElementById(this.debugElementId).style.display = ""; +}; diff --git a/image/test/mochitest/bad.jpg b/image/test/mochitest/bad.jpg new file mode 100644 index 0000000000..555a416d7d Binary files /dev/null and b/image/test/mochitest/bad.jpg differ diff --git a/image/test/mochitest/big.png b/image/test/mochitest/big.png new file mode 100644 index 0000000000..94e7eb6db2 Binary files /dev/null and b/image/test/mochitest/big.png differ diff --git a/image/test/mochitest/blue.gif b/image/test/mochitest/blue.gif new file mode 100644 index 0000000000..339f3702fb Binary files /dev/null and b/image/test/mochitest/blue.gif differ diff --git a/image/test/mochitest/blue.png b/image/test/mochitest/blue.png new file mode 100644 index 0000000000..8df58f3a5f Binary files /dev/null and b/image/test/mochitest/blue.png differ diff --git a/image/test/mochitest/bug1132427.gif b/image/test/mochitest/bug1132427.gif new file mode 100644 index 0000000000..39f49689a0 Binary files /dev/null and b/image/test/mochitest/bug1132427.gif differ diff --git a/image/test/mochitest/bug1132427.html b/image/test/mochitest/bug1132427.html new file mode 100644 index 0000000000..c765ce14ca --- /dev/null +++ b/image/test/mochitest/bug1132427.html @@ -0,0 +1,6 @@ + + + + + + diff --git a/image/test/mochitest/bug1180105-waiter.sjs b/image/test/mochitest/bug1180105-waiter.sjs new file mode 100644 index 0000000000..4e20cb9976 --- /dev/null +++ b/image/test/mochitest/bug1180105-waiter.sjs @@ -0,0 +1,29 @@ +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ + */ + +var timer = Cc["@mozilla.org/timer;1"]; +var waitTimer = timer.createInstance(Ci.nsITimer); + +function handleRequest(request, response) { + response.setHeader("Content-Type", "text/html", false); + response.setHeader("Cache-Control", "no-cache", false); + response.setStatusLine(request.httpVersion, 200, "OK"); + response.processAsync(); + waitForFinish(response); +} + +function waitForFinish(response) { + if (getSharedState("all-parts-done") === "1") { + response.write("done"); + response.finish(); + } else { + waitTimer.initWithCallback( + function () { + waitForFinish(response); + }, + 10, + Ci.nsITimer.TYPE_ONE_SHOT + ); + } +} diff --git a/image/test/mochitest/bug1180105.sjs b/image/test/mochitest/bug1180105.sjs new file mode 100644 index 0000000000..35c7025508 --- /dev/null +++ b/image/test/mochitest/bug1180105.sjs @@ -0,0 +1,68 @@ +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ + */ + +var counter = 100; +var timer = Cc["@mozilla.org/timer;1"]; +var partTimer = timer.createInstance(Ci.nsITimer); + +function getFileAsInputStream(aFilename) { + var file = Services.dirsvc.get("CurWorkD", Ci.nsIFile); + + file.append("tests"); + file.append("image"); + file.append("test"); + file.append("mochitest"); + file.append(aFilename); + + var fileStream = Cc[ + "@mozilla.org/network/file-input-stream;1" + ].createInstance(Ci.nsIFileInputStream); + fileStream.init(file, 1, 0, false); + return fileStream; +} + +function handleRequest(request, response) { + response.setHeader( + "Content-Type", + "multipart/x-mixed-replace;boundary=BOUNDARYOMG", + false + ); + response.setHeader("Cache-Control", "no-cache", false); + response.setStatusLine(request.httpVersion, 200, "OK"); + // We're sending parts off in a delayed fashion, to let the tests occur. + response.processAsync(); + response.write("--BOUNDARYOMG\r\n"); + sendParts(response); +} + +function sendParts(response) { + if (counter-- == 0) { + sendClose(response); + setSharedState("all-parts-done", "1"); + return; + } + sendNextPart(response); + partTimer.initWithCallback( + function () { + sendParts(response); + }, + 1, + Ci.nsITimer.TYPE_ONE_SHOT + ); +} + +function sendClose(response) { + response.write("--BOUNDARYOMG--\r\n"); + response.finish(); +} + +function sendNextPart(response) { + var nextPartHead = "Content-Type: image/jpeg\r\n\r\n"; + var inputStream = getFileAsInputStream("damon.jpg"); + response.bodyOutputStream.write(nextPartHead, nextPartHead.length); + response.bodyOutputStream.writeFrom(inputStream, inputStream.available()); + inputStream.close(); + // Toss in the boundary, so the browser can know this part is complete + response.write("--BOUNDARYOMG\r\n"); +} diff --git a/image/test/mochitest/bug1217571-iframe.html b/image/test/mochitest/bug1217571-iframe.html new file mode 100644 index 0000000000..ab243d5cf5 --- /dev/null +++ b/image/test/mochitest/bug1217571-iframe.html @@ -0,0 +1,17 @@ + + + + + iframe for Bug 1217571 + + + + +

+ + + diff --git a/image/test/mochitest/bug1217571.jpg b/image/test/mochitest/bug1217571.jpg new file mode 100644 index 0000000000..917b336607 Binary files /dev/null and b/image/test/mochitest/bug1217571.jpg differ diff --git a/image/test/mochitest/bug1319025-ref.png b/image/test/mochitest/bug1319025-ref.png new file mode 100644 index 0000000000..482d027a02 Binary files /dev/null and b/image/test/mochitest/bug1319025-ref.png differ diff --git a/image/test/mochitest/bug1319025.png b/image/test/mochitest/bug1319025.png new file mode 100644 index 0000000000..8023e77879 Binary files /dev/null and b/image/test/mochitest/bug1319025.png differ diff --git a/image/test/mochitest/bug399925.gif b/image/test/mochitest/bug399925.gif new file mode 100644 index 0000000000..fc1c8f3af0 Binary files /dev/null and b/image/test/mochitest/bug399925.gif differ diff --git a/image/test/mochitest/bug415761.ico b/image/test/mochitest/bug415761.ico new file mode 100644 index 0000000000..d3f65abc23 Binary files /dev/null and b/image/test/mochitest/bug415761.ico differ diff --git a/image/test/mochitest/bug468160.sjs b/image/test/mochitest/bug468160.sjs new file mode 100644 index 0000000000..6495482922 --- /dev/null +++ b/image/test/mochitest/bug468160.sjs @@ -0,0 +1,5 @@ +function handleRequest(request, response) { + response.setStatusLine("1.1", 302, "Found"); + response.setHeader("Location", "red.png", false); + response.setHeader("Cache-Control", "no-cache", false); +} diff --git a/image/test/mochitest/bug478398_ONLY.png b/image/test/mochitest/bug478398_ONLY.png new file mode 100644 index 0000000000..e094ae2cf4 Binary files /dev/null and b/image/test/mochitest/bug478398_ONLY.png differ diff --git a/image/test/mochitest/bug490949-iframe.html b/image/test/mochitest/bug490949-iframe.html new file mode 100644 index 0000000000..68f74b587e --- /dev/null +++ b/image/test/mochitest/bug490949-iframe.html @@ -0,0 +1,7 @@ + + +Bug 490949 iframe + + + + diff --git a/image/test/mochitest/bug490949.sjs b/image/test/mochitest/bug490949.sjs new file mode 100644 index 0000000000..3b77dd9232 --- /dev/null +++ b/image/test/mochitest/bug490949.sjs @@ -0,0 +1,32 @@ +function handleRequest(request, response) { + var file = Services.dirsvc.get("CurWorkD", Ci.nsIFile); + + file.append("tests"); + file.append("image"); + file.append("test"); + file.append("mochitest"); + + var redirectstate = "/image/test/mochitest/bug490949.sjs"; + if (getState(redirectstate) == "") { + file.append("blue.png"); + setState(redirectstate, "red"); + } else { + file.append("red.png"); + setState(redirectstate, ""); + } + response.setHeader("Cache-Control", "no-cache", false); + + var fileStream = Cc[ + "@mozilla.org/network/file-input-stream;1" + ].createInstance(Ci.nsIFileInputStream); + fileStream.init(file, 1, 0, false); + var binaryStream = Cc["@mozilla.org/binaryinputstream;1"].createInstance( + Ci.nsIBinaryInputStream + ); + binaryStream.setInputStream(fileStream); + + response.bodyOutputStream.writeFrom(binaryStream, binaryStream.available()); + + binaryStream.close(); + fileStream.close(); +} diff --git a/image/test/mochitest/bug496292-1.sjs b/image/test/mochitest/bug496292-1.sjs new file mode 100644 index 0000000000..2e842223d5 --- /dev/null +++ b/image/test/mochitest/bug496292-1.sjs @@ -0,0 +1,31 @@ +function handleRequest(request, response) { + var file = Services.dirsvc.get("CurWorkD", Ci.nsIFile); + + file.append("tests"); + file.append("image"); + file.append("test"); + file.append("mochitest"); + + if (request.getHeader("Accept") == "image/avif,image/webp,*/*") { + file.append("blue.png"); + } else { + file.append("red.png"); + } + response.setStatusLine(request.httpVersion, 200, "OK"); + response.setHeader("Content-Type", "image/png", false); + response.setHeader("Cache-Control", "no-cache", false); + + var fileStream = Cc[ + "@mozilla.org/network/file-input-stream;1" + ].createInstance(Ci.nsIFileInputStream); + fileStream.init(file, 1, 0, false); + var binaryStream = Cc["@mozilla.org/binaryinputstream;1"].createInstance( + Ci.nsIBinaryInputStream + ); + binaryStream.setInputStream(fileStream); + + response.bodyOutputStream.writeFrom(binaryStream, binaryStream.available()); + + binaryStream.close(); + fileStream.close(); +} diff --git a/image/test/mochitest/bug496292-2.sjs b/image/test/mochitest/bug496292-2.sjs new file mode 100644 index 0000000000..af174e99c4 --- /dev/null +++ b/image/test/mochitest/bug496292-2.sjs @@ -0,0 +1,31 @@ +function handleRequest(request, response) { + var file = Services.dirsvc.get("CurWorkD", Ci.nsIFile); + + file.append("tests"); + file.append("image"); + file.append("test"); + file.append("mochitest"); + + if (request.getHeader("Accept") == "image/png") { + file.append("blue.png"); + } else { + file.append("red.png"); + } + response.setStatusLine(request.httpVersion, 200, "OK"); + response.setHeader("Content-Type", "image/png", false); + response.setHeader("Cache-Control", "no-cache", false); + + var fileStream = Cc[ + "@mozilla.org/network/file-input-stream;1" + ].createInstance(Ci.nsIFileInputStream); + fileStream.init(file, 1, 0, false); + var binaryStream = Cc["@mozilla.org/binaryinputstream;1"].createInstance( + Ci.nsIBinaryInputStream + ); + binaryStream.setInputStream(fileStream); + + response.bodyOutputStream.writeFrom(binaryStream, binaryStream.available()); + + binaryStream.close(); + fileStream.close(); +} diff --git a/image/test/mochitest/bug496292-iframe-1.html b/image/test/mochitest/bug496292-iframe-1.html new file mode 100644 index 0000000000..00f0fbcfce --- /dev/null +++ b/image/test/mochitest/bug496292-iframe-1.html @@ -0,0 +1,7 @@ + + +Bug 496292 iframe 1 + + + + diff --git a/image/test/mochitest/bug496292-iframe-2.html b/image/test/mochitest/bug496292-iframe-2.html new file mode 100644 index 0000000000..67c1ecea16 --- /dev/null +++ b/image/test/mochitest/bug496292-iframe-2.html @@ -0,0 +1,7 @@ + + +Bug 496292 iframe 2 + + + + diff --git a/image/test/mochitest/bug496292-iframe-ref.html b/image/test/mochitest/bug496292-iframe-ref.html new file mode 100644 index 0000000000..2e804502e6 --- /dev/null +++ b/image/test/mochitest/bug496292-iframe-ref.html @@ -0,0 +1,7 @@ + + +Bug 496292 reference iframe + + + + diff --git a/image/test/mochitest/bug497665-iframe.html b/image/test/mochitest/bug497665-iframe.html new file mode 100644 index 0000000000..a2b098e31b --- /dev/null +++ b/image/test/mochitest/bug497665-iframe.html @@ -0,0 +1,8 @@ + + +Bug 497665 iframe + + + + + diff --git a/image/test/mochitest/bug497665.sjs b/image/test/mochitest/bug497665.sjs new file mode 100644 index 0000000000..cc6361d7c5 --- /dev/null +++ b/image/test/mochitest/bug497665.sjs @@ -0,0 +1,33 @@ +function handleRequest(request, response) { + var file = Services.dirsvc.get("CurWorkD", Ci.nsIFile); + + file.append("tests"); + file.append("image"); + file.append("test"); + file.append("mochitest"); + + var redirectstate = "/image/test/mochitest/bug497665.sjs"; + if (getState(redirectstate) == "") { + file.append("blue.png"); + setState(redirectstate, "red"); + } else { + file.append("red.png"); + setState(redirectstate, ""); + } + + response.setHeader("Cache-Control", "max-age=3600", false); + + var fileStream = Cc[ + "@mozilla.org/network/file-input-stream;1" + ].createInstance(Ci.nsIFileInputStream); + fileStream.init(file, 1, 0, false); + var binaryStream = Cc["@mozilla.org/binaryinputstream;1"].createInstance( + Ci.nsIBinaryInputStream + ); + binaryStream.setInputStream(fileStream); + + response.bodyOutputStream.writeFrom(binaryStream, binaryStream.available()); + + binaryStream.close(); + fileStream.close(); +} diff --git a/image/test/mochitest/bug552605.sjs b/image/test/mochitest/bug552605.sjs new file mode 100644 index 0000000000..350ab729d5 --- /dev/null +++ b/image/test/mochitest/bug552605.sjs @@ -0,0 +1,12 @@ +function handleRequest(request, response) { + var redirectstate = "/image/test/mochitest/bug89419.sjs"; + response.setStatusLine("1.1", 302, "Found"); + if (getState(redirectstate) == "") { + response.setHeader("Location", "red.png", false); + setState(redirectstate, "red"); + } else { + response.setHeader("Location", "blue.png", false); + setState(redirectstate, ""); + } + response.setHeader("Cache-Control", "no-cache", false); +} diff --git a/image/test/mochitest/bug657191.sjs b/image/test/mochitest/bug657191.sjs new file mode 100644 index 0000000000..6a2c7924e1 --- /dev/null +++ b/image/test/mochitest/bug657191.sjs @@ -0,0 +1,26 @@ +function handleRequest(request, response) { + var file = Services.dirsvc.get("CurWorkD", Ci.nsIFile); + + file.append("tests"); + file.append("image"); + file.append("test"); + file.append("mochitest"); + file.append("lime100x100.svg"); + + response.setStatusLine("1.1", 500, "Internal Server Error"); + response.setHeader("Content-Type", "image/svg+xml", false); + + var fileStream = Cc[ + "@mozilla.org/network/file-input-stream;1" + ].createInstance(Ci.nsIFileInputStream); + fileStream.init(file, 1, 0, false); + var binaryStream = Cc["@mozilla.org/binaryinputstream;1"].createInstance( + Ci.nsIBinaryInputStream + ); + binaryStream.setInputStream(fileStream); + + response.bodyOutputStream.writeFrom(binaryStream, binaryStream.available()); + + binaryStream.close(); + fileStream.close(); +} diff --git a/image/test/mochitest/bug671906-iframe.html b/image/test/mochitest/bug671906-iframe.html new file mode 100644 index 0000000000..87f8183a4d --- /dev/null +++ b/image/test/mochitest/bug671906-iframe.html @@ -0,0 +1,7 @@ + + +Bug 671906 iframe + + + + diff --git a/image/test/mochitest/bug671906.sjs b/image/test/mochitest/bug671906.sjs new file mode 100644 index 0000000000..8473e87f3a --- /dev/null +++ b/image/test/mochitest/bug671906.sjs @@ -0,0 +1,34 @@ +function handleRequest(request, response) { + var file = Services.dirsvc.get("CurWorkD", Ci.nsIFile); + + file.append("tests"); + file.append("image"); + file.append("test"); + file.append("mochitest"); + + var filestate = "/image/test/mochitest/bug671906.sjs"; + if (getState(filestate) == "") { + file.append("blue.png"); + setState(filestate, "red"); + } else { + file.append("red.png"); + setState(filestate, ""); + } + + // Set the expires date to some silly time in the future so we're sure to + // *want* to cache this image. + var date = new Date(); + date.setFullYear(date.getFullYear() + 1); + response.setHeader("Expires", date.toUTCString(), false); + + var fileStream = Cc[ + "@mozilla.org/network/file-input-stream;1" + ].createInstance(Ci.nsIFileInputStream); + fileStream.init(file, 1, 0, false); + + response.bodyOutputStream.writeFrom(fileStream, fileStream.available()); + + fileStream.close(); + + response.setHeader("Access-Control-Allow-Origin", "*", false); +} diff --git a/image/test/mochitest/bug733553-informant.sjs b/image/test/mochitest/bug733553-informant.sjs new file mode 100644 index 0000000000..364830b636 --- /dev/null +++ b/image/test/mochitest/bug733553-informant.sjs @@ -0,0 +1,13 @@ +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ + */ + +function handleRequest(request, response) { + response.setHeader("Content-Type", "text/plain", false); + response.setHeader("Cache-Control", "no-cache", false); + response.setStatusLine(request.httpVersion, 200, "OK"); + // Tells bug733553.sjs that the consumer is ready for the next part + let partName = request.queryString; + setSharedState("next-part", partName); + response.write("OK!"); +} diff --git a/image/test/mochitest/bug733553.sjs b/image/test/mochitest/bug733553.sjs new file mode 100644 index 0000000000..869477b581 --- /dev/null +++ b/image/test/mochitest/bug733553.sjs @@ -0,0 +1,104 @@ +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ + */ + +var bodyPartIndex = -1; +var bodyParts = [ + ["red.png", "image/png"], + ["animated-gif2.gif", "image/gif"], + ["red.png", "image/png"], + ["lime100x100.svg", "image/svg+xml"], + ["lime100x100.svg", "image/svg+xml"], + ["animated-gif2.gif", "image/gif"], + ["red.png", "image/png"], + // Mime type intentionally wrong (test for bug 907575) + ["shaver.png", "image/gif"], + ["red.png", "image/png"], + ["damon.jpg", "image/jpeg"], + ["damon.jpg", "application/octet-stream"], + ["damon.jpg", "image/jpeg"], + ["rillybad.jpg", "application/x-unknown-content-type"], + ["damon.jpg", "image/jpeg"], + ["bad.jpg", "image/jpeg"], + ["red.png", "image/png"], + ["invalid.jpg", "image/jpeg"], + ["animated-gif2.gif", "image/gif"], +]; +var timer = Cc["@mozilla.org/timer;1"]; +var partTimer = timer.createInstance(Ci.nsITimer); + +function getFileAsInputStream(aFilename) { + var file = Services.dirsvc.get("CurWorkD", Ci.nsIFile); + + file.append("tests"); + file.append("image"); + file.append("test"); + file.append("mochitest"); + file.append(aFilename); + + var fileStream = Cc[ + "@mozilla.org/network/file-input-stream;1" + ].createInstance(Ci.nsIFileInputStream); + fileStream.init(file, 1, 0, false); + return fileStream; +} + +function handleRequest(request, response) { + if (!getSharedState("next-part")) { + setSharedState("next-part", "-1"); + } + response.setHeader( + "Content-Type", + "multipart/x-mixed-replace;boundary=BOUNDARYOMG", + false + ); + response.setHeader("Cache-Control", "no-cache", false); + response.setStatusLine(request.httpVersion, 200, "OK"); + // We're sending parts off in a delayed fashion, to let the tests occur. + response.processAsync(); + response.write("--BOUNDARYOMG\r\n"); + sendParts(response); +} + +function sendParts(response) { + let wait = false; + let nextPart = parseInt(getSharedState("next-part"), 10); + if (nextPart == bodyPartIndex) { + // Haven't been signaled yet, remain in holding pattern + wait = true; + } else { + bodyPartIndex = nextPart; + } + if (bodyParts.length > bodyPartIndex) { + let callback; + if (!wait) { + callback = getSendNextPart(response); + } else { + callback = function () { + sendParts(response); + }; + } + partTimer.initWithCallback(callback, 1000, Ci.nsITimer.TYPE_ONE_SHOT); + } else { + sendClose(response); + } +} + +function sendClose(response) { + response.write("--BOUNDARYOMG--\r\n"); + response.finish(); +} + +function getSendNextPart(response) { + var part = bodyParts[bodyPartIndex]; + var nextPartHead = "Content-Type: " + part[1] + "\r\n\r\n"; + var inputStream = getFileAsInputStream(part[0]); + return function () { + response.bodyOutputStream.write(nextPartHead, nextPartHead.length); + response.bodyOutputStream.writeFrom(inputStream, inputStream.available()); + inputStream.close(); + // Toss in the boundary, so the browser can know this part is complete + response.write("--BOUNDARYOMG\r\n"); + sendParts(response); + }; +} diff --git a/image/test/mochitest/bug767779.sjs b/image/test/mochitest/bug767779.sjs new file mode 100644 index 0000000000..b29b00cf1c --- /dev/null +++ b/image/test/mochitest/bug767779.sjs @@ -0,0 +1,56 @@ +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ + */ + +var timer = Cc["@mozilla.org/timer;1"]; +var partTimer = timer.createInstance(Ci.nsITimer); + +function getFileAsInputStream(aFilename) { + var file = Services.dirsvc.get("CurWorkD", Ci.nsIFile); + + file.append("tests"); + file.append("image"); + file.append("test"); + file.append("mochitest"); + file.append(aFilename); + + var fileStream = Cc[ + "@mozilla.org/network/file-input-stream;1" + ].createInstance(Ci.nsIFileInputStream); + fileStream.init(file, 1, 0, false); + return fileStream; +} + +function handleRequest(request, response) { + response.setHeader("Content-Type", "image/gif", false); + response.setHeader("Cache-Control", "no-cache", false); + response.setStatusLine(request.httpVersion, 200, "OK"); + // We're sending data off in a delayed fashion + response.processAsync(); + var inputStream = getFileAsInputStream("animated-gif_trailing-garbage.gif"); + // Should be 4029 bytes available. + // Send the good data at once + response.bodyOutputStream.writeFrom(inputStream, 285); + sendParts(inputStream, response); +} + +function sendParts(inputStream, response) { + // 3744 left, send in 8 chunks of 468 each + partTimer.initWithCallback( + getSendNextPart(inputStream, response), + 500, + Ci.nsITimer.TYPE_ONE_SHOT + ); +} + +function getSendNextPart(inputStream, response) { + return function () { + response.bodyOutputStream.writeFrom(inputStream, 468); + if (!inputStream.available()) { + inputStream.close(); + response.finish(); + } else { + sendParts(inputStream, response); + } + }; +} diff --git a/image/test/mochitest/bug89419-iframe.html b/image/test/mochitest/bug89419-iframe.html new file mode 100644 index 0000000000..1915315633 --- /dev/null +++ b/image/test/mochitest/bug89419-iframe.html @@ -0,0 +1,7 @@ + + +Bug 89419 iframe + + + + diff --git a/image/test/mochitest/bug89419.sjs b/image/test/mochitest/bug89419.sjs new file mode 100644 index 0000000000..350ab729d5 --- /dev/null +++ b/image/test/mochitest/bug89419.sjs @@ -0,0 +1,12 @@ +function handleRequest(request, response) { + var redirectstate = "/image/test/mochitest/bug89419.sjs"; + response.setStatusLine("1.1", 302, "Found"); + if (getState(redirectstate) == "") { + response.setHeader("Location", "red.png", false); + setState(redirectstate, "red"); + } else { + response.setHeader("Location", "blue.png", false); + setState(redirectstate, ""); + } + response.setHeader("Cache-Control", "no-cache", false); +} diff --git a/image/test/mochitest/bug900200-ref.png b/image/test/mochitest/bug900200-ref.png new file mode 100644 index 0000000000..6360131325 Binary files /dev/null and b/image/test/mochitest/bug900200-ref.png differ diff --git a/image/test/mochitest/bug900200.png b/image/test/mochitest/bug900200.png new file mode 100644 index 0000000000..d7d87adce0 Binary files /dev/null and b/image/test/mochitest/bug900200.png differ diff --git a/image/test/mochitest/child.html b/image/test/mochitest/child.html new file mode 100644 index 0000000000..19f262ec3a --- /dev/null +++ b/image/test/mochitest/child.html @@ -0,0 +1,22 @@ + + + + + diff --git a/image/test/mochitest/chrome.toml b/image/test/mochitest/chrome.toml new file mode 100644 index 0000000000..5859cc70fd --- /dev/null +++ b/image/test/mochitest/chrome.toml @@ -0,0 +1,6 @@ +[DEFAULT] +skip-if = ["os == 'android'"] + +["test_bug415761.html"] +skip-if = ["os != 'win'"] +support-files = ["bug415761.ico"] diff --git a/image/test/mochitest/clear.avif b/image/test/mochitest/clear.avif new file mode 100644 index 0000000000..b68e5729b4 Binary files /dev/null and b/image/test/mochitest/clear.avif differ diff --git a/image/test/mochitest/clear.gif b/image/test/mochitest/clear.gif new file mode 100644 index 0000000000..7ae79ba86e Binary files /dev/null and b/image/test/mochitest/clear.gif differ diff --git a/image/test/mochitest/clear.png b/image/test/mochitest/clear.png new file mode 100644 index 0000000000..b09aecaaa0 Binary files /dev/null and b/image/test/mochitest/clear.png differ diff --git a/image/test/mochitest/clear.webp b/image/test/mochitest/clear.webp new file mode 100644 index 0000000000..6db376d6e1 Binary files /dev/null and b/image/test/mochitest/clear.webp differ diff --git a/image/test/mochitest/clear2-results.gif b/image/test/mochitest/clear2-results.gif new file mode 100644 index 0000000000..965b650253 Binary files /dev/null and b/image/test/mochitest/clear2-results.gif differ diff --git a/image/test/mochitest/clear2.gif b/image/test/mochitest/clear2.gif new file mode 100644 index 0000000000..00ad873c65 Binary files /dev/null and b/image/test/mochitest/clear2.gif differ diff --git a/image/test/mochitest/clear2.webp b/image/test/mochitest/clear2.webp new file mode 100644 index 0000000000..e4a3e2efab Binary files /dev/null and b/image/test/mochitest/clear2.webp differ diff --git a/image/test/mochitest/damon.jpg b/image/test/mochitest/damon.jpg new file mode 100644 index 0000000000..917b336607 Binary files /dev/null and b/image/test/mochitest/damon.jpg differ diff --git a/image/test/mochitest/error-early.png b/image/test/mochitest/error-early.png new file mode 100644 index 0000000000..5df7507e2d --- /dev/null +++ b/image/test/mochitest/error-early.png @@ -0,0 +1 @@ +ERROR diff --git a/image/test/mochitest/filter-final.svg b/image/test/mochitest/filter-final.svg new file mode 100644 index 0000000000..b2b3dca008 --- /dev/null +++ b/image/test/mochitest/filter-final.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/image/test/mochitest/filter.svg b/image/test/mochitest/filter.svg new file mode 100644 index 0000000000..e185f15b69 --- /dev/null +++ b/image/test/mochitest/filter.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/image/test/mochitest/finite-apng.png b/image/test/mochitest/finite-apng.png new file mode 100644 index 0000000000..778613d851 Binary files /dev/null and b/image/test/mochitest/finite-apng.png differ diff --git a/image/test/mochitest/first-frame-padding.gif b/image/test/mochitest/first-frame-padding.gif new file mode 100644 index 0000000000..e6d7c49322 Binary files /dev/null and b/image/test/mochitest/first-frame-padding.gif differ diff --git a/image/test/mochitest/green-background.html b/image/test/mochitest/green-background.html new file mode 100644 index 0000000000..731919f766 --- /dev/null +++ b/image/test/mochitest/green-background.html @@ -0,0 +1,30 @@ + + + +Background color wrapper for clear image tests + + + + + + + + diff --git a/image/test/mochitest/green.png b/image/test/mochitest/green.png new file mode 100644 index 0000000000..7df25f33bd Binary files /dev/null and b/image/test/mochitest/green.png differ diff --git a/image/test/mochitest/grey.png b/image/test/mochitest/grey.png new file mode 100644 index 0000000000..5c82cdeb10 Binary files /dev/null and b/image/test/mochitest/grey.png differ diff --git a/image/test/mochitest/ico-bmp-opaque.ico b/image/test/mochitest/ico-bmp-opaque.ico new file mode 100644 index 0000000000..3cf3320eae Binary files /dev/null and b/image/test/mochitest/ico-bmp-opaque.ico differ diff --git a/image/test/mochitest/ico-bmp-transparent.ico b/image/test/mochitest/ico-bmp-transparent.ico new file mode 100644 index 0000000000..151b7cb361 Binary files /dev/null and b/image/test/mochitest/ico-bmp-transparent.ico differ diff --git a/image/test/mochitest/iframe.html b/image/test/mochitest/iframe.html new file mode 100644 index 0000000000..6d66557ef8 --- /dev/null +++ b/image/test/mochitest/iframe.html @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/image/test/mochitest/imgutils.js b/image/test/mochitest/imgutils.js new file mode 100644 index 0000000000..b16ad1d065 --- /dev/null +++ b/image/test/mochitest/imgutils.js @@ -0,0 +1,137 @@ +/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ +// Helper file for shared image functionality +// +// Note that this is use by tests elsewhere in the source tree. When in doubt, +// check mxr before removing or changing functionality. + +// Helper function to clear both the content and chrome image caches +function clearAllImageCaches() { + var tools = SpecialPowers.Cc["@mozilla.org/image/tools;1"].getService( + SpecialPowers.Ci.imgITools + ); + var imageCache = tools.getImgCacheForDocument(window.document); + imageCache.clearCache(true); // true=chrome + imageCache.clearCache(false); // false=content +} + +// Helper function to clear the image cache of content images +function clearImageCache() { + var tools = SpecialPowers.Cc["@mozilla.org/image/tools;1"].getService( + SpecialPowers.Ci.imgITools + ); + var imageCache = tools.getImgCacheForDocument(window.document); + imageCache.clearCache(false); // true=chrome, false=content +} + +// Helper function to determine if the frame is decoded for a given image id +function isFrameDecoded(id) { + return !!( + getImageStatus(id) & SpecialPowers.Ci.imgIRequest.STATUS_FRAME_COMPLETE + ); +} + +// Helper function to determine if the image is loaded for a given image id +function isImageLoaded(id) { + return !!( + getImageStatus(id) & SpecialPowers.Ci.imgIRequest.STATUS_LOAD_COMPLETE + ); +} + +// Helper function to get the status flags of an image +function getImageStatus(id) { + // Get the image + var img = SpecialPowers.wrap(document.getElementById(id)); + + // Get the request + var request = img.getRequest( + SpecialPowers.Ci.nsIImageLoadingContent.CURRENT_REQUEST + ); + + // Return the status + return request.imageStatus; +} + +// Forces a synchronous decode of an image by drawing it to a canvas. Only +// really meaningful if the image is fully loaded first +function forceDecode(id) { + // Get the image + var img = document.getElementById(id); + + // Make a new canvas + var canvas = document.createElement("canvas"); + + // Draw the image to the canvas. This forces a synchronous decode + var ctx = canvas.getContext("2d"); + ctx.drawImage(img, 0, 0); +} + +// Functions to facilitate getting/setting various image-related prefs +// +// If you change a pref in a mochitest, Don't forget to reset it to its +// original value! +// +// Null indicates no pref set + +const DISCARD_ENABLED_PREF = { + name: "discardable", + branch: "image.mem.", + type: "bool", +}; +const DECODEONDRAW_ENABLED_PREF = { + name: "decodeondraw", + branch: "image.mem.", + type: "bool", +}; +const DISCARD_TIMEOUT_PREF = { + name: "min_discard_timeout_ms", + branch: "image.mem.", + type: "int", +}; + +function setImagePref(pref, val) { + var prefService = SpecialPowers.Services.prefs; + var branch = prefService.getBranch(pref.branch); + if (val != null) { + switch (pref.type) { + case "bool": + branch.setBoolPref(pref.name, val); + break; + case "int": + branch.setIntPref(pref.name, val); + break; + default: + throw new Error("Unknown pref type"); + } + } else if (branch.prefHasUserValue(pref.name)) { + branch.clearUserPref(pref.name); + } +} + +function getImagePref(pref) { + var prefService = SpecialPowers.Services.prefs; + var branch = prefService.getBranch(pref.branch); + if (branch.prefHasUserValue(pref.name)) { + switch (pref.type) { + case "bool": + return branch.getBoolPref(pref.name); + case "int": + return branch.getIntPref(pref.name); + default: + throw new Error("Unknown pref type"); + } + } else { + return null; + } +} + +// JS implementation of imgIScriptedNotificationObserver with stubs for all of its methods. +function ImageDecoderObserverStub() { + this.sizeAvailable = function sizeAvailable(aRequest) {}; + this.frameComplete = function frameComplete(aRequest) {}; + this.decodeComplete = function decodeComplete(aRequest) {}; + this.loadComplete = function loadComplete(aRequest) {}; + this.frameUpdate = function frameUpdate(aRequest) {}; + this.discard = function discard(aRequest) {}; + this.isAnimated = function isAnimated(aRequest) {}; + this.hasTransparency = function hasTransparency(aRequest) {}; +} diff --git a/image/test/mochitest/infinite-apng.png b/image/test/mochitest/infinite-apng.png new file mode 100644 index 0000000000..637dafbc2b Binary files /dev/null and b/image/test/mochitest/infinite-apng.png differ diff --git a/image/test/mochitest/infinite.avif b/image/test/mochitest/infinite.avif new file mode 100644 index 0000000000..a5be1912a8 Binary files /dev/null and b/image/test/mochitest/infinite.avif differ diff --git a/image/test/mochitest/infinite.webp b/image/test/mochitest/infinite.webp new file mode 100644 index 0000000000..4219e179b0 Binary files /dev/null and b/image/test/mochitest/infinite.webp differ diff --git a/image/test/mochitest/invalid.jpg b/image/test/mochitest/invalid.jpg new file mode 100644 index 0000000000..c677a81e29 --- /dev/null +++ b/image/test/mochitest/invalid.jpg @@ -0,0 +1 @@ +notajpg diff --git a/image/test/mochitest/keep.gif b/image/test/mochitest/keep.gif new file mode 100644 index 0000000000..e967d6a6dc Binary files /dev/null and b/image/test/mochitest/keep.gif differ diff --git a/image/test/mochitest/keep.png b/image/test/mochitest/keep.png new file mode 100644 index 0000000000..aa3ff74450 Binary files /dev/null and b/image/test/mochitest/keep.png differ diff --git a/image/test/mochitest/keep.webp b/image/test/mochitest/keep.webp new file mode 100644 index 0000000000..342982be06 Binary files /dev/null and b/image/test/mochitest/keep.webp differ diff --git a/image/test/mochitest/lime-anim-100x100-2.svg b/image/test/mochitest/lime-anim-100x100-2.svg new file mode 100644 index 0000000000..d19d3b0e7e --- /dev/null +++ b/image/test/mochitest/lime-anim-100x100-2.svg @@ -0,0 +1,6 @@ + + + + + diff --git a/image/test/mochitest/lime-anim-100x100.svg b/image/test/mochitest/lime-anim-100x100.svg new file mode 100644 index 0000000000..c6584047d0 --- /dev/null +++ b/image/test/mochitest/lime-anim-100x100.svg @@ -0,0 +1,7 @@ + + + + + + diff --git a/image/test/mochitest/lime-css-anim-100x100.svg b/image/test/mochitest/lime-css-anim-100x100.svg new file mode 100644 index 0000000000..3edbd3eaaf --- /dev/null +++ b/image/test/mochitest/lime-css-anim-100x100.svg @@ -0,0 +1,19 @@ + + + + + + + diff --git a/image/test/mochitest/lime100x100.svg b/image/test/mochitest/lime100x100.svg new file mode 100644 index 0000000000..8bdec62c1f --- /dev/null +++ b/image/test/mochitest/lime100x100.svg @@ -0,0 +1,4 @@ + + + diff --git a/image/test/mochitest/mochitest.toml b/image/test/mochitest/mochitest.toml new file mode 100644 index 0000000000..96aaa8a0c3 --- /dev/null +++ b/image/test/mochitest/mochitest.toml @@ -0,0 +1,258 @@ +[DEFAULT] +support-files = [ + "INT32_MIN.bmp", + "animated1.gif", + "animated1.svg", + "animated2.gif", + "animatedMask.gif", + "animated-gif.gif", + "animated-gif2.gif", + "animated-gif_trailing-garbage.gif", + "animated-gif-finalframe.gif", + "animated-avif.avif", + "animation.svg", + "animationPolling.js", + "bad.jpg", + "big.png", + "blue.gif", + "blue.png", + "bug399925.gif", + "bug468160.sjs", + "bug478398_ONLY.png", + "bug490949-iframe.html", + "bug490949.sjs", + "bug496292-1.sjs", + "bug496292-2.sjs", + "bug496292-iframe-1.html", + "bug496292-iframe-2.html", + "bug496292-iframe-ref.html", + "bug497665-iframe.html", + "bug497665.sjs", + "bug552605.sjs", + "bug657191.sjs", + "bug671906-iframe.html", + "bug671906.sjs", + "bug733553-informant.sjs", + "bug733553.sjs", + "bug767779.sjs", + "bug89419-iframe.html", + "bug89419.sjs", + "bug900200.png", + "bug900200-ref.png", + "bug1132427.html", + "bug1132427.gif", + "bug1180105.sjs", + "bug1180105-waiter.sjs", + "bug1217571-iframe.html", + "bug1217571.jpg", + "bug1319025.png", + "bug1319025-ref.png", + "clear.gif", + "clear.png", + "clear.webp", + "clear.avif", + "clear2.gif", + "clear2.webp", + "clear2-results.gif", + "damon.jpg", + "error-early.png", + "filter-final.svg", + "filter.svg", + "finite-apng.png", + "first-frame-padding.gif", + "green.png", + "green-background.html", + "grey.png", + "ico-bmp-opaque.ico", + "ico-bmp-transparent.ico", + "iframe.html", + "imgutils.js", + "infinite.avif", + "infinite.webp", + "infinite-apng.png", + "invalid.jpg", + "keep.gif", + "keep.png", + "keep.webp", + "lime100x100.svg", + "lime-anim-100x100.svg", + "lime-anim-100x100-2.svg", + "lime-css-anim-100x100.svg", + "mq_dynamic_svg_test.html", + "mq_dynamic_svg_ref.html", + "opaque.bmp", + "purple.gif", + "rainbow.gif", + "red.gif", + "red.png", + "ref-iframe.html", + "restore-previous.gif", + "restore-previous.png", + "rillybad.jpg", + "schrep.png", + "shaver.png", + "short_header.gif", + "source.png", + "transparent.gif", + "transparent.png", + "over.png", + "webcam-simulacrum.sjs", + "6M-pixels.png", + "12M-pixels-1.png", + "12M-pixels-2.png", +] + +["test_animSVGImage.html"] +skip-if = [ + "os == 'android'", + "os == 'win'", + "os == 'mac' && os_version == '10.15'", # Bug 1370784, macosx due to bug 1549058 +] + +["test_animSVGImage2.html"] +skip-if = [ + "os == 'win'", # Bug 1354561 + "os == 'linux'", # Bug 1354561 + "os == 'android'", # Bug 1354561 +] + +["test_animated_css_image.html"] + +["test_animated_gif.html"] +support-files = ["child.html"] +skip-if = [ + "http3", + "http2", +] + +["test_animation.html"] + +["test_animation2.html"] + +["test_animation_operators.html"] + +["test_background_image_anim.html"] + +["test_bug89419-1.html"] + +["test_bug89419-2.html"] + +["test_bug399925.html"] + +["test_bug435296.html"] +skip-if = ["true"] # disabled - See bug 578591 + +["test_bug466586.html"] + +["test_bug468160.html"] + +["test_bug478398.html"] +skip-if = ["true"] # disabled - See bug 579139 + +["test_bug490949.html"] + +["test_bug496292.html"] +skip-if = ["verify"] + +["test_bug497665.html"] + +["test_bug552605-1.html"] + +["test_bug552605-2.html"] + +["test_bug553982.html"] + +["test_bug601470.html"] + +["test_bug614392.html"] + +["test_bug657191.html"] + +["test_bug671906.html"] +skip-if = [ + "http3", + "http2", +] + +["test_bug733553.html"] +skip-if = [ + "verify", + "http3", + "http2", +] + +["test_bug767779.html"] + +["test_bug865919.html"] + +["test_bug1132427.html"] +skip-if = ["display == 'wayland' && os_version == '22.04'"] # Bug 18570 + +["test_bug1180105.html"] +skip-if = [ + "http3", + "http2", +] + +["test_bug1217571.html"] + +["test_bug1325080.html"] + +["test_bullet_animation.html"] + +["test_canvas_frame_animation.html"] + +["test_changeOfSource.html"] + +["test_changeOfSource2.html"] + +["test_discardAnimatedImage.html"] +skip-if = [ + "http3", + "http2", +] + +["test_discardFinishedAnimatedImage.html"] + +["test_discardFramesAnimatedImage.html"] + +["test_drawDiscardedImage.html"] + +["test_error_events.html"] + +["test_has_transparency.html"] + +["test_image_cache_notification.html"] + +["test_image_crossorigin_data_url.html"] + +["test_mq_dynamic_svg.html"] + +["test_net_failedtoprocess.html"] +skip-if = ["verify"] + +["test_removal_ondecode.html"] + +["test_removal_onload.html"] + +["test_short_gif_header.html"] + +["test_staticClone.html"] + +["test_svg_animatedGIF.html"] + +["test_svg_filter_animation.html"] + +["test_synchronized_animation.html"] +skip-if = ["true"] # bug 1295501 + +["test_undisplayed_iframe.html"] + +["test_webcam.html"] + +["test_xultree_animation.xhtml"] +allow_xul_xbl = true +skip-if = [ + "http3", + "http2", +] diff --git a/image/test/mochitest/mq_dynamic_svg_ref.html b/image/test/mochitest/mq_dynamic_svg_ref.html new file mode 100644 index 0000000000..bbd4a3e205 --- /dev/null +++ b/image/test/mochitest/mq_dynamic_svg_ref.html @@ -0,0 +1,38 @@ + + + + +

inline

+ + + +

iframe

+ +

img

+ +

background-image

+
+

img with nested document

+ diff --git a/image/test/mochitest/mq_dynamic_svg_test.html b/image/test/mochitest/mq_dynamic_svg_test.html new file mode 100644 index 0000000000..8acb6d3331 --- /dev/null +++ b/image/test/mochitest/mq_dynamic_svg_test.html @@ -0,0 +1,61 @@ + + + + +

inline

+ + + +

iframe

+ +

img

+ +

background-image

+
+

img with nested document

+ diff --git a/image/test/mochitest/opaque.bmp b/image/test/mochitest/opaque.bmp new file mode 100644 index 0000000000..63d3f1c058 Binary files /dev/null and b/image/test/mochitest/opaque.bmp differ diff --git a/image/test/mochitest/over.png b/image/test/mochitest/over.png new file mode 100644 index 0000000000..9e957182f7 Binary files /dev/null and b/image/test/mochitest/over.png differ diff --git a/image/test/mochitest/purple.gif b/image/test/mochitest/purple.gif new file mode 100644 index 0000000000..79826af205 Binary files /dev/null and b/image/test/mochitest/purple.gif differ diff --git a/image/test/mochitest/rainbow.gif b/image/test/mochitest/rainbow.gif new file mode 100644 index 0000000000..a247a80df0 Binary files /dev/null and b/image/test/mochitest/rainbow.gif differ diff --git a/image/test/mochitest/red.gif b/image/test/mochitest/red.gif new file mode 100644 index 0000000000..d3c32bae25 Binary files /dev/null and b/image/test/mochitest/red.gif differ diff --git a/image/test/mochitest/red.png b/image/test/mochitest/red.png new file mode 100644 index 0000000000..aa9ce25263 Binary files /dev/null and b/image/test/mochitest/red.png differ diff --git a/image/test/mochitest/ref-iframe.html b/image/test/mochitest/ref-iframe.html new file mode 100644 index 0000000000..585772c8a9 --- /dev/null +++ b/image/test/mochitest/ref-iframe.html @@ -0,0 +1,6 @@ + + +
+ + diff --git a/image/test/mochitest/restore-previous.gif b/image/test/mochitest/restore-previous.gif new file mode 100644 index 0000000000..15ba9ddc48 Binary files /dev/null and b/image/test/mochitest/restore-previous.gif differ diff --git a/image/test/mochitest/restore-previous.png b/image/test/mochitest/restore-previous.png new file mode 100644 index 0000000000..09dee63820 Binary files /dev/null and b/image/test/mochitest/restore-previous.png differ diff --git a/image/test/mochitest/rillybad.jpg b/image/test/mochitest/rillybad.jpg new file mode 100644 index 0000000000..e2fb1d303f Binary files /dev/null and b/image/test/mochitest/rillybad.jpg differ diff --git a/image/test/mochitest/schrep.png b/image/test/mochitest/schrep.png new file mode 100644 index 0000000000..bcb406387d Binary files /dev/null and b/image/test/mochitest/schrep.png differ diff --git a/image/test/mochitest/shaver.png b/image/test/mochitest/shaver.png new file mode 100644 index 0000000000..ab0b6c7b40 Binary files /dev/null and b/image/test/mochitest/shaver.png differ diff --git a/image/test/mochitest/short_header.gif b/image/test/mochitest/short_header.gif new file mode 100644 index 0000000000..70af95ac6d Binary files /dev/null and b/image/test/mochitest/short_header.gif differ diff --git a/image/test/mochitest/source.png b/image/test/mochitest/source.png new file mode 100644 index 0000000000..df1c76dae5 Binary files /dev/null and b/image/test/mochitest/source.png differ diff --git a/image/test/mochitest/test_animSVGImage.html b/image/test/mochitest/test_animSVGImage.html new file mode 100644 index 0000000000..a405cdd46b --- /dev/null +++ b/image/test/mochitest/test_animSVGImage.html @@ -0,0 +1,124 @@ + + + + + Test for Bug 610419 + + + + + + +Mozilla Bug 610419 +

+
+
+ +
+
+
+
+ + diff --git a/image/test/mochitest/test_animSVGImage2.html b/image/test/mochitest/test_animSVGImage2.html new file mode 100644 index 0000000000..0f3ae046c5 --- /dev/null +++ b/image/test/mochitest/test_animSVGImage2.html @@ -0,0 +1,124 @@ + + + + + Test for Bug 907503 + + + + + + +Mozilla Bug 907503 +

+
+
+ +
+
+
+
+ + diff --git a/image/test/mochitest/test_animated_css_image.html b/image/test/mochitest/test_animated_css_image.html new file mode 100644 index 0000000000..ca4a47915f --- /dev/null +++ b/image/test/mochitest/test_animated_css_image.html @@ -0,0 +1,223 @@ + + + + + + diff --git a/image/test/mochitest/test_animated_gif.html b/image/test/mochitest/test_animated_gif.html new file mode 100644 index 0000000000..814749b7f0 --- /dev/null +++ b/image/test/mochitest/test_animated_gif.html @@ -0,0 +1,50 @@ + + + + +Images outside of display port are not decoded + + + + + +

+ +
+
+ +
+
+

+
+
+
diff --git a/image/test/mochitest/test_animation.html b/image/test/mochitest/test_animation.html
new file mode 100644
index 0000000000..725cd93e85
--- /dev/null
+++ b/image/test/mochitest/test_animation.html
@@ -0,0 +1,45 @@
+
+
+
+
+  Test for Bug 666446 - General Animated GIF Test
+  
+  
+  
+  
+  
+
+
+
+Mozilla Bug 666446: lots of animated gifs swamp us with paint events
+
+

+ +
+
+
+ +
+
+ +
+
+
+
+ + diff --git a/image/test/mochitest/test_animation2.html b/image/test/mochitest/test_animation2.html new file mode 100644 index 0000000000..1b4e0f94c7 --- /dev/null +++ b/image/test/mochitest/test_animation2.html @@ -0,0 +1,49 @@ + + + + + Test for Bug 705580 - General Animated GIF Test 2 + + + + + + + + +Mozilla Bug 705580: Test animated GIFs that are converted to ImageLayers + +

+ +
+ +
+
+ +
+
+ +
+
+
+
+ + diff --git a/image/test/mochitest/test_animation_operators.html b/image/test/mochitest/test_animation_operators.html new file mode 100644 index 0000000000..2d3a6f6d67 --- /dev/null +++ b/image/test/mochitest/test_animation_operators.html @@ -0,0 +1,167 @@ + + + + + Test for Bug 936720 + + + + + +Mozilla Bug 936720 +
+
+
+ + diff --git a/image/test/mochitest/test_background_image_anim.html b/image/test/mochitest/test_background_image_anim.html new file mode 100644 index 0000000000..f1aeb6288b --- /dev/null +++ b/image/test/mochitest/test_background_image_anim.html @@ -0,0 +1,44 @@ + + + + + Test for Bug 666446 - Animated Background Images + + + + + + + + +Mozilla Bug 666446: lots of animated gifs swamp us with paint events + +

+
+
+ +
+ +
+
+
+ + diff --git a/image/test/mochitest/test_bug1132427.html b/image/test/mochitest/test_bug1132427.html new file mode 100644 index 0000000000..0ee2872fea --- /dev/null +++ b/image/test/mochitest/test_bug1132427.html @@ -0,0 +1,94 @@ + + + + Test for scrolling selection into view + + + + + + +
+
+
+ + + diff --git a/image/test/mochitest/test_bug1180105.html b/image/test/mochitest/test_bug1180105.html new file mode 100644 index 0000000000..579c8db760 --- /dev/null +++ b/image/test/mochitest/test_bug1180105.html @@ -0,0 +1,46 @@ + + + + + Test for Bug 1180105 + + + + + +Mozilla Bug 1180105 +

+
+
+
+
> + +
+ + diff --git a/image/test/mochitest/test_bug1217571.html b/image/test/mochitest/test_bug1217571.html new file mode 100644 index 0000000000..f81fc7c51d --- /dev/null +++ b/image/test/mochitest/test_bug1217571.html @@ -0,0 +1,43 @@ + + + + + Test for Bug 1217571 + + + + +Mozilla Bug 1217571 +

+ + +
+
+
+ + diff --git a/image/test/mochitest/test_bug1325080.html b/image/test/mochitest/test_bug1325080.html new file mode 100644 index 0000000000..91dea11173 --- /dev/null +++ b/image/test/mochitest/test_bug1325080.html @@ -0,0 +1,37 @@ + + + + + Test for Bug 1325080 + + + + +Mozilla Bug 1325080 +
+
+
+ + diff --git a/image/test/mochitest/test_bug399925.html b/image/test/mochitest/test_bug399925.html new file mode 100644 index 0000000000..ae45479377 --- /dev/null +++ b/image/test/mochitest/test_bug399925.html @@ -0,0 +1,102 @@ + + + + + Test for Bug 399925 + + + + + +Mozilla Bug 399925 +

+ +
+
+
+ + + diff --git a/image/test/mochitest/test_bug415761.html b/image/test/mochitest/test_bug415761.html new file mode 100644 index 0000000000..f3bf6c67a8 --- /dev/null +++ b/image/test/mochitest/test_bug415761.html @@ -0,0 +1,117 @@ + + + + Test for icon filenames + + + + + + +
+
+
+ + + + diff --git a/image/test/mochitest/test_bug435296.html b/image/test/mochitest/test_bug435296.html new file mode 100644 index 0000000000..1610410b16 --- /dev/null +++ b/image/test/mochitest/test_bug435296.html @@ -0,0 +1,85 @@ + + + + + Test for Bug 435296 + + + + + + +Mozilla Bug 435296 + +
+
+
+ + diff --git a/image/test/mochitest/test_bug466586.html b/image/test/mochitest/test_bug466586.html new file mode 100644 index 0000000000..fb900dc2b3 --- /dev/null +++ b/image/test/mochitest/test_bug466586.html @@ -0,0 +1,58 @@ + + + + + Test for Bug 466586 + + + + + +Mozilla Bug 466586 +

+ +
+
+
+ + diff --git a/image/test/mochitest/test_bug468160.html b/image/test/mochitest/test_bug468160.html new file mode 100644 index 0000000000..cb33454e1b --- /dev/null +++ b/image/test/mochitest/test_bug468160.html @@ -0,0 +1,29 @@ + + + + + Test for Bug 468160 + + + + +Mozilla Bug 468160 +

+ +
+
+
+ + diff --git a/image/test/mochitest/test_bug478398.html b/image/test/mochitest/test_bug478398.html new file mode 100644 index 0000000000..45ab6acc2f --- /dev/null +++ b/image/test/mochitest/test_bug478398.html @@ -0,0 +1,87 @@ + + + + + Test for Bug 478398 + + + + + +Mozilla Bug 478398 +
+
+
+ + + diff --git a/image/test/mochitest/test_bug490949.html b/image/test/mochitest/test_bug490949.html new file mode 100644 index 0000000000..8f1b70c8f4 --- /dev/null +++ b/image/test/mochitest/test_bug490949.html @@ -0,0 +1,112 @@ + + + + + Test for Bug 490949 + + + + + +Mozilla Bug 490949 +

+ +
+
+
+ + diff --git a/image/test/mochitest/test_bug496292.html b/image/test/mochitest/test_bug496292.html new file mode 100644 index 0000000000..7f91539bf3 --- /dev/null +++ b/image/test/mochitest/test_bug496292.html @@ -0,0 +1,130 @@ + + + + + Test for Bug 496292 + + + + + +Mozilla Bug 496292 +

+ +
+
+
+ + diff --git a/image/test/mochitest/test_bug497665.html b/image/test/mochitest/test_bug497665.html new file mode 100644 index 0000000000..3914e43c64 --- /dev/null +++ b/image/test/mochitest/test_bug497665.html @@ -0,0 +1,88 @@ + + + + + Test for Bug 497665 + + + + + +Mozilla Bug 497665 +

+
+
+
+
+ + +
+ + diff --git a/image/test/mochitest/test_bug552605-1.html b/image/test/mochitest/test_bug552605-1.html new file mode 100644 index 0000000000..271b3599ce --- /dev/null +++ b/image/test/mochitest/test_bug552605-1.html @@ -0,0 +1,56 @@ + + + + + Test for Bug 552605 + + + + + + +Mozilla Bug 552605 +

+
+
+
+
+ +
+ + diff --git a/image/test/mochitest/test_bug552605-2.html b/image/test/mochitest/test_bug552605-2.html new file mode 100644 index 0000000000..7869a9e481 --- /dev/null +++ b/image/test/mochitest/test_bug552605-2.html @@ -0,0 +1,53 @@ + + + + + Test for Bug 552605 + + + + + + +Mozilla Bug 552605 +

+
+
+
+
+ + +
+ + diff --git a/image/test/mochitest/test_bug553982.html b/image/test/mochitest/test_bug553982.html new file mode 100644 index 0000000000..f7fe58a0af --- /dev/null +++ b/image/test/mochitest/test_bug553982.html @@ -0,0 +1,39 @@ + + + + + Test for Bug 553982 + + + + + +Mozilla Bug 553982 +
+
+
+ + + diff --git a/image/test/mochitest/test_bug601470.html b/image/test/mochitest/test_bug601470.html new file mode 100644 index 0000000000..fdf2d074f8 --- /dev/null +++ b/image/test/mochitest/test_bug601470.html @@ -0,0 +1,45 @@ + + + + + Test for Bug 601470 + + + + +Mozilla Bug 601470 +

+ +
+
+
+ + diff --git a/image/test/mochitest/test_bug614392.html b/image/test/mochitest/test_bug614392.html new file mode 100644 index 0000000000..94585ba35e --- /dev/null +++ b/image/test/mochitest/test_bug614392.html @@ -0,0 +1,42 @@ + + + + + Test for Bug 614392 + + + + +Mozilla Bug 614392 +

+ +
+
+
+ + diff --git a/image/test/mochitest/test_bug657191.html b/image/test/mochitest/test_bug657191.html new file mode 100644 index 0000000000..17fcae6c8a --- /dev/null +++ b/image/test/mochitest/test_bug657191.html @@ -0,0 +1,34 @@ + + + + + Test for Bug 657191 + + + + + +Mozilla Bug 657191 +

+ +
+
+
+ + diff --git a/image/test/mochitest/test_bug671906.html b/image/test/mochitest/test_bug671906.html new file mode 100644 index 0000000000..82f70f19d6 --- /dev/null +++ b/image/test/mochitest/test_bug671906.html @@ -0,0 +1,71 @@ + + + + + Test for Bug 671906 + + + + + + +Mozilla Bug 671906 +

+
+
+
+
+ +
+ + diff --git a/image/test/mochitest/test_bug733553.html b/image/test/mochitest/test_bug733553.html new file mode 100644 index 0000000000..6d7ed81019 --- /dev/null +++ b/image/test/mochitest/test_bug733553.html @@ -0,0 +1,92 @@ + + + + + Test for Bug 733553 + + + + + +Mozilla Bug 733553 +

+
+
+
+
+ +
+ + diff --git a/image/test/mochitest/test_bug767779.html b/image/test/mochitest/test_bug767779.html new file mode 100644 index 0000000000..ae3fe492cf --- /dev/null +++ b/image/test/mochitest/test_bug767779.html @@ -0,0 +1,44 @@ + + + + + Test for Bug 767779 + + + + + + + + +Mozilla Bug 767779 +

+
+
+
+
+
+
+ +
+
+ +
+ + diff --git a/image/test/mochitest/test_bug865919.html b/image/test/mochitest/test_bug865919.html new file mode 100644 index 0000000000..46686c67d7 --- /dev/null +++ b/image/test/mochitest/test_bug865919.html @@ -0,0 +1,53 @@ + + + + + + Test for Bug 865919 + + + + + + + +
+ +
+ + + + diff --git a/image/test/mochitest/test_bug89419-1.html b/image/test/mochitest/test_bug89419-1.html new file mode 100644 index 0000000000..3364dacbfb --- /dev/null +++ b/image/test/mochitest/test_bug89419-1.html @@ -0,0 +1,68 @@ + + + + + Test for Bug 89419 + + + + + + +Mozilla Bug 89419 +

+
+
+
+
+ +
+ + diff --git a/image/test/mochitest/test_bug89419-2.html b/image/test/mochitest/test_bug89419-2.html new file mode 100644 index 0000000000..25861b9179 --- /dev/null +++ b/image/test/mochitest/test_bug89419-2.html @@ -0,0 +1,70 @@ + + + + + Test for Bug 89419 + + + + + + +Mozilla Bug 89419 +

+
+
+
+
+ +
+ + diff --git a/image/test/mochitest/test_bullet_animation.html b/image/test/mochitest/test_bullet_animation.html new file mode 100644 index 0000000000..7e39898a4f --- /dev/null +++ b/image/test/mochitest/test_bullet_animation.html @@ -0,0 +1,59 @@ + + + + + Test for Bug 666446 - Animated Bullets + + + + + + + + + +Mozilla Bug 666446: lots of animated gifs swamp us with paint events + +

+ +
+ + + +
+ +
+
+
+
+ + diff --git a/image/test/mochitest/test_canvas_frame_animation.html b/image/test/mochitest/test_canvas_frame_animation.html new file mode 100644 index 0000000000..c2820b3a66 --- /dev/null +++ b/image/test/mochitest/test_canvas_frame_animation.html @@ -0,0 +1,24 @@ + +Test for bug 1619245 - animated image as canvas background + + + + + + + + + + + diff --git a/image/test/mochitest/test_changeOfSource.html b/image/test/mochitest/test_changeOfSource.html new file mode 100644 index 0000000000..f557a3a140 --- /dev/null +++ b/image/test/mochitest/test_changeOfSource.html @@ -0,0 +1,62 @@ + + + + + Test for Bug 666446 - Change of Source (1st Version) + + + + + + + + +Mozilla Bug 666446: lots of animated gifs swamp us with paint events + +

+ +
+
+
+
+ +
+
+ +
+
+
+
+ + diff --git a/image/test/mochitest/test_changeOfSource2.html b/image/test/mochitest/test_changeOfSource2.html new file mode 100644 index 0000000000..e3db345470 --- /dev/null +++ b/image/test/mochitest/test_changeOfSource2.html @@ -0,0 +1,47 @@ + + + + + Test for Bug 691792 - Change of Source (2nd Version) + + + + + + + + +Mozilla Bug 691792: Change of src attribute for animated gifs no longer works as expected + +

+ +
+
+ +
+
+ +
+
+
+
+ + diff --git a/image/test/mochitest/test_discardAnimatedImage.html b/image/test/mochitest/test_discardAnimatedImage.html new file mode 100644 index 0000000000..09bd9372c6 --- /dev/null +++ b/image/test/mochitest/test_discardAnimatedImage.html @@ -0,0 +1,217 @@ + + + + + Test that animated images can be discarded + + + + + + +Mozilla Bug 686905 +

+
+
+ + + + + + + + + +
+
+
+
+
+ + + diff --git a/image/test/mochitest/test_discardFinishedAnimatedImage.html b/image/test/mochitest/test_discardFinishedAnimatedImage.html new file mode 100644 index 0000000000..190cb1d1a0 --- /dev/null +++ b/image/test/mochitest/test_discardFinishedAnimatedImage.html @@ -0,0 +1,144 @@ + + + + Test that img.decode works on finished, discarded animated images + + + + + + +Mozilla Bug 1629490 +
+ +
+ + + diff --git a/image/test/mochitest/test_discardFramesAnimatedImage.html b/image/test/mochitest/test_discardFramesAnimatedImage.html new file mode 100644 index 0000000000..2e95e6203b --- /dev/null +++ b/image/test/mochitest/test_discardFramesAnimatedImage.html @@ -0,0 +1,268 @@ + + + + + Test that animated images can discard frames and redecode + + + + + + +Mozilla Bug 523950 +

+
+
+ + +
+
+
+
+
+ + + diff --git a/image/test/mochitest/test_drawDiscardedImage.html b/image/test/mochitest/test_drawDiscardedImage.html new file mode 100644 index 0000000000..f1a2dde89c --- /dev/null +++ b/image/test/mochitest/test_drawDiscardedImage.html @@ -0,0 +1,85 @@ + + + + + Test for Bug 731419 - Draw an ostensibly discarded image to a canvas + + + + + + + + + + + + + + + + + diff --git a/image/test/mochitest/test_error_events.html b/image/test/mochitest/test_error_events.html new file mode 100644 index 0000000000..89ed9da528 --- /dev/null +++ b/image/test/mochitest/test_error_events.html @@ -0,0 +1,67 @@ + + + + + Test for Bug 715308 comment 93 + + + + + + + + + +
+ + +
+ + + + + diff --git a/image/test/mochitest/test_has_transparency.html b/image/test/mochitest/test_has_transparency.html new file mode 100644 index 0000000000..482aaf96b9 --- /dev/null +++ b/image/test/mochitest/test_has_transparency.html @@ -0,0 +1,169 @@ + + + + + Test for Bug 1089880 + + + + + + +Mozilla Bug 1089880 +

+
+
+
+
+
+ + diff --git a/image/test/mochitest/test_image_cache_notification.html b/image/test/mochitest/test_image_cache_notification.html new file mode 100644 index 0000000000..73adac25ff --- /dev/null +++ b/image/test/mochitest/test_image_cache_notification.html @@ -0,0 +1,47 @@ + + + + + + + + + + diff --git a/image/test/mochitest/test_image_crossorigin_data_url.html b/image/test/mochitest/test_image_crossorigin_data_url.html new file mode 100644 index 0000000000..4465b5aab4 --- /dev/null +++ b/image/test/mochitest/test_image_crossorigin_data_url.html @@ -0,0 +1,28 @@ + + +Test for handling of 'crossorigin' attribute on CSS link with data: URL + + +
+
+ + diff --git a/image/test/mochitest/test_mq_dynamic_svg.html b/image/test/mochitest/test_mq_dynamic_svg.html new file mode 100644 index 0000000000..25b708224e --- /dev/null +++ b/image/test/mochitest/test_mq_dynamic_svg.html @@ -0,0 +1,49 @@ + + +Dynamic changes to prefers-color-scheme affecting SVG images + + + + + + + diff --git a/image/test/mochitest/test_net_failedtoprocess.html b/image/test/mochitest/test_net_failedtoprocess.html new file mode 100644 index 0000000000..95ab5c0cc3 --- /dev/null +++ b/image/test/mochitest/test_net_failedtoprocess.html @@ -0,0 +1,51 @@ + + + + + Test for image net:failed-to-process-uri-content + + + + +

+
+
+ + + diff --git a/image/test/mochitest/test_removal_ondecode.html b/image/test/mochitest/test_removal_ondecode.html new file mode 100644 index 0000000000..4ce7555757 --- /dev/null +++ b/image/test/mochitest/test_removal_ondecode.html @@ -0,0 +1,160 @@ + + + + + Test for Bug 841579 + + + + + + +Mozilla Bug 841579 +

+
+
+
+
+
+ + diff --git a/image/test/mochitest/test_removal_onload.html b/image/test/mochitest/test_removal_onload.html new file mode 100644 index 0000000000..0a060542f5 --- /dev/null +++ b/image/test/mochitest/test_removal_onload.html @@ -0,0 +1,142 @@ + + + + + Test for Bug 841579 + + + + + + +Mozilla Bug 841579 +

+
+
+
+
+
+ + diff --git a/image/test/mochitest/test_short_gif_header.html b/image/test/mochitest/test_short_gif_header.html new file mode 100644 index 0000000000..f8294825b5 --- /dev/null +++ b/image/test/mochitest/test_short_gif_header.html @@ -0,0 +1,35 @@ + + + + + Test for Bug 844684 + + + + + +Mozilla Bug 844684 +
+ +
+
+
+
+ + diff --git a/image/test/mochitest/test_staticClone.html b/image/test/mochitest/test_staticClone.html new file mode 100644 index 0000000000..7400e064c6 --- /dev/null +++ b/image/test/mochitest/test_staticClone.html @@ -0,0 +1,41 @@ + + + + + Test for Bug 878037 + + + + +Mozilla Bug 878037 +

+
+ + +
+
+
+
+ + diff --git a/image/test/mochitest/test_svg_animatedGIF.html b/image/test/mochitest/test_svg_animatedGIF.html new file mode 100644 index 0000000000..04077676b7 --- /dev/null +++ b/image/test/mochitest/test_svg_animatedGIF.html @@ -0,0 +1,53 @@ + + + + + Test for Bug 666446 - Animated Raster Images inside of SVG Frames + + + + + + + + + + +

+
+
+ + +
+ +
+
+
+ + diff --git a/image/test/mochitest/test_svg_filter_animation.html b/image/test/mochitest/test_svg_filter_animation.html new file mode 100644 index 0000000000..b72aaa68c1 --- /dev/null +++ b/image/test/mochitest/test_svg_filter_animation.html @@ -0,0 +1,42 @@ + + + + + Test for Bug 666446 - Animated Images within SVG Filters + + + + + + + + +Mozilla Bug 666446: lots of animated gifs swamp us with paint events + +

+
+ + +
+ +
+
+
+ + diff --git a/image/test/mochitest/test_synchronized_animation.html b/image/test/mochitest/test_synchronized_animation.html new file mode 100644 index 0000000000..3c2a874be1 --- /dev/null +++ b/image/test/mochitest/test_synchronized_animation.html @@ -0,0 +1,128 @@ + + + + + Test for Bug 867758 + + + + + + +Mozilla Bug 867758 +

+
+
+
+
+
+ + diff --git a/image/test/mochitest/test_undisplayed_iframe.html b/image/test/mochitest/test_undisplayed_iframe.html new file mode 100644 index 0000000000..695e4e5448 --- /dev/null +++ b/image/test/mochitest/test_undisplayed_iframe.html @@ -0,0 +1,47 @@ + + + + +Test for Bug 666446 - Test for Animated Gif within IFRAME + + + + + + + + + Mozilla Bug 666446: lots of animated gifs swamp us with paint events +

+ +
+ +
+ +
+ +
+
+
+
+ + diff --git a/image/test/mochitest/test_webcam.html b/image/test/mochitest/test_webcam.html new file mode 100644 index 0000000000..8d6bf6b490 --- /dev/null +++ b/image/test/mochitest/test_webcam.html @@ -0,0 +1,68 @@ + + + + + Test for Bug 641748 - WebCam Simulacrum + + + + + + + + +Mozilla Bug 641748: GIF decoder doesn't support multipart/x-mixed-replace + +

+ +
+
+
+ +
+
+ +
+
+
+
+ + diff --git a/image/test/mochitest/test_xultree_animation.xhtml b/image/test/mochitest/test_xultree_animation.xhtml new file mode 100644 index 0000000000..801117ed37 --- /dev/null +++ b/image/test/mochitest/test_xultree_animation.xhtml @@ -0,0 +1,67 @@ + + + + + Test for Bug 666446 - Animated Images within SVG Filters + + + + + + + + +Mozilla Bug 666446: lots of animated gifs swamp us with paint events + +

+
+ + +
+ + + + + + + + + + + + +
+ +
+
+
+ + diff --git a/image/test/mochitest/transparent.gif b/image/test/mochitest/transparent.gif new file mode 100644 index 0000000000..48f5c7caf1 Binary files /dev/null and b/image/test/mochitest/transparent.gif differ diff --git a/image/test/mochitest/transparent.png b/image/test/mochitest/transparent.png new file mode 100644 index 0000000000..fc8002053a Binary files /dev/null and b/image/test/mochitest/transparent.png differ diff --git a/image/test/mochitest/webcam-simulacrum.sjs b/image/test/mochitest/webcam-simulacrum.sjs new file mode 100644 index 0000000000..6243329eac --- /dev/null +++ b/image/test/mochitest/webcam-simulacrum.sjs @@ -0,0 +1,51 @@ +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ + */ + +var counter = 2; +var frames = ["red.gif", "blue.gif"]; +var timer = Cc["@mozilla.org/timer;1"]; +var partTimer = timer.createInstance(Ci.nsITimer); + +function getFileAsInputStream(aFilename) { + var file = Services.dirsvc.get("CurWorkD", Ci.nsIFile); + + file.append("tests"); + file.append("image"); + file.append("test"); + file.append("mochitest"); + file.append(aFilename); + + var fileStream = Cc[ + "@mozilla.org/network/file-input-stream;1" + ].createInstance(Ci.nsIFileInputStream); + fileStream.init(file, 1, 0, false); + return fileStream; +} + +function handleRequest(request, response) { + response.setHeader( + "Content-Type", + "multipart/x-mixed-replace;boundary=BOUNDARYOMG", + false + ); + response.setHeader("Cache-Control", "no-cache", false); + response.setStatusLine(request.httpVersion, 200, "OK"); + response.processAsync(); + response.write("--BOUNDARYOMG\r\n"); + while (frames.length) { + sendNextPart(response); + } + response.write("--BOUNDARYOMG--\r\n"); + response.finish(); +} + +function sendNextPart(response) { + var nextPartHead = "Content-Type: image/gif\r\n\r\n"; + var inputStream = getFileAsInputStream(frames.shift()); + response.bodyOutputStream.write(nextPartHead, nextPartHead.length); + response.bodyOutputStream.writeFrom(inputStream, inputStream.available()); + inputStream.close(); + // Toss in the boundary, so the browser can know this part is complete + response.write("--BOUNDARYOMG\r\n"); +} diff --git a/image/test/reftest/ImageDocument.css b/image/test/reftest/ImageDocument.css new file mode 100644 index 0000000000..b449810986 --- /dev/null +++ b/image/test/reftest/ImageDocument.css @@ -0,0 +1,16 @@ +body { + background-image: url("chrome://global/skin/media/imagedoc-darknoise.png"); + margin: 0; +} + +body > :first-child { + display: block; + position: absolute; + margin: auto; + top: 0; + right: 0; + bottom: 0; + left: 0; + background: hsl(0,0%,90%) url("chrome://global/skin/media/imagedoc-lightnoise.png"); + color: #222; +} diff --git a/image/test/reftest/apng/bug411852-1-ref.html b/image/test/reftest/apng/bug411852-1-ref.html new file mode 100644 index 0000000000..ce346c87ca --- /dev/null +++ b/image/test/reftest/apng/bug411852-1-ref.html @@ -0,0 +1,6 @@ + + + + + + diff --git a/image/test/reftest/apng/bug411852-1-ref.png b/image/test/reftest/apng/bug411852-1-ref.png new file mode 100644 index 0000000000..04b862a1d9 Binary files /dev/null and b/image/test/reftest/apng/bug411852-1-ref.png differ diff --git a/image/test/reftest/apng/bug411852-1.png b/image/test/reftest/apng/bug411852-1.png new file mode 100644 index 0000000000..643f87e176 Binary files /dev/null and b/image/test/reftest/apng/bug411852-1.png differ diff --git a/image/test/reftest/apng/bug546272-ref.html b/image/test/reftest/apng/bug546272-ref.html new file mode 100644 index 0000000000..43afef15e1 --- /dev/null +++ b/image/test/reftest/apng/bug546272-ref.html @@ -0,0 +1,6 @@ + + + + + + diff --git a/image/test/reftest/apng/bug546272-ref.png b/image/test/reftest/apng/bug546272-ref.png new file mode 100644 index 0000000000..85dfd8ccfd Binary files /dev/null and b/image/test/reftest/apng/bug546272-ref.png differ diff --git a/image/test/reftest/apng/bug546272.png b/image/test/reftest/apng/bug546272.png new file mode 100644 index 0000000000..5232d7f8f2 Binary files /dev/null and b/image/test/reftest/apng/bug546272.png differ diff --git a/image/test/reftest/apng/delaytest.html b/image/test/reftest/apng/delaytest.html new file mode 100644 index 0000000000..ee79254a2b --- /dev/null +++ b/image/test/reftest/apng/delaytest.html @@ -0,0 +1,58 @@ + + + +Delayed image reftest wrapper + + + + + + + diff --git a/image/test/reftest/apng/reftest.list b/image/test/reftest/apng/reftest.list new file mode 100644 index 0000000000..7ff6e561fe --- /dev/null +++ b/image/test/reftest/apng/reftest.list @@ -0,0 +1,6 @@ +# APNG tests +# +# delaytest.html delays the reftest snapshot to allow time for the +# animation to complete. +== delaytest.html?bug411852-1.png bug411852-1-ref.html +== delaytest.html?bug546272.png bug546272-ref.html diff --git a/image/test/reftest/avif/1-normal.avif b/image/test/reftest/avif/1-normal.avif new file mode 100644 index 0000000000..5cc9b295da Binary files /dev/null and b/image/test/reftest/avif/1-normal.avif differ diff --git a/image/test/reftest/avif/2-flipped-horizontally.avif b/image/test/reftest/avif/2-flipped-horizontally.avif new file mode 100644 index 0000000000..f79492f776 Binary files /dev/null and b/image/test/reftest/avif/2-flipped-horizontally.avif differ diff --git a/image/test/reftest/avif/3-rotated-180deg.avif b/image/test/reftest/avif/3-rotated-180deg.avif new file mode 100644 index 0000000000..ba8f4565fe Binary files /dev/null and b/image/test/reftest/avif/3-rotated-180deg.avif differ diff --git a/image/test/reftest/avif/4-flipped-vertically.avif b/image/test/reftest/avif/4-flipped-vertically.avif new file mode 100644 index 0000000000..77c2e651b8 Binary files /dev/null and b/image/test/reftest/avif/4-flipped-vertically.avif differ diff --git a/image/test/reftest/avif/5-rotated-90deg-CCW-and-flipped-vertically.avif b/image/test/reftest/avif/5-rotated-90deg-CCW-and-flipped-vertically.avif new file mode 100644 index 0000000000..4bfa631159 Binary files /dev/null and b/image/test/reftest/avif/5-rotated-90deg-CCW-and-flipped-vertically.avif differ diff --git a/image/test/reftest/avif/6-rotated-90deg-CCW.avif b/image/test/reftest/avif/6-rotated-90deg-CCW.avif new file mode 100644 index 0000000000..558356532e Binary files /dev/null and b/image/test/reftest/avif/6-rotated-90deg-CCW.avif differ diff --git a/image/test/reftest/avif/7-rotated-90deg-CW-and-flipped-vertically.avif b/image/test/reftest/avif/7-rotated-90deg-CW-and-flipped-vertically.avif new file mode 100644 index 0000000000..08495f620b Binary files /dev/null and b/image/test/reftest/avif/7-rotated-90deg-CW-and-flipped-vertically.avif differ diff --git a/image/test/reftest/avif/8-rotated-90deg-CW.avif b/image/test/reftest/avif/8-rotated-90deg-CW.avif new file mode 100644 index 0000000000..112bdac39e Binary files /dev/null and b/image/test/reftest/avif/8-rotated-90deg-CW.avif differ diff --git a/image/test/reftest/avif/img_irot0_imir0.avif b/image/test/reftest/avif/img_irot0_imir0.avif new file mode 100644 index 0000000000..95ddcf0003 Binary files /dev/null and b/image/test/reftest/avif/img_irot0_imir0.avif differ diff --git a/image/test/reftest/avif/img_irot0_imir1.avif b/image/test/reftest/avif/img_irot0_imir1.avif new file mode 100644 index 0000000000..7006cbd98a Binary files /dev/null and b/image/test/reftest/avif/img_irot0_imir1.avif differ diff --git a/image/test/reftest/avif/img_irot0_imirN.avif b/image/test/reftest/avif/img_irot0_imirN.avif new file mode 100644 index 0000000000..1455f67cd8 Binary files /dev/null and b/image/test/reftest/avif/img_irot0_imirN.avif differ diff --git a/image/test/reftest/avif/img_irot1_imir0.avif b/image/test/reftest/avif/img_irot1_imir0.avif new file mode 100644 index 0000000000..4069846f72 Binary files /dev/null and b/image/test/reftest/avif/img_irot1_imir0.avif differ diff --git a/image/test/reftest/avif/img_irot1_imir1.avif b/image/test/reftest/avif/img_irot1_imir1.avif new file mode 100644 index 0000000000..60f8b63739 Binary files /dev/null and b/image/test/reftest/avif/img_irot1_imir1.avif differ diff --git a/image/test/reftest/avif/img_irot1_imirN.avif b/image/test/reftest/avif/img_irot1_imirN.avif new file mode 100644 index 0000000000..141e46c5ae Binary files /dev/null and b/image/test/reftest/avif/img_irot1_imirN.avif differ diff --git a/image/test/reftest/avif/img_irot2_imir0.avif b/image/test/reftest/avif/img_irot2_imir0.avif new file mode 100644 index 0000000000..d241c6f3c0 Binary files /dev/null and b/image/test/reftest/avif/img_irot2_imir0.avif differ diff --git a/image/test/reftest/avif/img_irot2_imir1.avif b/image/test/reftest/avif/img_irot2_imir1.avif new file mode 100644 index 0000000000..4af2f57522 Binary files /dev/null and b/image/test/reftest/avif/img_irot2_imir1.avif differ diff --git a/image/test/reftest/avif/img_irot2_imirN.avif b/image/test/reftest/avif/img_irot2_imirN.avif new file mode 100644 index 0000000000..fc3595b672 Binary files /dev/null and b/image/test/reftest/avif/img_irot2_imirN.avif differ diff --git a/image/test/reftest/avif/img_irot3_imir0.avif b/image/test/reftest/avif/img_irot3_imir0.avif new file mode 100644 index 0000000000..f8c7c6b7a1 Binary files /dev/null and b/image/test/reftest/avif/img_irot3_imir0.avif differ diff --git a/image/test/reftest/avif/img_irot3_imir1.avif b/image/test/reftest/avif/img_irot3_imir1.avif new file mode 100644 index 0000000000..971587853b Binary files /dev/null and b/image/test/reftest/avif/img_irot3_imir1.avif differ diff --git a/image/test/reftest/avif/img_irot3_imirN.avif b/image/test/reftest/avif/img_irot3_imirN.avif new file mode 100644 index 0000000000..8235a2b0c2 Binary files /dev/null and b/image/test/reftest/avif/img_irot3_imirN.avif differ diff --git a/image/test/reftest/avif/img_irotN_imir0.avif b/image/test/reftest/avif/img_irotN_imir0.avif new file mode 100644 index 0000000000..163690ff71 Binary files /dev/null and b/image/test/reftest/avif/img_irotN_imir0.avif differ diff --git a/image/test/reftest/avif/img_irotN_imir1.avif b/image/test/reftest/avif/img_irotN_imir1.avif new file mode 100644 index 0000000000..9642b22411 Binary files /dev/null and b/image/test/reftest/avif/img_irotN_imir1.avif differ diff --git a/image/test/reftest/avif/img_irotN_imirN.avif b/image/test/reftest/avif/img_irotN_imirN.avif new file mode 100644 index 0000000000..5cc9b295da Binary files /dev/null and b/image/test/reftest/avif/img_irotN_imirN.avif differ diff --git a/image/test/reftest/avif/reftest.list b/image/test/reftest/avif/reftest.list new file mode 100644 index 0000000000..10dc2f2d82 --- /dev/null +++ b/image/test/reftest/avif/reftest.list @@ -0,0 +1,17 @@ +defaults pref(image.avif.enabled,true) pref(image.avif.apply_transforms,true) + +== img_irot0_imir1.avif 2-flipped-horizontally.avif +== img_irot0_imir0.avif 4-flipped-vertically.avif +== img_irot0_imirN.avif 1-normal.avif +== img_irot1_imir1.avif 7-rotated-90deg-CW-and-flipped-vertically.avif +== img_irot1_imir0.avif 5-rotated-90deg-CCW-and-flipped-vertically.avif +== img_irot1_imirN.avif 6-rotated-90deg-CCW.avif +== img_irot2_imir1.avif 4-flipped-vertically.avif +== img_irot2_imir0.avif 2-flipped-horizontally.avif +== img_irot2_imirN.avif 3-rotated-180deg.avif +== img_irot3_imir1.avif 5-rotated-90deg-CCW-and-flipped-vertically.avif +== img_irot3_imir0.avif 7-rotated-90deg-CW-and-flipped-vertically.avif +== img_irot3_imirN.avif 8-rotated-90deg-CW.avif +== img_irotN_imir1.avif 2-flipped-horizontally.avif +== img_irotN_imir0.avif 4-flipped-vertically.avif +== img_irotN_imirN.avif 1-normal.avif diff --git a/image/test/reftest/bmp/1240629-1.bmp b/image/test/reftest/bmp/1240629-1.bmp new file mode 100644 index 0000000000..604d248e74 Binary files /dev/null and b/image/test/reftest/bmp/1240629-1.bmp differ diff --git a/image/test/reftest/bmp/1240629-2.bmp b/image/test/reftest/bmp/1240629-2.bmp new file mode 100644 index 0000000000..e4fe80d595 Binary files /dev/null and b/image/test/reftest/bmp/1240629-2.bmp differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-not-square-1bpp.bmp b/image/test/reftest/bmp/bmp-1bpp/bmp-not-square-1bpp.bmp new file mode 100644 index 0000000000..302e0c7120 Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-not-square-1bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-not-square-1bpp.png b/image/test/reftest/bmp/bmp-1bpp/bmp-not-square-1bpp.png new file mode 100644 index 0000000000..f9318693db Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-not-square-1bpp.png differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-15x15-1bpp.bmp b/image/test/reftest/bmp/bmp-1bpp/bmp-size-15x15-1bpp.bmp new file mode 100644 index 0000000000..e769ff864c Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-15x15-1bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-15x15-1bpp.png b/image/test/reftest/bmp/bmp-1bpp/bmp-size-15x15-1bpp.png new file mode 100644 index 0000000000..956c78ece6 Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-15x15-1bpp.png differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-16x16-1bpp.bmp b/image/test/reftest/bmp/bmp-1bpp/bmp-size-16x16-1bpp.bmp new file mode 100644 index 0000000000..ff012d98c5 Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-16x16-1bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-16x16-1bpp.png b/image/test/reftest/bmp/bmp-1bpp/bmp-size-16x16-1bpp.png new file mode 100644 index 0000000000..90088351fa Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-16x16-1bpp.png differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-17x17-1bpp.bmp b/image/test/reftest/bmp/bmp-1bpp/bmp-size-17x17-1bpp.bmp new file mode 100644 index 0000000000..86f56476e9 Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-17x17-1bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-17x17-1bpp.png b/image/test/reftest/bmp/bmp-1bpp/bmp-size-17x17-1bpp.png new file mode 100644 index 0000000000..9a294696c4 Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-17x17-1bpp.png differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-1x1-1bpp.bmp b/image/test/reftest/bmp/bmp-1bpp/bmp-size-1x1-1bpp.bmp new file mode 100644 index 0000000000..0f98654d84 Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-1x1-1bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-1x1-1bpp.ico b/image/test/reftest/bmp/bmp-1bpp/bmp-size-1x1-1bpp.ico new file mode 100644 index 0000000000..5af8bef61a Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-1x1-1bpp.ico differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-1x1-1bpp.png b/image/test/reftest/bmp/bmp-1bpp/bmp-size-1x1-1bpp.png new file mode 100644 index 0000000000..7a07a124ea Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-1x1-1bpp.png differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-2x2-1bpp.bmp b/image/test/reftest/bmp/bmp-1bpp/bmp-size-2x2-1bpp.bmp new file mode 100644 index 0000000000..5544c6437a Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-2x2-1bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-2x2-1bpp.png b/image/test/reftest/bmp/bmp-1bpp/bmp-size-2x2-1bpp.png new file mode 100644 index 0000000000..3b09f80769 Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-2x2-1bpp.png differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-31x31-1bpp.bmp b/image/test/reftest/bmp/bmp-1bpp/bmp-size-31x31-1bpp.bmp new file mode 100644 index 0000000000..8afcc56cc4 Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-31x31-1bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-31x31-1bpp.png b/image/test/reftest/bmp/bmp-1bpp/bmp-size-31x31-1bpp.png new file mode 100644 index 0000000000..d1fe6ddeee Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-31x31-1bpp.png differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-32x32-1bpp.bmp b/image/test/reftest/bmp/bmp-1bpp/bmp-size-32x32-1bpp.bmp new file mode 100644 index 0000000000..255e5526c7 Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-32x32-1bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-32x32-1bpp.png b/image/test/reftest/bmp/bmp-1bpp/bmp-size-32x32-1bpp.png new file mode 100644 index 0000000000..078d3dc5d0 Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-32x32-1bpp.png differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-33x33-1bpp.bmp b/image/test/reftest/bmp/bmp-1bpp/bmp-size-33x33-1bpp.bmp new file mode 100644 index 0000000000..6d752a2e1d Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-33x33-1bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-33x33-1bpp.png b/image/test/reftest/bmp/bmp-1bpp/bmp-size-33x33-1bpp.png new file mode 100644 index 0000000000..e64e12b2aa Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-33x33-1bpp.png differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-3x3-1bpp.bmp b/image/test/reftest/bmp/bmp-1bpp/bmp-size-3x3-1bpp.bmp new file mode 100644 index 0000000000..d4f885687d Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-3x3-1bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-3x3-1bpp.png b/image/test/reftest/bmp/bmp-1bpp/bmp-size-3x3-1bpp.png new file mode 100644 index 0000000000..b8519a8749 Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-3x3-1bpp.png differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-4x4-1bpp.bmp b/image/test/reftest/bmp/bmp-1bpp/bmp-size-4x4-1bpp.bmp new file mode 100644 index 0000000000..c0b9128feb Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-4x4-1bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-4x4-1bpp.png b/image/test/reftest/bmp/bmp-1bpp/bmp-size-4x4-1bpp.png new file mode 100644 index 0000000000..3977b54548 Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-4x4-1bpp.png differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-5x5-1bpp.bmp b/image/test/reftest/bmp/bmp-1bpp/bmp-size-5x5-1bpp.bmp new file mode 100644 index 0000000000..c02b2288d7 Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-5x5-1bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-5x5-1bpp.png b/image/test/reftest/bmp/bmp-1bpp/bmp-size-5x5-1bpp.png new file mode 100644 index 0000000000..caa9246b67 Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-5x5-1bpp.png differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-6x6-1bpp.bmp b/image/test/reftest/bmp/bmp-1bpp/bmp-size-6x6-1bpp.bmp new file mode 100644 index 0000000000..64415c6ecb Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-6x6-1bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-6x6-1bpp.png b/image/test/reftest/bmp/bmp-1bpp/bmp-size-6x6-1bpp.png new file mode 100644 index 0000000000..30e1b0249d Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-6x6-1bpp.png differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-7x7-1bpp.bmp b/image/test/reftest/bmp/bmp-1bpp/bmp-size-7x7-1bpp.bmp new file mode 100644 index 0000000000..d8e867a0d8 Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-7x7-1bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-7x7-1bpp.png b/image/test/reftest/bmp/bmp-1bpp/bmp-size-7x7-1bpp.png new file mode 100644 index 0000000000..9dbaae84cb Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-7x7-1bpp.png differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-8x8-1bpp.bmp b/image/test/reftest/bmp/bmp-1bpp/bmp-size-8x8-1bpp.bmp new file mode 100644 index 0000000000..207e84f80e Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-8x8-1bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-8x8-1bpp.png b/image/test/reftest/bmp/bmp-1bpp/bmp-size-8x8-1bpp.png new file mode 100644 index 0000000000..2201388408 Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-8x8-1bpp.png differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-9x9-1bpp.bmp b/image/test/reftest/bmp/bmp-1bpp/bmp-size-9x9-1bpp.bmp new file mode 100644 index 0000000000..871eb7c0f3 Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-9x9-1bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-1bpp/bmp-size-9x9-1bpp.png b/image/test/reftest/bmp/bmp-1bpp/bmp-size-9x9-1bpp.png new file mode 100644 index 0000000000..7fe1b548b8 Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/bmp-size-9x9-1bpp.png differ diff --git a/image/test/reftest/bmp/bmp-1bpp/os2bmp-size-32x32-1bpp.bmp b/image/test/reftest/bmp/bmp-1bpp/os2bmp-size-32x32-1bpp.bmp new file mode 100644 index 0000000000..32bfc5e8f9 Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/os2bmp-size-32x32-1bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-1bpp/reftest.list b/image/test/reftest/bmp/bmp-1bpp/reftest.list new file mode 100644 index 0000000000..15274c2bc8 --- /dev/null +++ b/image/test/reftest/bmp/bmp-1bpp/reftest.list @@ -0,0 +1,21 @@ +# BMP 1BPP tests + +# Images of various sizes +== bmp-size-1x1-1bpp.bmp bmp-size-1x1-1bpp.png +== bmp-size-2x2-1bpp.bmp bmp-size-2x2-1bpp.png +== bmp-size-3x3-1bpp.bmp bmp-size-3x3-1bpp.png +== bmp-size-4x4-1bpp.bmp bmp-size-4x4-1bpp.png +== bmp-size-5x5-1bpp.bmp bmp-size-5x5-1bpp.png +== bmp-size-6x6-1bpp.bmp bmp-size-6x6-1bpp.png +== bmp-size-7x7-1bpp.bmp bmp-size-7x7-1bpp.png +== bmp-size-8x8-1bpp.bmp bmp-size-8x8-1bpp.png +== bmp-size-9x9-1bpp.bmp bmp-size-9x9-1bpp.png +== bmp-size-15x15-1bpp.bmp bmp-size-15x15-1bpp.png +== bmp-size-16x16-1bpp.bmp bmp-size-16x16-1bpp.png +== bmp-size-17x17-1bpp.bmp bmp-size-17x17-1bpp.png +== bmp-size-31x31-1bpp.bmp bmp-size-31x31-1bpp.png +== bmp-size-32x32-1bpp.bmp bmp-size-32x32-1bpp.png +== bmp-size-33x33-1bpp.bmp bmp-size-33x33-1bpp.png +== bmp-not-square-1bpp.bmp bmp-not-square-1bpp.png +== os2bmp-size-32x32-1bpp.bmp bmp-size-32x32-1bpp.png +== top-to-bottom-16x16-1bpp.bmp bmp-size-16x16-1bpp.png diff --git a/image/test/reftest/bmp/bmp-1bpp/top-to-bottom-16x16-1bpp.bmp b/image/test/reftest/bmp/bmp-1bpp/top-to-bottom-16x16-1bpp.bmp new file mode 100644 index 0000000000..8633ef2aaa Binary files /dev/null and b/image/test/reftest/bmp/bmp-1bpp/top-to-bottom-16x16-1bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-not-square-24bpp.bmp b/image/test/reftest/bmp/bmp-24bpp/bmp-not-square-24bpp.bmp new file mode 100644 index 0000000000..9d1f4de2cd Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-not-square-24bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-not-square-24bpp.png b/image/test/reftest/bmp/bmp-24bpp/bmp-not-square-24bpp.png new file mode 100644 index 0000000000..9b0d160815 Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-not-square-24bpp.png differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-15x15-24bpp.bmp b/image/test/reftest/bmp/bmp-24bpp/bmp-size-15x15-24bpp.bmp new file mode 100644 index 0000000000..ba029510b3 Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-15x15-24bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-15x15-24bpp.png b/image/test/reftest/bmp/bmp-24bpp/bmp-size-15x15-24bpp.png new file mode 100644 index 0000000000..e1287430d0 Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-15x15-24bpp.png differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-16x16-24bpp.bmp b/image/test/reftest/bmp/bmp-24bpp/bmp-size-16x16-24bpp.bmp new file mode 100644 index 0000000000..f35d706692 Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-16x16-24bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-16x16-24bpp.png b/image/test/reftest/bmp/bmp-24bpp/bmp-size-16x16-24bpp.png new file mode 100644 index 0000000000..c04869e728 Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-16x16-24bpp.png differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-17x17-24bpp.bmp b/image/test/reftest/bmp/bmp-24bpp/bmp-size-17x17-24bpp.bmp new file mode 100644 index 0000000000..fc576c4980 Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-17x17-24bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-17x17-24bpp.png b/image/test/reftest/bmp/bmp-24bpp/bmp-size-17x17-24bpp.png new file mode 100644 index 0000000000..00fb8e4f37 Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-17x17-24bpp.png differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-1x1-24bpp.bmp b/image/test/reftest/bmp/bmp-24bpp/bmp-size-1x1-24bpp.bmp new file mode 100644 index 0000000000..db790d50c0 Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-1x1-24bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-1x1-24bpp.png b/image/test/reftest/bmp/bmp-24bpp/bmp-size-1x1-24bpp.png new file mode 100644 index 0000000000..c05f5fef89 Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-1x1-24bpp.png differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-2x2-24bpp.bmp b/image/test/reftest/bmp/bmp-24bpp/bmp-size-2x2-24bpp.bmp new file mode 100644 index 0000000000..19bff3d010 Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-2x2-24bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-2x2-24bpp.png b/image/test/reftest/bmp/bmp-24bpp/bmp-size-2x2-24bpp.png new file mode 100644 index 0000000000..e512d3f9b4 Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-2x2-24bpp.png differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-31x31-24bpp.bmp b/image/test/reftest/bmp/bmp-24bpp/bmp-size-31x31-24bpp.bmp new file mode 100644 index 0000000000..da11048cb0 Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-31x31-24bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-31x31-24bpp.png b/image/test/reftest/bmp/bmp-24bpp/bmp-size-31x31-24bpp.png new file mode 100644 index 0000000000..e4a8642514 Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-31x31-24bpp.png differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-32x32-24bpp.bmp b/image/test/reftest/bmp/bmp-24bpp/bmp-size-32x32-24bpp.bmp new file mode 100644 index 0000000000..e1631e5fdb Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-32x32-24bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-32x32-24bpp.png b/image/test/reftest/bmp/bmp-24bpp/bmp-size-32x32-24bpp.png new file mode 100644 index 0000000000..3a6fbe8ee9 Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-32x32-24bpp.png differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-33x33-24bpp.bmp b/image/test/reftest/bmp/bmp-24bpp/bmp-size-33x33-24bpp.bmp new file mode 100644 index 0000000000..d228cf0635 Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-33x33-24bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-33x33-24bpp.png b/image/test/reftest/bmp/bmp-24bpp/bmp-size-33x33-24bpp.png new file mode 100644 index 0000000000..72ef7eb636 Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-33x33-24bpp.png differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-3x3-24bpp.bmp b/image/test/reftest/bmp/bmp-24bpp/bmp-size-3x3-24bpp.bmp new file mode 100644 index 0000000000..f353f9b6d3 Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-3x3-24bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-3x3-24bpp.png b/image/test/reftest/bmp/bmp-24bpp/bmp-size-3x3-24bpp.png new file mode 100644 index 0000000000..cb42ec4f87 Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-3x3-24bpp.png differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-4x4-24bpp.bmp b/image/test/reftest/bmp/bmp-24bpp/bmp-size-4x4-24bpp.bmp new file mode 100644 index 0000000000..2373435f48 Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-4x4-24bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-4x4-24bpp.png b/image/test/reftest/bmp/bmp-24bpp/bmp-size-4x4-24bpp.png new file mode 100644 index 0000000000..e6afafd89a Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-4x4-24bpp.png differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-5x5-24bpp.bmp b/image/test/reftest/bmp/bmp-24bpp/bmp-size-5x5-24bpp.bmp new file mode 100644 index 0000000000..a3016fc1ab Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-5x5-24bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-5x5-24bpp.png b/image/test/reftest/bmp/bmp-24bpp/bmp-size-5x5-24bpp.png new file mode 100644 index 0000000000..a844aff76d Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-5x5-24bpp.png differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-6x6-24bpp.bmp b/image/test/reftest/bmp/bmp-24bpp/bmp-size-6x6-24bpp.bmp new file mode 100644 index 0000000000..cba1d62cc7 Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-6x6-24bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-6x6-24bpp.png b/image/test/reftest/bmp/bmp-24bpp/bmp-size-6x6-24bpp.png new file mode 100644 index 0000000000..415c2d9c6a Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-6x6-24bpp.png differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-7x7-24bpp.bmp b/image/test/reftest/bmp/bmp-24bpp/bmp-size-7x7-24bpp.bmp new file mode 100644 index 0000000000..87cd419b40 Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-7x7-24bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-7x7-24bpp.png b/image/test/reftest/bmp/bmp-24bpp/bmp-size-7x7-24bpp.png new file mode 100644 index 0000000000..ab2f892747 Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-7x7-24bpp.png differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-8x8-24bpp.bmp b/image/test/reftest/bmp/bmp-24bpp/bmp-size-8x8-24bpp.bmp new file mode 100644 index 0000000000..b6f108a044 Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-8x8-24bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-8x8-24bpp.png b/image/test/reftest/bmp/bmp-24bpp/bmp-size-8x8-24bpp.png new file mode 100644 index 0000000000..fe2ff40a1d Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-8x8-24bpp.png differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-9x9-24bpp.bmp b/image/test/reftest/bmp/bmp-24bpp/bmp-size-9x9-24bpp.bmp new file mode 100644 index 0000000000..8140b1905b Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-9x9-24bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-24bpp/bmp-size-9x9-24bpp.png b/image/test/reftest/bmp/bmp-24bpp/bmp-size-9x9-24bpp.png new file mode 100644 index 0000000000..18ab4b25de Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/bmp-size-9x9-24bpp.png differ diff --git a/image/test/reftest/bmp/bmp-24bpp/os2bmp-size-32x32-24bpp.bmp b/image/test/reftest/bmp/bmp-24bpp/os2bmp-size-32x32-24bpp.bmp new file mode 100644 index 0000000000..b75ae62ca8 Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/os2bmp-size-32x32-24bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-24bpp/reftest.list b/image/test/reftest/bmp/bmp-24bpp/reftest.list new file mode 100644 index 0000000000..83ec17563b --- /dev/null +++ b/image/test/reftest/bmp/bmp-24bpp/reftest.list @@ -0,0 +1,21 @@ +# BMP 24BPP tests + +# Images of various sizes +== bmp-size-1x1-24bpp.bmp bmp-size-1x1-24bpp.png +== bmp-size-2x2-24bpp.bmp bmp-size-2x2-24bpp.png +== bmp-size-3x3-24bpp.bmp bmp-size-3x3-24bpp.png +== bmp-size-4x4-24bpp.bmp bmp-size-4x4-24bpp.png +== bmp-size-5x5-24bpp.bmp bmp-size-5x5-24bpp.png +== bmp-size-6x6-24bpp.bmp bmp-size-6x6-24bpp.png +== bmp-size-7x7-24bpp.bmp bmp-size-7x7-24bpp.png +== bmp-size-8x8-24bpp.bmp bmp-size-8x8-24bpp.png +== bmp-size-9x9-24bpp.bmp bmp-size-9x9-24bpp.png +== bmp-size-15x15-24bpp.bmp bmp-size-15x15-24bpp.png +== bmp-size-16x16-24bpp.bmp bmp-size-16x16-24bpp.png +== bmp-size-17x17-24bpp.bmp bmp-size-17x17-24bpp.png +== bmp-size-31x31-24bpp.bmp bmp-size-31x31-24bpp.png +== bmp-size-32x32-24bpp.bmp bmp-size-32x32-24bpp.png +== bmp-size-33x33-24bpp.bmp bmp-size-33x33-24bpp.png +== bmp-not-square-24bpp.bmp bmp-not-square-24bpp.png +== os2bmp-size-32x32-24bpp.bmp bmp-size-32x32-24bpp.png +== top-to-bottom-16x16-24bpp.bmp bmp-size-16x16-24bpp.png diff --git a/image/test/reftest/bmp/bmp-24bpp/top-to-bottom-16x16-24bpp.bmp b/image/test/reftest/bmp/bmp-24bpp/top-to-bottom-16x16-24bpp.bmp new file mode 100644 index 0000000000..bd18f85d48 Binary files /dev/null and b/image/test/reftest/bmp/bmp-24bpp/top-to-bottom-16x16-24bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-not-square-4bpp.bmp b/image/test/reftest/bmp/bmp-4bpp/bmp-not-square-4bpp.bmp new file mode 100644 index 0000000000..f63dd81bde Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-not-square-4bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-not-square-4bpp.png b/image/test/reftest/bmp/bmp-4bpp/bmp-not-square-4bpp.png new file mode 100644 index 0000000000..7c713c557c Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-not-square-4bpp.png differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-15x15-4bpp.bmp b/image/test/reftest/bmp/bmp-4bpp/bmp-size-15x15-4bpp.bmp new file mode 100644 index 0000000000..8b586dbfd6 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-15x15-4bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-15x15-4bpp.png b/image/test/reftest/bmp/bmp-4bpp/bmp-size-15x15-4bpp.png new file mode 100644 index 0000000000..5d4a3f9534 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-15x15-4bpp.png differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-16x16-4bpp.bmp b/image/test/reftest/bmp/bmp-4bpp/bmp-size-16x16-4bpp.bmp new file mode 100644 index 0000000000..eae432e656 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-16x16-4bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-16x16-4bpp.png b/image/test/reftest/bmp/bmp-4bpp/bmp-size-16x16-4bpp.png new file mode 100644 index 0000000000..d45d63f539 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-16x16-4bpp.png differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-17x17-4bpp.bmp b/image/test/reftest/bmp/bmp-4bpp/bmp-size-17x17-4bpp.bmp new file mode 100644 index 0000000000..5880c6111c Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-17x17-4bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-17x17-4bpp.png b/image/test/reftest/bmp/bmp-4bpp/bmp-size-17x17-4bpp.png new file mode 100644 index 0000000000..bf48903299 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-17x17-4bpp.png differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-1x1-4bpp.bmp b/image/test/reftest/bmp/bmp-4bpp/bmp-size-1x1-4bpp.bmp new file mode 100644 index 0000000000..2ba68a3913 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-1x1-4bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-1x1-4bpp.png b/image/test/reftest/bmp/bmp-4bpp/bmp-size-1x1-4bpp.png new file mode 100644 index 0000000000..d41dd645b7 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-1x1-4bpp.png differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-2x2-4bpp.bmp b/image/test/reftest/bmp/bmp-4bpp/bmp-size-2x2-4bpp.bmp new file mode 100644 index 0000000000..6c6383aa80 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-2x2-4bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-2x2-4bpp.png b/image/test/reftest/bmp/bmp-4bpp/bmp-size-2x2-4bpp.png new file mode 100644 index 0000000000..b2d6050415 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-2x2-4bpp.png differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-31x31-4bpp.bmp b/image/test/reftest/bmp/bmp-4bpp/bmp-size-31x31-4bpp.bmp new file mode 100644 index 0000000000..ac440a6d8d Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-31x31-4bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-31x31-4bpp.png b/image/test/reftest/bmp/bmp-4bpp/bmp-size-31x31-4bpp.png new file mode 100644 index 0000000000..cb12a3448d Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-31x31-4bpp.png differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-32x32-4bpp.bmp b/image/test/reftest/bmp/bmp-4bpp/bmp-size-32x32-4bpp.bmp new file mode 100644 index 0000000000..e4383c473a Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-32x32-4bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-32x32-4bpp.png b/image/test/reftest/bmp/bmp-4bpp/bmp-size-32x32-4bpp.png new file mode 100644 index 0000000000..58d867d120 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-32x32-4bpp.png differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-33x33-4bpp.bmp b/image/test/reftest/bmp/bmp-4bpp/bmp-size-33x33-4bpp.bmp new file mode 100644 index 0000000000..04b2c1d1fd Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-33x33-4bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-33x33-4bpp.png b/image/test/reftest/bmp/bmp-4bpp/bmp-size-33x33-4bpp.png new file mode 100644 index 0000000000..064fde198c Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-33x33-4bpp.png differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-3x3-4bpp.bmp b/image/test/reftest/bmp/bmp-4bpp/bmp-size-3x3-4bpp.bmp new file mode 100644 index 0000000000..179dbcfa59 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-3x3-4bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-3x3-4bpp.png b/image/test/reftest/bmp/bmp-4bpp/bmp-size-3x3-4bpp.png new file mode 100644 index 0000000000..e34114d5c9 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-3x3-4bpp.png differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-4x4-4bpp.bmp b/image/test/reftest/bmp/bmp-4bpp/bmp-size-4x4-4bpp.bmp new file mode 100644 index 0000000000..0f57e102e2 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-4x4-4bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-4x4-4bpp.png b/image/test/reftest/bmp/bmp-4bpp/bmp-size-4x4-4bpp.png new file mode 100644 index 0000000000..3efa555620 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-4x4-4bpp.png differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-5x5-4bpp.bmp b/image/test/reftest/bmp/bmp-4bpp/bmp-size-5x5-4bpp.bmp new file mode 100644 index 0000000000..a4efe66601 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-5x5-4bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-5x5-4bpp.png b/image/test/reftest/bmp/bmp-4bpp/bmp-size-5x5-4bpp.png new file mode 100644 index 0000000000..02ebf57a51 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-5x5-4bpp.png differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-6x6-4bpp.bmp b/image/test/reftest/bmp/bmp-4bpp/bmp-size-6x6-4bpp.bmp new file mode 100644 index 0000000000..f4e1a29185 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-6x6-4bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-6x6-4bpp.png b/image/test/reftest/bmp/bmp-4bpp/bmp-size-6x6-4bpp.png new file mode 100644 index 0000000000..1f5769d09c Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-6x6-4bpp.png differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-7x7-4bpp.bmp b/image/test/reftest/bmp/bmp-4bpp/bmp-size-7x7-4bpp.bmp new file mode 100644 index 0000000000..e7ee1cf20a Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-7x7-4bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-7x7-4bpp.png b/image/test/reftest/bmp/bmp-4bpp/bmp-size-7x7-4bpp.png new file mode 100644 index 0000000000..59a1b98b52 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-7x7-4bpp.png differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-8x8-4bpp.bmp b/image/test/reftest/bmp/bmp-4bpp/bmp-size-8x8-4bpp.bmp new file mode 100644 index 0000000000..aa6959baf5 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-8x8-4bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-8x8-4bpp.png b/image/test/reftest/bmp/bmp-4bpp/bmp-size-8x8-4bpp.png new file mode 100644 index 0000000000..cf44f59676 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-8x8-4bpp.png differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-9x9-4bpp.bmp b/image/test/reftest/bmp/bmp-4bpp/bmp-size-9x9-4bpp.bmp new file mode 100644 index 0000000000..65ec12a376 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-9x9-4bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-4bpp/bmp-size-9x9-4bpp.png b/image/test/reftest/bmp/bmp-4bpp/bmp-size-9x9-4bpp.png new file mode 100644 index 0000000000..2e07364135 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/bmp-size-9x9-4bpp.png differ diff --git a/image/test/reftest/bmp/bmp-4bpp/os2bmp-size-32x32-4bpp.bmp b/image/test/reftest/bmp/bmp-4bpp/os2bmp-size-32x32-4bpp.bmp new file mode 100644 index 0000000000..08fc30d5fc Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/os2bmp-size-32x32-4bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-4bpp/reftest.list b/image/test/reftest/bmp/bmp-4bpp/reftest.list new file mode 100644 index 0000000000..4a1785e86f --- /dev/null +++ b/image/test/reftest/bmp/bmp-4bpp/reftest.list @@ -0,0 +1,24 @@ +# BMP 4BPP tests + +# Images of various sizes +== bmp-size-1x1-4bpp.bmp bmp-size-1x1-4bpp.png +== bmp-size-2x2-4bpp.bmp bmp-size-2x2-4bpp.png +== bmp-size-3x3-4bpp.bmp bmp-size-3x3-4bpp.png +== bmp-size-4x4-4bpp.bmp bmp-size-4x4-4bpp.png +== bmp-size-5x5-4bpp.bmp bmp-size-5x5-4bpp.png +== bmp-size-6x6-4bpp.bmp bmp-size-6x6-4bpp.png +== bmp-size-7x7-4bpp.bmp bmp-size-7x7-4bpp.png +== bmp-size-8x8-4bpp.bmp bmp-size-8x8-4bpp.png +== bmp-size-9x9-4bpp.bmp bmp-size-9x9-4bpp.png +== bmp-size-15x15-4bpp.bmp bmp-size-15x15-4bpp.png +== bmp-size-16x16-4bpp.bmp bmp-size-16x16-4bpp.png +== bmp-size-17x17-4bpp.bmp bmp-size-17x17-4bpp.png +== bmp-size-31x31-4bpp.bmp bmp-size-31x31-4bpp.png +== bmp-size-32x32-4bpp.bmp bmp-size-32x32-4bpp.png +== bmp-size-33x33-4bpp.bmp bmp-size-33x33-4bpp.png +== bmp-not-square-4bpp.bmp bmp-not-square-4bpp.png +== os2bmp-size-32x32-4bpp.bmp bmp-size-32x32-4bpp.png +== top-to-bottom-16x16-4bpp.bmp bmp-size-16x16-4bpp.png +# test that delta skips are drawn as transparent +# taken from http://bmptestsuite.sourceforge.net/ +== rle4-delta-320x240.bmp rle4-delta-320x240.png diff --git a/image/test/reftest/bmp/bmp-4bpp/rle4-delta-320x240.bmp b/image/test/reftest/bmp/bmp-4bpp/rle4-delta-320x240.bmp new file mode 100644 index 0000000000..78a0927870 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/rle4-delta-320x240.bmp differ diff --git a/image/test/reftest/bmp/bmp-4bpp/rle4-delta-320x240.png b/image/test/reftest/bmp/bmp-4bpp/rle4-delta-320x240.png new file mode 100644 index 0000000000..f9a3ceae23 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/rle4-delta-320x240.png differ diff --git a/image/test/reftest/bmp/bmp-4bpp/top-to-bottom-16x16-4bpp.bmp b/image/test/reftest/bmp/bmp-4bpp/top-to-bottom-16x16-4bpp.bmp new file mode 100644 index 0000000000..c77696b325 Binary files /dev/null and b/image/test/reftest/bmp/bmp-4bpp/top-to-bottom-16x16-4bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-extrapad-8bpp.png b/image/test/reftest/bmp/bmp-8bpp/bmp-extrapad-8bpp.png new file mode 100644 index 0000000000..827de11a52 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-extrapad-8bpp.png differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-not-square-8bpp.bmp b/image/test/reftest/bmp/bmp-8bpp/bmp-not-square-8bpp.bmp new file mode 100644 index 0000000000..d7a99164c2 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-not-square-8bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-not-square-8bpp.png b/image/test/reftest/bmp/bmp-8bpp/bmp-not-square-8bpp.png new file mode 100644 index 0000000000..be45f19d50 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-not-square-8bpp.png differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-15x15-8bpp.bmp b/image/test/reftest/bmp/bmp-8bpp/bmp-size-15x15-8bpp.bmp new file mode 100644 index 0000000000..8dac8ec86c Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-15x15-8bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-15x15-8bpp.png b/image/test/reftest/bmp/bmp-8bpp/bmp-size-15x15-8bpp.png new file mode 100644 index 0000000000..ce00553055 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-15x15-8bpp.png differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-16x16-8bpp.bmp b/image/test/reftest/bmp/bmp-8bpp/bmp-size-16x16-8bpp.bmp new file mode 100644 index 0000000000..bb60249ac8 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-16x16-8bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-16x16-8bpp.png b/image/test/reftest/bmp/bmp-8bpp/bmp-size-16x16-8bpp.png new file mode 100644 index 0000000000..6a2394618f Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-16x16-8bpp.png differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-17x17-8bpp.bmp b/image/test/reftest/bmp/bmp-8bpp/bmp-size-17x17-8bpp.bmp new file mode 100644 index 0000000000..b817888510 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-17x17-8bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-17x17-8bpp.png b/image/test/reftest/bmp/bmp-8bpp/bmp-size-17x17-8bpp.png new file mode 100644 index 0000000000..494cd96cd6 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-17x17-8bpp.png differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-1x1-8bpp.bmp b/image/test/reftest/bmp/bmp-8bpp/bmp-size-1x1-8bpp.bmp new file mode 100644 index 0000000000..9f3ef5136b Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-1x1-8bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-1x1-8bpp.png b/image/test/reftest/bmp/bmp-8bpp/bmp-size-1x1-8bpp.png new file mode 100644 index 0000000000..a7553a73f7 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-1x1-8bpp.png differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-2x2-8bpp.bmp b/image/test/reftest/bmp/bmp-8bpp/bmp-size-2x2-8bpp.bmp new file mode 100644 index 0000000000..63d3f1c058 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-2x2-8bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-2x2-8bpp.png b/image/test/reftest/bmp/bmp-8bpp/bmp-size-2x2-8bpp.png new file mode 100644 index 0000000000..17257e9924 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-2x2-8bpp.png differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-31x31-8bpp.bmp b/image/test/reftest/bmp/bmp-8bpp/bmp-size-31x31-8bpp.bmp new file mode 100644 index 0000000000..e4fd01fe0d Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-31x31-8bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-31x31-8bpp.png b/image/test/reftest/bmp/bmp-8bpp/bmp-size-31x31-8bpp.png new file mode 100644 index 0000000000..d43ac83900 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-31x31-8bpp.png differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-32x32-8bpp.bmp b/image/test/reftest/bmp/bmp-8bpp/bmp-size-32x32-8bpp.bmp new file mode 100644 index 0000000000..d2f800d673 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-32x32-8bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-32x32-8bpp.png b/image/test/reftest/bmp/bmp-8bpp/bmp-size-32x32-8bpp.png new file mode 100644 index 0000000000..03642849aa Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-32x32-8bpp.png differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-33x33-8bpp.bmp b/image/test/reftest/bmp/bmp-8bpp/bmp-size-33x33-8bpp.bmp new file mode 100644 index 0000000000..19b0744dbf Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-33x33-8bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-33x33-8bpp.png b/image/test/reftest/bmp/bmp-8bpp/bmp-size-33x33-8bpp.png new file mode 100644 index 0000000000..078b56df0d Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-33x33-8bpp.png differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-3x3-8bpp.bmp b/image/test/reftest/bmp/bmp-8bpp/bmp-size-3x3-8bpp.bmp new file mode 100644 index 0000000000..9f15f35831 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-3x3-8bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-3x3-8bpp.png b/image/test/reftest/bmp/bmp-8bpp/bmp-size-3x3-8bpp.png new file mode 100644 index 0000000000..ba34b2601b Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-3x3-8bpp.png differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-4x4-8bpp.bmp b/image/test/reftest/bmp/bmp-8bpp/bmp-size-4x4-8bpp.bmp new file mode 100644 index 0000000000..1ad7a8de11 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-4x4-8bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-4x4-8bpp.png b/image/test/reftest/bmp/bmp-8bpp/bmp-size-4x4-8bpp.png new file mode 100644 index 0000000000..ecf9e5e795 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-4x4-8bpp.png differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-5x5-8bpp.bmp b/image/test/reftest/bmp/bmp-8bpp/bmp-size-5x5-8bpp.bmp new file mode 100644 index 0000000000..6eb759d061 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-5x5-8bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-5x5-8bpp.png b/image/test/reftest/bmp/bmp-8bpp/bmp-size-5x5-8bpp.png new file mode 100644 index 0000000000..1a440a16bd Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-5x5-8bpp.png differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-6x6-8bpp.bmp b/image/test/reftest/bmp/bmp-8bpp/bmp-size-6x6-8bpp.bmp new file mode 100644 index 0000000000..a1e0e2415a Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-6x6-8bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-6x6-8bpp.png b/image/test/reftest/bmp/bmp-8bpp/bmp-size-6x6-8bpp.png new file mode 100644 index 0000000000..e0ac1a8f6d Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-6x6-8bpp.png differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-7x7-8bpp.bmp b/image/test/reftest/bmp/bmp-8bpp/bmp-size-7x7-8bpp.bmp new file mode 100644 index 0000000000..25c59d7350 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-7x7-8bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-7x7-8bpp.png b/image/test/reftest/bmp/bmp-8bpp/bmp-size-7x7-8bpp.png new file mode 100644 index 0000000000..51c7642656 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-7x7-8bpp.png differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-8x8-8bpp.bmp b/image/test/reftest/bmp/bmp-8bpp/bmp-size-8x8-8bpp.bmp new file mode 100644 index 0000000000..ff5b7681c8 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-8x8-8bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-8x8-8bpp.png b/image/test/reftest/bmp/bmp-8bpp/bmp-size-8x8-8bpp.png new file mode 100644 index 0000000000..77dc7782e4 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-8x8-8bpp.png differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-9x9-8bpp.bmp b/image/test/reftest/bmp/bmp-8bpp/bmp-size-9x9-8bpp.bmp new file mode 100644 index 0000000000..006961628f Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-9x9-8bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-8bpp/bmp-size-9x9-8bpp.png b/image/test/reftest/bmp/bmp-8bpp/bmp-size-9x9-8bpp.png new file mode 100644 index 0000000000..93914c3e16 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/bmp-size-9x9-8bpp.png differ diff --git a/image/test/reftest/bmp/bmp-8bpp/os2-bmp-size-32x32-8bpp.bmp b/image/test/reftest/bmp/bmp-8bpp/os2-bmp-size-32x32-8bpp.bmp new file mode 100644 index 0000000000..b6df221e1b Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/os2-bmp-size-32x32-8bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-8bpp/reftest.list b/image/test/reftest/bmp/bmp-8bpp/reftest.list new file mode 100644 index 0000000000..6fcef4742a --- /dev/null +++ b/image/test/reftest/bmp/bmp-8bpp/reftest.list @@ -0,0 +1,25 @@ +# BMP 8BPP tests + +# Images of various sizes +== bmp-size-1x1-8bpp.bmp bmp-size-1x1-8bpp.png +== bmp-size-2x2-8bpp.bmp bmp-size-2x2-8bpp.png +== bmp-size-3x3-8bpp.bmp bmp-size-3x3-8bpp.png +== bmp-size-4x4-8bpp.bmp bmp-size-4x4-8bpp.png +== bmp-size-5x5-8bpp.bmp bmp-size-5x5-8bpp.png +== bmp-size-6x6-8bpp.bmp bmp-size-6x6-8bpp.png +== bmp-size-7x7-8bpp.bmp bmp-size-7x7-8bpp.png +== bmp-size-8x8-8bpp.bmp bmp-size-8x8-8bpp.png +== bmp-size-9x9-8bpp.bmp bmp-size-9x9-8bpp.png +== bmp-size-15x15-8bpp.bmp bmp-size-15x15-8bpp.png +== bmp-size-16x16-8bpp.bmp bmp-size-16x16-8bpp.png +== bmp-size-17x17-8bpp.bmp bmp-size-17x17-8bpp.png +== bmp-size-31x31-8bpp.bmp bmp-size-31x31-8bpp.png +== bmp-size-32x32-8bpp.bmp bmp-size-32x32-8bpp.png +== bmp-size-33x33-8bpp.bmp bmp-size-33x33-8bpp.png +== bmp-not-square-8bpp.bmp bmp-not-square-8bpp.png +== rle-bmp-extrapad-8bpp.bmp bmp-extrapad-8bpp.png +== rle-bmp-not-square-8bpp.bmp bmp-not-square-8bpp.png +== os2-bmp-size-32x32-8bpp.bmp bmp-size-32x32-8bpp.png +== rle-bmp-size-32x32-8bpp.bmp bmp-size-32x32-8bpp.png +== top-to-bottom-rle-bmp-size-32x32-8bpp.bmp bmp-size-32x32-8bpp.png +== top-to-bottom-16x16-8bpp.bmp bmp-size-16x16-8bpp.png diff --git a/image/test/reftest/bmp/bmp-8bpp/rle-bmp-extrapad-8bpp.bmp b/image/test/reftest/bmp/bmp-8bpp/rle-bmp-extrapad-8bpp.bmp new file mode 100644 index 0000000000..9550ab2af6 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/rle-bmp-extrapad-8bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-8bpp/rle-bmp-not-square-8bpp.bmp b/image/test/reftest/bmp/bmp-8bpp/rle-bmp-not-square-8bpp.bmp new file mode 100644 index 0000000000..8687aab6cf Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/rle-bmp-not-square-8bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-8bpp/rle-bmp-size-32x32-8bpp.bmp b/image/test/reftest/bmp/bmp-8bpp/rle-bmp-size-32x32-8bpp.bmp new file mode 100644 index 0000000000..bd793b6b66 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/rle-bmp-size-32x32-8bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-8bpp/top-to-bottom-16x16-8bpp.bmp b/image/test/reftest/bmp/bmp-8bpp/top-to-bottom-16x16-8bpp.bmp new file mode 100644 index 0000000000..bb60249ac8 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/top-to-bottom-16x16-8bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-8bpp/top-to-bottom-rle-bmp-size-32x32-8bpp.bmp b/image/test/reftest/bmp/bmp-8bpp/top-to-bottom-rle-bmp-size-32x32-8bpp.bmp new file mode 100644 index 0000000000..396672ea15 Binary files /dev/null and b/image/test/reftest/bmp/bmp-8bpp/top-to-bottom-rle-bmp-size-32x32-8bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-corrupted/invalid-bpp.bmp b/image/test/reftest/bmp/bmp-corrupted/invalid-bpp.bmp new file mode 100644 index 0000000000..c00dd3fa4c Binary files /dev/null and b/image/test/reftest/bmp/bmp-corrupted/invalid-bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-corrupted/invalid-compression-BITFIELDS.bmp b/image/test/reftest/bmp/bmp-corrupted/invalid-compression-BITFIELDS.bmp new file mode 100644 index 0000000000..92a7225261 Binary files /dev/null and b/image/test/reftest/bmp/bmp-corrupted/invalid-compression-BITFIELDS.bmp differ diff --git a/image/test/reftest/bmp/bmp-corrupted/invalid-compression-RLE4.bmp b/image/test/reftest/bmp/bmp-corrupted/invalid-compression-RLE4.bmp new file mode 100644 index 0000000000..d73c89411d Binary files /dev/null and b/image/test/reftest/bmp/bmp-corrupted/invalid-compression-RLE4.bmp differ diff --git a/image/test/reftest/bmp/bmp-corrupted/invalid-compression-RLE8.bmp b/image/test/reftest/bmp/bmp-corrupted/invalid-compression-RLE8.bmp new file mode 100644 index 0000000000..5a88064543 Binary files /dev/null and b/image/test/reftest/bmp/bmp-corrupted/invalid-compression-RLE8.bmp differ diff --git a/image/test/reftest/bmp/bmp-corrupted/invalid-compression.bmp b/image/test/reftest/bmp/bmp-corrupted/invalid-compression.bmp new file mode 100644 index 0000000000..aa3134e562 Binary files /dev/null and b/image/test/reftest/bmp/bmp-corrupted/invalid-compression.bmp differ diff --git a/image/test/reftest/bmp/bmp-corrupted/invalid-data-offset.bmp b/image/test/reftest/bmp/bmp-corrupted/invalid-data-offset.bmp new file mode 100644 index 0000000000..b89bc55a8e Binary files /dev/null and b/image/test/reftest/bmp/bmp-corrupted/invalid-data-offset.bmp differ diff --git a/image/test/reftest/bmp/bmp-corrupted/invalid-signature.bmp b/image/test/reftest/bmp/bmp-corrupted/invalid-signature.bmp new file mode 100644 index 0000000000..6eebb57180 Binary files /dev/null and b/image/test/reftest/bmp/bmp-corrupted/invalid-signature.bmp differ diff --git a/image/test/reftest/bmp/bmp-corrupted/invalid-truncated-metadata.bmp b/image/test/reftest/bmp/bmp-corrupted/invalid-truncated-metadata.bmp new file mode 100644 index 0000000000..228c5c9992 Binary files /dev/null and b/image/test/reftest/bmp/bmp-corrupted/invalid-truncated-metadata.bmp differ diff --git a/image/test/reftest/bmp/bmp-corrupted/os2-invalid-bpp.bmp b/image/test/reftest/bmp/bmp-corrupted/os2-invalid-bpp.bmp new file mode 100644 index 0000000000..af4678a284 Binary files /dev/null and b/image/test/reftest/bmp/bmp-corrupted/os2-invalid-bpp.bmp differ diff --git a/image/test/reftest/bmp/bmp-corrupted/reftest.list b/image/test/reftest/bmp/bmp-corrupted/reftest.list new file mode 100644 index 0000000000..882657983a --- /dev/null +++ b/image/test/reftest/bmp/bmp-corrupted/reftest.list @@ -0,0 +1,21 @@ +# Corrupted BMP tests + +== wrapper.html?invalid-signature.bmp about:blank +== wrapper.html?invalid-bpp.bmp about:blank +== wrapper.html?os2-invalid-bpp.bmp about:blank +# Tests for an unsupported compression value +== wrapper.html?invalid-compression.bmp about:blank +# Tests for RLE4 with an invalid BPP +== wrapper.html?invalid-compression-RLE4.bmp about:blank +# Tests for RLE8 with an invalid BPP +== wrapper.html?invalid-compression-RLE8.bmp about:blank + +# Test for BITFIELDS with an invalid BIH size. (This is the obscure +# BITMAPV3INFOHEADER variant mentioned in +# https://en.wikipedia.org/wiki/BMP_file_format which we don't accept.) +== wrapper.html?invalid-compression-BITFIELDS.bmp about:blank + +== wrapper.html?invalid-truncated-metadata.bmp about:blank + +# Test for an invalid data offset +== wrapper.html?invalid-data-offset.bmp about:blank \ No newline at end of file diff --git a/image/test/reftest/bmp/bmp-corrupted/wrapper.html b/image/test/reftest/bmp/bmp-corrupted/wrapper.html new file mode 100644 index 0000000000..22b74c8fc1 --- /dev/null +++ b/image/test/reftest/bmp/bmp-corrupted/wrapper.html @@ -0,0 +1,28 @@ + + + +Image reftest wrapper + + + + + + + + + + diff --git a/image/test/reftest/bmp/bmpsuite/COPYING.txt b/image/test/reftest/bmp/bmpsuite/COPYING.txt new file mode 100644 index 0000000000..10926e87f1 --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/COPYING.txt @@ -0,0 +1,675 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. + diff --git a/image/test/reftest/bmp/bmpsuite/README.mozilla b/image/test/reftest/bmp/bmpsuite/README.mozilla new file mode 100644 index 0000000000..f59a494c26 --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/README.mozilla @@ -0,0 +1,40 @@ +bmpsuite, by Jason Summers, is an excellent BMP test suite that covers many +obscure corners of the BMP format. All the test images can be seen here: + + http://entropymine.com/jason/bmpsuite/bmpsuite/html/bmpsuite.html + +The code used to generate the test images is available here: + + https://github.com/jsummers/bmpsuite/ + +The readme.txt file states that the code is GPLv3 and the generated image files +are in the public domain. We have not included the code, but we have included: +(a) some quotes from the documentation and (b) some of the reference PNG +images. However, (a) and (b) are for testing purposes only and are not included +in Firefox releases. + +The BMP files within this directory were generated with bmpsuite v2.3 (git +revision 3adcc9e20c0b6d2d665966b7e047b6f9474cef12). + +There are three sub-directories. +- g/: for "good" images. +- q/: for "questionable" images. +- b/: for "bad" images. +- x/: for images that arguably may not truly be in "BMP format". + +Each file listed in a reftest.list file is annotated with the following lines. + +- The first line starts with "BMP:" and is the output of the MOZ_LOG call in + nsBMPDecoder.cpp. It has basic image info. + +- Next is a quote from the bmpsuite docs, which describes the particulars of + the file. + +- Some files also have additional notes in square brackets. These explain + anything non-obvious about the file, such as how we handle things that are + ambiguous, any shortcomings in our decoding, and how Chromium handles the + image. + +Some of the reference PNGs need a small amount of fuzziness to match the BMPs. +This might be due to PNG color correction. + diff --git a/image/test/reftest/bmp/bmpsuite/b/badbitcount.bmp b/image/test/reftest/bmp/bmpsuite/b/badbitcount.bmp new file mode 100644 index 0000000000..d4fa4e8b88 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/badbitcount.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/b/badbitssize.bmp b/image/test/reftest/bmp/bmpsuite/b/badbitssize.bmp new file mode 100644 index 0000000000..0a99a605af Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/badbitssize.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/b/baddens1.bmp b/image/test/reftest/bmp/bmpsuite/b/baddens1.bmp new file mode 100644 index 0000000000..a6150a6fe7 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/baddens1.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/b/baddens2.bmp b/image/test/reftest/bmp/bmpsuite/b/baddens2.bmp new file mode 100644 index 0000000000..f2c1dfb665 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/baddens2.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/b/badfilesize.bmp b/image/test/reftest/bmp/bmpsuite/b/badfilesize.bmp new file mode 100644 index 0000000000..da52cb51d7 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/badfilesize.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/b/badheadersize.bmp b/image/test/reftest/bmp/bmpsuite/b/badheadersize.bmp new file mode 100644 index 0000000000..2a4083a6f9 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/badheadersize.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/b/badpalettesize.bmp b/image/test/reftest/bmp/bmpsuite/b/badpalettesize.bmp new file mode 100644 index 0000000000..7d9d1b745d Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/badpalettesize.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/b/badplanes.bmp b/image/test/reftest/bmp/bmpsuite/b/badplanes.bmp new file mode 100644 index 0000000000..92d2855b62 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/badplanes.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/b/badrle.bmp b/image/test/reftest/bmp/bmpsuite/b/badrle.bmp new file mode 100644 index 0000000000..cbf8fdc2e1 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/badrle.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/b/badrle.png b/image/test/reftest/bmp/bmpsuite/b/badrle.png new file mode 100644 index 0000000000..1764ef9f98 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/badrle.png differ diff --git a/image/test/reftest/bmp/bmpsuite/b/badrle4.bmp b/image/test/reftest/bmp/bmpsuite/b/badrle4.bmp new file mode 100644 index 0000000000..632787a730 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/badrle4.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/b/badrle4.png b/image/test/reftest/bmp/bmpsuite/b/badrle4.png new file mode 100644 index 0000000000..7f5af39fe0 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/badrle4.png differ diff --git a/image/test/reftest/bmp/bmpsuite/b/badrle4bis.bmp b/image/test/reftest/bmp/bmpsuite/b/badrle4bis.bmp new file mode 100644 index 0000000000..130b7e659c Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/badrle4bis.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/b/badrle4bis.png b/image/test/reftest/bmp/bmpsuite/b/badrle4bis.png new file mode 100644 index 0000000000..7d0d95871a Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/badrle4bis.png differ diff --git a/image/test/reftest/bmp/bmpsuite/b/badrle4ter.bmp b/image/test/reftest/bmp/bmpsuite/b/badrle4ter.bmp new file mode 100644 index 0000000000..8107a335fc Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/badrle4ter.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/b/badrle4ter.png b/image/test/reftest/bmp/bmpsuite/b/badrle4ter.png new file mode 100644 index 0000000000..230bb60f47 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/badrle4ter.png differ diff --git a/image/test/reftest/bmp/bmpsuite/b/badrlebis.bmp b/image/test/reftest/bmp/bmpsuite/b/badrlebis.bmp new file mode 100644 index 0000000000..893eb11ab7 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/badrlebis.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/b/badrlebis.png b/image/test/reftest/bmp/bmpsuite/b/badrlebis.png new file mode 100644 index 0000000000..f0094a1156 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/badrlebis.png differ diff --git a/image/test/reftest/bmp/bmpsuite/b/badrleter.bmp b/image/test/reftest/bmp/bmpsuite/b/badrleter.bmp new file mode 100644 index 0000000000..04d5874e67 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/badrleter.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/b/badrleter.png b/image/test/reftest/bmp/bmpsuite/b/badrleter.png new file mode 100644 index 0000000000..359bc12e12 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/badrleter.png differ diff --git a/image/test/reftest/bmp/bmpsuite/b/badwidth.bmp b/image/test/reftest/bmp/bmpsuite/b/badwidth.bmp new file mode 100644 index 0000000000..9fca005dc3 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/badwidth.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/b/pal1.png b/image/test/reftest/bmp/bmpsuite/b/pal1.png new file mode 100644 index 0000000000..89a433ed76 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/pal1.png differ diff --git a/image/test/reftest/bmp/bmpsuite/b/pal8.png b/image/test/reftest/bmp/bmpsuite/b/pal8.png new file mode 100644 index 0000000000..2bfd3e650f Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/pal8.png differ diff --git a/image/test/reftest/bmp/bmpsuite/b/pal8badindex.bmp b/image/test/reftest/bmp/bmpsuite/b/pal8badindex.bmp new file mode 100644 index 0000000000..efe16c05c1 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/pal8badindex.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/b/pal8badindex.png b/image/test/reftest/bmp/bmpsuite/b/pal8badindex.png new file mode 100644 index 0000000000..0efb392b9e Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/pal8badindex.png differ diff --git a/image/test/reftest/bmp/bmpsuite/b/reallybig.bmp b/image/test/reftest/bmp/bmpsuite/b/reallybig.bmp new file mode 100644 index 0000000000..101e0b4943 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/reallybig.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/b/reftest.list b/image/test/reftest/bmp/bmpsuite/b/reftest.list new file mode 100644 index 0000000000..c892288b40 --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/b/reftest.list @@ -0,0 +1,110 @@ +# bmpsuite "bad" tests + +# See ../README.mozilla for details. + +# BMP: bihsize=40, 127 x 64, bpp=30000, compression=0, colors=2 +# "Header indicates an absurdly large number of bits/pixel." +# [We reject it. So does Chromium.] +== wrapper.html?badbitcount.bmp about:blank + +# BMP: bihsize=40, 127 x 64, bpp=1, compression=0, colors=2 +# "Header incorrectly indicates that the bitmap is several GB in size." +# [We accept it. So does Chromium.] +fuzzy(0-1,0-926) == badbitssize.bmp pal1.png + +# BMP: bihsize=40, 127 x 64, bpp=1, compression=0, colors=2 +# BMP: bihsize=40, 127 x 64, bpp=1, compression=0, colors=2 +# "Density (pixels per meter) suggests the image is much larger in one +# dimension than the other." +# [We accept them. So does Chromium.] +== baddens1.bmp pal1.png +== baddens2.bmp pal1.png + +# BMP: bihsize=40, 127 x 64, bpp=1, compression=0, colors=2 +# "Header incorrectly indicates that the file is several GB in size." +# [We accept it. So does Chromium.] +== badfilesize.bmp pal1.png + +# BMP: +# "Header size is 66 bytes, which is not a valid size for any known BMP +# version." +# [We reject it. So does Chromium.] +== wrapper.html?badheadersize.bmp about:blank + +# BMP: bihsize=40, 127 x 64, bpp=8, compression=0, colors=305402420 +# "Header incorrectly indicates that the palette contains an absurdly large +# number of colors." +# [We reject it. Chromium accepts it but draws nothing. Rejecting seems +# preferable give that the data is clearly untrustworthy.] +fuzzy(0-245,0-8128) == wrapper.html?badpalettesize.bmp about:blank + +# BMP: bihsize=40, 127 x 64, bpp=1, compression=0, colors=2 +# "The 'planes' setting, which is required to be 1, is not 1." +# [We accept it. So does Chromium.] +== badplanes.bmp pal1.png + +# BMP: bihsize=40, 127 x 64, bpp=4, compression=2, colors=13 +# "An invalid RLE4-compressed image that tries to cause buffer overruns." +== badrle4.bmp badrle4.png + +# BMP: bihsize=40, 127 x 64, bpp=4, compression=2, colors=13 +# "Another invalid RLE4-compressed image that tries to cause buffer overruns." +== badrle4bis.bmp badrle4bis.png + +# BMP: bihsize=40, 127 x 64, bpp=4, compression=2, colors=13 +# "Another invalid RLE4-compressed image that tries to cause buffer overruns." +== badrle4ter.bmp badrle4ter.png + +# BMP: bihsize=40, 127 x 64, bpp=8, compression=1, colors=253 +# "An invalid RLE-compressed image that tries to cause buffer overruns." +# [We accept it, drawing the valid first part and leaving the rest black. +# Chromium accepts it, drawing the valid first part and leaving the rest +# transparent. Using black for the invalid part is arguably better because it +# makes the image edges more obvious.] +== badrle.bmp badrle.png + +# BMP: bihsize=40, 127 x 64, bpp=8, compression=1, colors=253 +# "8-bit version of b/badrle4bis.bmp." +== badrlebis.bmp badrlebis.png + +# BMP: bihsize=40, 127 x 64, bpp=8, compression=1, colors=253 +# "8-bit version of b/badrle4ter.bmp." +== badrleter.bmp badrleter.png + +# BMP: bihsize=40, -127 x 64, bpp=1, compression=0, colors=2 +# "The image claims to be a negative number of pixels in width." +# [We reject it. So does Chromium.] +== wrapper.html?badwidth.bmp about:blank + +# BMP: bihsize=40, 127 x 64, bpp=8, compression=0, colors=101 +# "Many of the palette indices used in the image are not present in the +# palette." +# [We accept it and use black for the missing colors. So does Chromium.] +== pal8badindex.bmp pal8badindex.png + +# BMP: bihsize=40, 3000000 x 2000000, bpp=24, compression=0, colors=0 +# "An image with a very large reported width and height." +# [We reject it. So does Chromium.] +== wrapper.html?reallybig.bmp about:blank + +# BMP: bihsize=40, 127 x 64, bpp=16, compression=3, colors=0 +# "A 16-bit image with a BITFIELDS segment indicating 8 red, 8 green, and 0 +# blue bits. The documentation doesn’t say whether undefined channels are +# legal, or how they should be handled." +== rgb16-880.bmp rgb16-880.png + +# BMP: bihsize=40, 127 x -64, bpp=8, compression=1, colors=252 +# "An RLE-compressed image that tries to use top-down orientation, which isn’t +# allowed." +# [We accept it. Chromium rejects it. Accepting seems better given that we can +# decode it perfectly well.] +fuzzy(0-1,0-996) == rletopdown.bmp pal8.png + +# BMP: bihsize=40, 127 x 64, bpp=1, compression=0, colors=2 +# "A file that has been truncated in the middle of the bitmap." +# [We accept it, drawing the part that is present and leaving the rest black. +# Chromium draws the part that is present and leaves the rest transparent. +# Using black for the invalid part is arguably better because it makes the +# image edges more obvious.] +== shortfile.bmp shortfile.png + diff --git a/image/test/reftest/bmp/bmpsuite/b/rgb16-880.bmp b/image/test/reftest/bmp/bmpsuite/b/rgb16-880.bmp new file mode 100644 index 0000000000..72e7ce0eaf Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/rgb16-880.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/b/rgb16-880.png b/image/test/reftest/bmp/bmpsuite/b/rgb16-880.png new file mode 100644 index 0000000000..9450eba2bb Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/rgb16-880.png differ diff --git a/image/test/reftest/bmp/bmpsuite/b/rletopdown.bmp b/image/test/reftest/bmp/bmpsuite/b/rletopdown.bmp new file mode 100644 index 0000000000..21a909fda9 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/rletopdown.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/b/shortfile.bmp b/image/test/reftest/bmp/bmpsuite/b/shortfile.bmp new file mode 100644 index 0000000000..73960797b9 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/shortfile.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/b/shortfile.png b/image/test/reftest/bmp/bmpsuite/b/shortfile.png new file mode 100644 index 0000000000..0ec21d9295 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/b/shortfile.png differ diff --git a/image/test/reftest/bmp/bmpsuite/b/wrapper.html b/image/test/reftest/bmp/bmpsuite/b/wrapper.html new file mode 100644 index 0000000000..22b74c8fc1 --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/b/wrapper.html @@ -0,0 +1,28 @@ + + + +Image reftest wrapper + + + + + + + + + + diff --git a/image/test/reftest/bmp/bmpsuite/g/pal1.bmp b/image/test/reftest/bmp/bmpsuite/g/pal1.bmp new file mode 100644 index 0000000000..4776f82778 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal1.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal1.png b/image/test/reftest/bmp/bmpsuite/g/pal1.png new file mode 100644 index 0000000000..89a433ed76 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal1.png differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal1bg.bmp b/image/test/reftest/bmp/bmpsuite/g/pal1bg.bmp new file mode 100644 index 0000000000..466d0ba727 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal1bg.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal1bg.png b/image/test/reftest/bmp/bmpsuite/g/pal1bg.png new file mode 100644 index 0000000000..20c4bb838f Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal1bg.png differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal1wb.bmp b/image/test/reftest/bmp/bmpsuite/g/pal1wb.bmp new file mode 100644 index 0000000000..56cb93203e Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal1wb.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal4.bmp b/image/test/reftest/bmp/bmpsuite/g/pal4.bmp new file mode 100644 index 0000000000..7fd36303ca Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal4.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal4.png b/image/test/reftest/bmp/bmpsuite/g/pal4.png new file mode 100644 index 0000000000..188bb0499e Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal4.png differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal4gs.bmp b/image/test/reftest/bmp/bmpsuite/g/pal4gs.bmp new file mode 100644 index 0000000000..813268ca77 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal4gs.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal4gs.png b/image/test/reftest/bmp/bmpsuite/g/pal4gs.png new file mode 100644 index 0000000000..3a9fc855e4 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal4gs.png differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal4rle.bmp b/image/test/reftest/bmp/bmpsuite/g/pal4rle.bmp new file mode 100644 index 0000000000..a5672aebd6 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal4rle.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal8-0.bmp b/image/test/reftest/bmp/bmpsuite/g/pal8-0.bmp new file mode 100644 index 0000000000..ab8815a360 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal8-0.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal8.bmp b/image/test/reftest/bmp/bmpsuite/g/pal8.bmp new file mode 100644 index 0000000000..96b2f86680 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal8.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal8.png b/image/test/reftest/bmp/bmpsuite/g/pal8.png new file mode 100644 index 0000000000..2bfd3e650f Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal8.png differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal8gs.bmp b/image/test/reftest/bmp/bmpsuite/g/pal8gs.bmp new file mode 100644 index 0000000000..66a0d70dc3 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal8gs.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal8gs.png b/image/test/reftest/bmp/bmpsuite/g/pal8gs.png new file mode 100644 index 0000000000..b33b38e1d3 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal8gs.png differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal8nonsquare-e.png b/image/test/reftest/bmp/bmpsuite/g/pal8nonsquare-e.png new file mode 100644 index 0000000000..646665f2d0 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal8nonsquare-e.png differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal8nonsquare.bmp b/image/test/reftest/bmp/bmpsuite/g/pal8nonsquare.bmp new file mode 100644 index 0000000000..0aa8de04cb Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal8nonsquare.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal8nonsquare.png b/image/test/reftest/bmp/bmpsuite/g/pal8nonsquare.png new file mode 100644 index 0000000000..9648cb6825 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal8nonsquare.png differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal8os2.bmp b/image/test/reftest/bmp/bmpsuite/g/pal8os2.bmp new file mode 100644 index 0000000000..14901b3882 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal8os2.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal8rle.bmp b/image/test/reftest/bmp/bmpsuite/g/pal8rle.bmp new file mode 100644 index 0000000000..d43101490f Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal8rle.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal8topdown.bmp b/image/test/reftest/bmp/bmpsuite/g/pal8topdown.bmp new file mode 100644 index 0000000000..4b2f8e019f Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal8topdown.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal8v4.bmp b/image/test/reftest/bmp/bmpsuite/g/pal8v4.bmp new file mode 100644 index 0000000000..34ebb8030c Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal8v4.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal8v5.bmp b/image/test/reftest/bmp/bmpsuite/g/pal8v5.bmp new file mode 100644 index 0000000000..c54647a31a Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal8v5.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal8w124.bmp b/image/test/reftest/bmp/bmpsuite/g/pal8w124.bmp new file mode 100644 index 0000000000..b7cc2d8bf7 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal8w124.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal8w124.png b/image/test/reftest/bmp/bmpsuite/g/pal8w124.png new file mode 100644 index 0000000000..f80236df60 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal8w124.png differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal8w125.bmp b/image/test/reftest/bmp/bmpsuite/g/pal8w125.bmp new file mode 100644 index 0000000000..06efed7443 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal8w125.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal8w125.png b/image/test/reftest/bmp/bmpsuite/g/pal8w125.png new file mode 100644 index 0000000000..2a45116b91 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal8w125.png differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal8w126.bmp b/image/test/reftest/bmp/bmpsuite/g/pal8w126.bmp new file mode 100644 index 0000000000..112aa9fe67 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal8w126.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/pal8w126.png b/image/test/reftest/bmp/bmpsuite/g/pal8w126.png new file mode 100644 index 0000000000..a41eab93d0 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/pal8w126.png differ diff --git a/image/test/reftest/bmp/bmpsuite/g/reftest.list b/image/test/reftest/bmp/bmpsuite/g/reftest.list new file mode 100644 index 0000000000..a11c4db480 --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/g/reftest.list @@ -0,0 +1,129 @@ +# bmpsuite "good" tests + +# See ../README.mozilla for details. + +# BMP: bihsize=40, 127 x 64, bpp=1, compression=0, colors=2 +# "1 bit/pixel paletted image, in which black is the first color in the +# palette." +fuzzy(0-1,0-926) == pal1.bmp pal1.png + +# BMP: bihsize=40, 127 x 64, bpp=1, compression=0, colors=2 +# "1 bit/pixel paletted image, in which white is the first color in the +# palette." +fuzzy(0-1,0-926) == pal1wb.bmp pal1.png + +# BMP: bihsize=40, 127 x 64, bpp=1, compression=0, colors=2 +# "1 bit/pixel paletted image, with colors other than black and white." +== pal1bg.bmp pal1bg.png + +# BMP: bihsize=40, 127 x 64, bpp=4, compression=0, colors=12 +# "Paletted image with 12 palette colors, and 4 bits/pixel." +== pal4.bmp pal4.png + +# BMP: bihsize=40, 127 x 64, bpp=4, compression=0, colors=12 +# "Paletted image with 12 grayscale palette colors, and 4 bits/pixel." +== pal4gs.bmp pal4gs.png + +# BMP: bihsize=40, 127 x 64, bpp=4, compression=2, colors=12 +# "4-bit image that uses RLE compression." +== pal4rle.bmp pal4.png + +# BMP: bihsize=40, 127 x 64, bpp=8, compression=0, colors=252 +# "Our standard paletted image, with 252 palette colors, and 8 bits/pixel." +fuzzy(0-1,0-996) == pal8.bmp pal8.png + +# BMP: bihsize=40, 127 x 64, bpp=8, compression=0, colors=0 +# "Every field that can be set to 0 is set to 0: pixels/meter=0; colors used=0 +# (meaning the default 256); size-of-image=0." +fuzzy(0-1,0-996) == pal8-0.bmp pal8.png + +# BMP: bihsize=40, 127 x 64, bpp=8, compression=0, colors=252 +# "An 8-bit image with a palette of 252 grayscale colors." +== pal8gs.bmp pal8gs.png + +# BMP: bihsize=40, 127 x 64, bpp=8, compression=1, colors=252 +# "8-bit image that uses RLE compression." +fuzzy(0-1,0-996) == pal8rle.bmp pal8.png + +# BMP: bihsize=40, 126 x 63, bpp=8, compression=0, colors=252 +# BMP: bihsize=40, 125 x 62, bpp=8, compression=0, colors=252 +# BMP: bihsize=40, 124 x 61, bpp=8, compression=0, colors=252 +# "Images with different widths and heights. In BMP format, rows are padded to +# a multiple of four bytes, so we test all four possibilities." +fuzzy(0-1,0-889) == pal8w126.bmp pal8w126.png +fuzzy(0-1,0-974) == pal8w125.bmp pal8w125.png +fuzzy(0-1,0-870) == pal8w124.bmp pal8w124.png + +# BMP: bihsize=40, 127 x -64, bpp=8, compression=0, colors=252 +# "BMP images are normally stored from the bottom up, but there is a way to +# store them from the top down." +fuzzy(0-1,0-996) == pal8topdown.bmp pal8.png + +# BMP: bihsize=40, 127 x 32, bpp=8, compression=0, colors=252 +# "An image with non-square pixels: the X pixels/meter is twice the Y +# pixels/meter. Image editors can be expected to leave the image 'squashed'; +# image viewers should consider stretching it to its correct proportions." +# [We leave it squashed, as does Chromium.] +fuzzy(0-1,0-1462) == pal8nonsquare.bmp pal8nonsquare-e.png + +# BMP: bihsize=12, 127 x 64, bpp=8, compression=0, colors=0 +# "An OS/2-style bitmap." +fuzzy(0-1,0-996) == pal8os2.bmp pal8.png + +# BMP: bihsize=108, 127 x 64, bpp=8, compression=0, colors=252 +# "A v4 bitmap. I’m not sure that the gamma and chromaticity values in this +# file are sensible, because I can’t find any detailed documentation of them." +# [We seem to handle the profile wrong in QCMS. See bug 1619332.] +fuzzy-if(!appleSilicon,3-3,6376-6376) fuzzy-if(appleSilicon,4-4,6376-6376) == pal8v4.bmp pal8.png #bug 1619847 + +# BMP: bihsize=124, 127 x 64, bpp=8, compression=0, colors=252 +# "A v5 bitmap. Version 5 has additional colorspace options over v4, so it is +# easier to create, and ought to be more portable." +fuzzy(0-1,0-996) == pal8v5.bmp pal8.png + +# BMP: bihsize=40, 127 x 64, bpp=16, compression=0, colors=0 +# "A 16-bit image with the default color format: 5 bits each for red, green, and +# blue, and 1 unused bit. The whitest colors should (I assume) be displayed as +# pure white: (255,255,255), not (248,248,248)." +fuzzy(0-1,0-1296) == rgb16.bmp rgb16.png + +# BMP: bihsize=40, 127 x 64, bpp=16, compression=3, colors=0 +# "Same format as rgb16.bmp, but with a BITFIELDS segment." +fuzzy(0-1,0-1296) == rgb16bfdef.bmp rgb16.png + +# BMP: bihsize=40, 127 x 64, bpp=16, compression=3, colors=0 +# "A 16-bit image with a BITFIELDS segment indicating 5 red, 6 green, and 5 blue +# bits. This is a standard 16-bit format, even supported by old versions of +# Windows that don’t support any other non-default 16-bit formats. The whitest +# colors should be displayed as pure white: (255,255,255), not (248,252,248)." +fuzzy(0-1,0-1296) == rgb16.bmp rgb16.png + +# BMP: bihsize=40, 127 x 64, bpp=16, compression=3, colors=256 +# "A 16-bit image with both a BITFIELDS segment and a palette." +fuzzy(0-1,0-1516) == rgb16.bmp rgb16.png + +# BMP: bihsize=40, 127 x 64, bpp=24, compression=0, colors=0 +# "A perfectly ordinary 24-bit (truecolor) image." +== rgb24.bmp rgb24.png + +# BMP: bihsize=40, 127 x 64, bpp=24, compression=0, colors=256 +# "A 24-bit image, with a palette containing 256 colors. There is little if any +# reason for a truecolor image to contain a palette, but it is legal." +== rgb24pal.bmp rgb24.png + +# BMP: bihsize=40, 127 x 64, bpp=32, compression=0, colors=0 +# "A 32-bit image using the default color format for 32-bit images (no +# BITFIELDS segment). There are 8 bits per color channel, and 8 unused bits. +# The unused bits are set to 0." +== rgb32.bmp rgb24.png + +# BMP: bihsize=40, 127 x 64, bpp=32, compression=3, colors=0 +# "Same format as rgb32.bmp, but with a BITFIELDS segment." +== rgb32bfdef.bmp rgb24.png + +# BMP: bihsize=40, 127 x 64, bpp=32, compression=3, colors=0 +# "A 32-bit image with a BITFIELDS segment. As usual, there are 8 bits per color +# channel, and 8 unused bits. But the color channels are in an unusual order, +# so the viewer must read the BITFIELDS, and not just guess." +== rgb32bf.bmp rgb24.png + diff --git a/image/test/reftest/bmp/bmpsuite/g/rgb16-565.bmp b/image/test/reftest/bmp/bmpsuite/g/rgb16-565.bmp new file mode 100644 index 0000000000..c03a27975a Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/rgb16-565.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/rgb16-565.png b/image/test/reftest/bmp/bmpsuite/g/rgb16-565.png new file mode 100644 index 0000000000..04a3121d24 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/rgb16-565.png differ diff --git a/image/test/reftest/bmp/bmpsuite/g/rgb16-565pal.bmp b/image/test/reftest/bmp/bmpsuite/g/rgb16-565pal.bmp new file mode 100644 index 0000000000..e7632e344b Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/rgb16-565pal.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/rgb16.bmp b/image/test/reftest/bmp/bmpsuite/g/rgb16.bmp new file mode 100644 index 0000000000..6bfe47af4f Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/rgb16.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/rgb16.png b/image/test/reftest/bmp/bmpsuite/g/rgb16.png new file mode 100644 index 0000000000..d9545840ab Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/rgb16.png differ diff --git a/image/test/reftest/bmp/bmpsuite/g/rgb16bfdef.bmp b/image/test/reftest/bmp/bmpsuite/g/rgb16bfdef.bmp new file mode 100644 index 0000000000..30fe8bb8d6 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/rgb16bfdef.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/rgb24.bmp b/image/test/reftest/bmp/bmpsuite/g/rgb24.bmp new file mode 100644 index 0000000000..40f8bb094b Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/rgb24.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/rgb24.png b/image/test/reftest/bmp/bmpsuite/g/rgb24.png new file mode 100644 index 0000000000..86a9c945b0 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/rgb24.png differ diff --git a/image/test/reftest/bmp/bmpsuite/g/rgb24pal.bmp b/image/test/reftest/bmp/bmpsuite/g/rgb24pal.bmp new file mode 100644 index 0000000000..102e971dd3 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/rgb24pal.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/rgb32.bmp b/image/test/reftest/bmp/bmpsuite/g/rgb32.bmp new file mode 100644 index 0000000000..5d57eaaea8 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/rgb32.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/rgb32bf.bmp b/image/test/reftest/bmp/bmpsuite/g/rgb32bf.bmp new file mode 100644 index 0000000000..20fa9a1326 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/rgb32bf.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/g/rgb32bfdef.bmp b/image/test/reftest/bmp/bmpsuite/g/rgb32bfdef.bmp new file mode 100644 index 0000000000..d7e64e5a41 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/g/rgb32bfdef.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/pal1huff.bmp b/image/test/reftest/bmp/bmpsuite/q/pal1huff.bmp new file mode 100644 index 0000000000..790a483697 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/pal1huff.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/pal1p1.bmp b/image/test/reftest/bmp/bmpsuite/q/pal1p1.bmp new file mode 100644 index 0000000000..b68321c4c1 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/pal1p1.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/pal1p1.png b/image/test/reftest/bmp/bmpsuite/q/pal1p1.png new file mode 100644 index 0000000000..92fc0f945b Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/pal1p1.png differ diff --git a/image/test/reftest/bmp/bmpsuite/q/pal2.bmp b/image/test/reftest/bmp/bmpsuite/q/pal2.bmp new file mode 100644 index 0000000000..983e9fa92d Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/pal2.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/pal2color.bmp b/image/test/reftest/bmp/bmpsuite/q/pal2color.bmp new file mode 100644 index 0000000000..27fe7276bc Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/pal2color.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/pal4rlecut.bmp b/image/test/reftest/bmp/bmpsuite/q/pal4rlecut.bmp new file mode 100644 index 0000000000..2f32d1d7ad Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/pal4rlecut.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/pal4rlecut.png b/image/test/reftest/bmp/bmpsuite/q/pal4rlecut.png new file mode 100644 index 0000000000..767f5a0ad7 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/pal4rlecut.png differ diff --git a/image/test/reftest/bmp/bmpsuite/q/pal4rletrns.bmp b/image/test/reftest/bmp/bmpsuite/q/pal4rletrns.bmp new file mode 100644 index 0000000000..58994e92ba Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/pal4rletrns.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/pal4rletrns.png b/image/test/reftest/bmp/bmpsuite/q/pal4rletrns.png new file mode 100644 index 0000000000..9b0c044364 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/pal4rletrns.png differ diff --git a/image/test/reftest/bmp/bmpsuite/q/pal8.png b/image/test/reftest/bmp/bmpsuite/q/pal8.png new file mode 100644 index 0000000000..2bfd3e650f Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/pal8.png differ diff --git a/image/test/reftest/bmp/bmpsuite/q/pal8offs.bmp b/image/test/reftest/bmp/bmpsuite/q/pal8offs.bmp new file mode 100644 index 0000000000..8673e9740b Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/pal8offs.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/pal8os2-hs.bmp b/image/test/reftest/bmp/bmpsuite/q/pal8os2-hs.bmp new file mode 100644 index 0000000000..018a3c4b16 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/pal8os2-hs.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/pal8os2-sz.bmp b/image/test/reftest/bmp/bmpsuite/q/pal8os2-sz.bmp new file mode 100644 index 0000000000..7f1455d5ef Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/pal8os2-sz.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/pal8os2sp.bmp b/image/test/reftest/bmp/bmpsuite/q/pal8os2sp.bmp new file mode 100644 index 0000000000..e532c89863 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/pal8os2sp.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/pal8os2v2-16.bmp b/image/test/reftest/bmp/bmpsuite/q/pal8os2v2-16.bmp new file mode 100644 index 0000000000..95a1d2345a Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/pal8os2v2-16.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/pal8os2v2-40sz.bmp b/image/test/reftest/bmp/bmpsuite/q/pal8os2v2-40sz.bmp new file mode 100644 index 0000000000..d1e66b615c Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/pal8os2v2-40sz.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/pal8os2v2-sz.bmp b/image/test/reftest/bmp/bmpsuite/q/pal8os2v2-sz.bmp new file mode 100644 index 0000000000..6fe566e3fd Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/pal8os2v2-sz.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/pal8os2v2.bmp b/image/test/reftest/bmp/bmpsuite/q/pal8os2v2.bmp new file mode 100644 index 0000000000..1324a40d00 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/pal8os2v2.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/pal8oversizepal.bmp b/image/test/reftest/bmp/bmpsuite/q/pal8oversizepal.bmp new file mode 100644 index 0000000000..93b8187ca1 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/pal8oversizepal.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/pal8rlecut.bmp b/image/test/reftest/bmp/bmpsuite/q/pal8rlecut.bmp new file mode 100644 index 0000000000..840d31cce6 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/pal8rlecut.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/pal8rlecut.png b/image/test/reftest/bmp/bmpsuite/q/pal8rlecut.png new file mode 100644 index 0000000000..dfceeb568b Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/pal8rlecut.png differ diff --git a/image/test/reftest/bmp/bmpsuite/q/pal8rletrns.bmp b/image/test/reftest/bmp/bmpsuite/q/pal8rletrns.bmp new file mode 100644 index 0000000000..a2af88d87c Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/pal8rletrns.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/pal8rletrns.png b/image/test/reftest/bmp/bmpsuite/q/pal8rletrns.png new file mode 100644 index 0000000000..2d8e957f1f Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/pal8rletrns.png differ diff --git a/image/test/reftest/bmp/bmpsuite/q/reftest.list b/image/test/reftest/bmp/bmpsuite/q/reftest.list new file mode 100644 index 0000000000..cead5df00b --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/q/reftest.list @@ -0,0 +1,251 @@ +# bmpsuite "questionable" tests + +# See ../README.mozilla for details. + +# BMP: bihsize=40, 127 x 64, bpp=1, compression=0, colors=1 +# "1 bit/pixel paletted image, with only one color in the palette. The +# documentation says that 1-bpp images have a palette size of 2 (not 'up to +# 2'), but it would be silly for a viewer not to support a size of 1." +# [We accept it. So does Chromium.] +fuzzy(0-1,0-926) == pal1p1.bmp pal1p1.png + +# BMP: bihsize=64, 127 x 64, bpp=1, compression=3, colors=2 +# "My attempt to make a BMP file with Huffman 1D compression. It is quite +# possibly incorrect. Even if everything else about it is correct, I have no +# way to know whether it is black/white reversed." +# [We reject it. So does Chromium.] +== wrapper.html?pal1huff.bmp about:blank + +# BMP: bihsize=40, 127 x 64, bpp=2, compression=0, colors=4 +# "A paletted image with 2 bits/pixel. Usually only 1, 4, and 8 are allowed, +# but 2 is legal on Windows CE." +# [We reject it. Chromium accepts it.] +== wrapper.html?pal2.bmp about:blank + +# BMP: bihsize=40, 127 x 64, bpp=2, compression=0, colors=4 +# "Same as pal2.bmp, but with a color palette instead of grayscale palette." +# [We reject it. Chromium accepts it.] +== wrapper.html?pal2color.bmp about:blank + +# BMP: bihsize=40, 127 x 64, bpp=4, compression=2, colors=13 +# "An RLE-compressed image that used 'delta' codes to skip over some pixels, +# leaving them undefined. Some viewers make undefined pixels transparent, +# others make them black, and others assign them palette color 0 (purple, in +# this case)." +# [We make the undefined pixels transparent. So does Chromium.] +== pal4rletrns.bmp pal4rletrns.png + +# BMP: bihsize=40, 127 x 64, bpp=4, compression=2, colors=13 +# "An RLE-compressed image that uses “delta†codes, and early EOL & EOBMP +# markers, to skip over some pixels." +== pal4rlecut.bmp pal4rlecut.png + +# BMP: bihsize=40, 127 x 64, bpp=8, compression=1, colors=253 +# "8-bit version of q/pal4rletrns.bmp." +# [Ditto.] +== pal8rletrns.bmp pal8rletrns.png + +# BMP: bihsize=40, 127 x 64, bpp=8, compression=1, colors=253 +# "8-bit version of q/pal4rlecut.bmp." +== pal8rlecut.bmp pal8rlecut.png + +# BMP: bihsize=40, 127 x 64, bpp=8, compression=0, colors=252 +# "A file with some unused bytes between the palette and the image. This is +# probably valid, but I’m not 100% sure." +# [We accept it. So does Chromium.] +fuzzy(0-1,0-996) == pal8offs.bmp pal8.png + +# BMP: bihsize=40, 127 x 64, bpp=8, compression=0, colors=300 +# "An 8-bit image with 300 palette colors. This may be invalid, because the +# documentation could be interpreted to imply that 8-bit images aren’t allowed +# to have more than 256 colors." +# [We accept it. So does Chromium.] +fuzzy(0-1,0-996) == pal8oversizepal.bmp pal8.png + +# BMP: bihsize=12, 127 x 64, bpp=8, compression=0, colors=0 +# # "Some OS/2 BMP specifications say that the size field in the file header +# should be set to the aggregate size of the file header and infoheader, +# instead of the total file size. For OS/2v1, that means it will always be 26. +# BMP decoders usually ignore this field, so it shouldn’t cause a problem." +fuzzy(0-1,0-996) == pal8os2-sz.bmp pal8.png + +# BMP: bihsize=12, 127 x 64, bpp=8, compression=0, colors=0 +# "Some OS/2 BMP specifications define the fields at offsets 6 and 8 to be a +# “hotspot†(for cursor graphics). Though the fields are not used in BMP files, +# they are sometimes, as in this file, set to nonzero values. This should cause +# no problems, except that it could prevent some programs from detecting this +# file as a BMP file." +fuzzy(0-1,0-996) == pal8os2-hs.bmp pal8.png + +# BMP: bihsize=12, 127 x 64, bpp=8, compression=0, colors=0 +# "An OS/2v1 with a less-than-full-sized palette. Probably not valid, but such +# files have been seen in the wild." +# [We reject it. Chromium accepts it.] +fuzzy(0-245,0-8128) == wrapper.html?pal8os2sp.bmp about:blank + +# BMP: bihsize=64, 127 x 64, bpp=8, compression=0, colors=252 +# "My attempt to make an OS/2v2 bitmap." +# [We accept it. So does Chromium.] +fuzzy(0-1,0-996) == pal8os2v2.bmp pal8.png + +# BMP: bihsize=16, 127 x 64, bpp=8, compression=0, colors=0 +# "An OS/2v2 bitmap whose header has only 16 bytes, instead of the full 64." +# [We accept it. So does Chromium.] +fuzzy(0-1,0-996) == pal8os2v2-16.bmp pal8.png + +# BMP: bihsize=64, 127 x 64, bpp=8, compression=0, colors=252 +# "An OS/2v2 bitmap. Like q/pal8os2-sz.bmp, the size field is set to the size +# of the headers (78), instead of the size of the file." +fuzzy(0-1,0-996) == pal8os2v2-sz.bmp pal8.png + +# BMP: bihsize=40, 127 x 64, bpp=8, compression=0, colors=252 +# "An OS/2v2 bitmap, with a 40-byte header. Like q/pal8os2-sz.bmp, the size +# field is set to the size of the headers (54), instead of the size of the +# file. Except for that, this file cannot be distinguished from a Windows +# BMPv3 file." +fuzzy(0-1,0-996) == pal8os2v2-40sz.bmp pal8.png + +# BMP: bihsize=40, 127 x 64, bpp=16, compression=0, colors=0 +# "Same idea as q/rgb32fakealpha.bmp. The default 16-bit color format has one +# unused bit per pixel, and in this image some of the unused bits are set to 1. +# It’s possible that some viewers will interpret this image as having +# transparency." +fuzzy(0-1,0-1296) == rgb16faketrns.bmp rgb16.png + +# BMP: bihsize=40, 127 x 64, bpp=16, compression=3, colors=0 +# "An unusual and silly 16-bit image, with 2 red bits, 3 green bits, and 1 blue +# bit. Most viewers do support this image, but the colors may be darkened with +# a yellow-green shadow. That’s because they’re doing simple bit-shifting +# (possibly including one round of bit replication), instead of proper +# scaling." +== rgb16-231.bmp rgb16-231.png + +# BMP: bihsize=40, 127 x 64, bpp=16, compression=3, colors=0 +# "Similar to q/rgb16-231.bmp, with 3 red bits, 10 green bits, and 3 blue +# bits." +fuzzy(0-1,0-689) == rgb16-3103.bmp rgb16-3103.png + +# BMP: bihsize=124, 127 x 64, bpp=16, compression=3, colors=0 +# "A 16-bit image with an alpha channel. There are 4 bits for each color +# channel, and 4 bits for the alpha channel. It’s not clear if this is valid, +# but I can’t find anything that suggests it isn’t." +== rgba16-4444.bmp rgba16-4444.png + +# BMP: bihsize=124, 127 x 64, bpp=16, compression=3, colors=0 +# "Similar to q/rgba16-4444.bmp, with 5 red bits, 5 green bits, 5 blue bits, +# and a 1-bit alpha channel." +fuzzy(0-1,0-2203) == rgba16-5551.bmp rgba16-5551.png + +# BMP: bihsize=124, 127 x 64, bpp=16, compression=3, colors=0 +# "Similar to q/rgba16-4444.bmp, with 1 red bit, 9 green bits, 2 blue bits, +# and 4 bits for the alpha channel." +== rgba16-1924.bmp rgba16-1924.png + +# BMP: bihsize=40, 127 x 64, bpp=24, compression=0, colors=300 +# "A 24-bit image, with a palette containing 300 colors. The fact that the +# palette has more than 256 colors may cause some viewers to complain, but the +# documentation does not mention a size limit." +# [We accept it. So does Chromium.] +== rgb24largepal.bmp rgb24.png + +# BMP: bihsize=124, 127 x 64, bpp=24, compression=0, colors=0 +# "My attempt to make a BMP file with an embedded color profile." +fuzzy(1-1,28-73) == rgb24prof.bmp rgb24.png + +# BMP: bihsize=124, 127 x 64, bpp=24, compression=0, colors=0 +# "This image tries to test whether color profiles are fully supported. It has +# the red and green channels swapped, and an embedded color profile that tries +# to swap them back. Support for this is uncommon." +# [The image is significantly closer to the desired output than without color +# management, but we seem to handle the profile wrong in QCMS. See bug 1619332.] +fuzzy(10-10,6590-6597) == rgb24prof2.bmp rgb24.png + +# BMP: bihsize=124, 127 x 64, bpp=24, compression=0, colors=0 +# "My attempt to make a BMP file with a linked color profile." +# [We accept it, though we don't do anything with the color profile. Chromium +# also handles it.] +== rgb24lprof.bmp rgb24.png + +# BMP: bihsize=124, 127 x 64, bpp=0, compression=4, colors=0 +# BMP: bihsize=124, 127 x 64, bpp=0, compression=5, colors=0 +# "My attempt to make BMP files with embedded JPEG and PNG images. These are +# not likely to be supported by much of anything (they’re intended for +# printers)." +# [We reject them. Chromium accepts them.] +== wrapper.html?rgb24jpeg.bmp about:blank +== wrapper.html?rgb24png.bmp about:blank + +# BMP: bihsize=64, 127 x 64, bpp=24, compression=4, colors=0 +# "An OS/2v2 bitmap with RLE24 compression. This image uses a limited number +# of colors, just to make it more compressible." +# [We reject it. Chromium accepts it.] +== wrapper.html?rgb24rle24.bmp about:blank + +# BMP: bihsize=52, 127 x 64, bpp=32, compression=3, colors=0 +# "Similar to g/rgb32bf.bmp, but with a 52-byte “BITMAPV2INFOHEADERâ€. This is +# an uncommon version of BMP, and I can’t confirm that this file is correct." +# [We reject it. Chromium accepts it.] +== wrapper.html?rgb32h52.bmp about:blank + +# BMP: bihsize=124, 127 x 64, bpp=32, compression=3, colors=0 +# "Color channels are the same size and order as rgb32bfdef.bmp, but they use +# the highest available bits, instead of the lowest (or vice versa, depending +# on your byte-order perspective)." +== rgb32-xbgr.bmp rgb24.png + +# BMP: bihsize=40, 127 x 64, bpp=32, compression=0, colors=0 +# "Same as g/rgb32.bmp, except that the unused bits are set to something other +# than 0. If the image becomes transparent toward the bottom, it probably means +# the viewer uses heuristics to guess whether the undefined data represents +# transparency." +# [We don't apply transparency here. Chromium does the same.] +== rgb32fakealpha.bmp rgb24.png + +# BMP: bihsize=40, 127 x 64, bpp=32, compression=3, colors=0 +# "A 32 bits/pixel image, with all 32 bits used: 11 each for red and green, and +# 10 for blue. As far as I know, this is perfectly valid, but it is unusual." +fuzzy(0-1,0-1408) == rgb32-111110.bmp rgb24.png + +# BMP: bihsize=40, 127 x 64, bpp=32, compression=3, colors=0 +# "A 32 bits/pixel image, with 7 bits for red, 18 for green, and 7 for blue." +fuzzy(0-1,0-753) == rgb32-7187.bmp rgb32-7187.png + +# BMP: bihsize=124, 127 x 64, bpp=32, compression=3, colors=0 +# "A BMP with an alpha channel. Transparency is barely documented, so it’s +# possible that this file is not correctly formed. The color channels are in an +# unusual order, to prevent viewers from passing this test by making a lucky +# guess." +== rgba32-1.bmp rgba32.png + +# BMP: bihsize=124, 127 x 64, bpp=32, compression=3, colors=0 +# "Same as rgba32-1.bmp, but with the color channels in an unusual order, to +# prevent viewers from passing this test by making a lucky guess." +== rgba32-2.bmp rgba32.png + +# BMP: bihsize=124, 127 x 64, bpp=32, compression=3, colors=0 +# "A 32 bits/pixel image, with 10 bits for red, 10 for green, 10 for blue, and +# 2 for alpha." +fuzzy(0-1,0-1296) == rgba32-1010102.bmp rgba32-1010102.png + +# BMP: bihsize=124, 127 x 64, bpp=32, compression=3, colors=0 +# "A 32 bits/pixel image, with 8 bits for red, 12 for green, 8 for blue, and 4 +# for alpha." +fuzzy(0-1,0-753) == rgba32-81284.bmp rgba32-81284.png + +# BMP: bihsize=124, 127 x 64, bpp=32, compression=3, colors=0 +# "A 32 bits/pixel image, with 6 bits for red, 17 for green, 5 for blue, and 4 +# for alpha." +fuzzy(0-1,0-1554) == rgba32-61754.bmp rgba32-61754.png + +# BMP: bihsize=40, 127 x 64, bpp=32, compression=6, colors=0 +# "An image of type BI_ALPHABITFIELDS. Supposedly, this was used on Windows CE. +# I don’t know whether it is constructed correctly." +# [We reject it. Chromium accepts it.] +== wrapper.html?rgba32abf.bmp about:blank + +# BMP: bihsize=56, 127 x 64, bpp=32, compression=3, colors=0 +# "Similar to q/rgba32.bmp, but with a 56-byte “BITMAPV3INFOHEADERâ€. This is an +# uncommon version of BMP, and I can’t confirm that this file is correct." +# [We reject it. Chromium accepts it.] +== wrapper.html?rgba32h56.bmp about:blank + diff --git a/image/test/reftest/bmp/bmpsuite/q/rgb16-231.bmp b/image/test/reftest/bmp/bmpsuite/q/rgb16-231.bmp new file mode 100644 index 0000000000..6300f69f0c Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgb16-231.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgb16-231.png b/image/test/reftest/bmp/bmpsuite/q/rgb16-231.png new file mode 100644 index 0000000000..76efe526e5 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgb16-231.png differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgb16-3103.bmp b/image/test/reftest/bmp/bmpsuite/q/rgb16-3103.bmp new file mode 100644 index 0000000000..6e01226029 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgb16-3103.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgb16-3103.png b/image/test/reftest/bmp/bmpsuite/q/rgb16-3103.png new file mode 100644 index 0000000000..79ba23c834 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgb16-3103.png differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgb16.png b/image/test/reftest/bmp/bmpsuite/q/rgb16.png new file mode 100644 index 0000000000..d9545840ab Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgb16.png differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgb16faketrns.bmp b/image/test/reftest/bmp/bmpsuite/q/rgb16faketrns.bmp new file mode 100644 index 0000000000..62fb393bb9 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgb16faketrns.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgb24.png b/image/test/reftest/bmp/bmpsuite/q/rgb24.png new file mode 100644 index 0000000000..86a9c945b0 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgb24.png differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgb24jpeg.bmp b/image/test/reftest/bmp/bmpsuite/q/rgb24jpeg.bmp new file mode 100644 index 0000000000..87d73d75b8 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgb24jpeg.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgb24largepal.bmp b/image/test/reftest/bmp/bmpsuite/q/rgb24largepal.bmp new file mode 100644 index 0000000000..d5e418c2d4 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgb24largepal.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgb24lprof.bmp b/image/test/reftest/bmp/bmpsuite/q/rgb24lprof.bmp new file mode 100644 index 0000000000..b868b88f20 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgb24lprof.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgb24png.bmp b/image/test/reftest/bmp/bmpsuite/q/rgb24png.bmp new file mode 100644 index 0000000000..e87ec7adda Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgb24png.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgb24prof.bmp b/image/test/reftest/bmp/bmpsuite/q/rgb24prof.bmp new file mode 100644 index 0000000000..627e676eae Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgb24prof.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgb24prof2.bmp b/image/test/reftest/bmp/bmpsuite/q/rgb24prof2.bmp new file mode 100644 index 0000000000..f9f61b8ee3 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgb24prof2.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgb24rle24.bmp b/image/test/reftest/bmp/bmpsuite/q/rgb24rle24.bmp new file mode 100644 index 0000000000..360aee649c Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgb24rle24.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgb32-111110.bmp b/image/test/reftest/bmp/bmpsuite/q/rgb32-111110.bmp new file mode 100644 index 0000000000..ec07d89b5b Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgb32-111110.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgb32-7187.bmp b/image/test/reftest/bmp/bmpsuite/q/rgb32-7187.bmp new file mode 100644 index 0000000000..887ba52c91 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgb32-7187.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgb32-7187.png b/image/test/reftest/bmp/bmpsuite/q/rgb32-7187.png new file mode 100644 index 0000000000..a1da44d6be Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgb32-7187.png differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgb32-xbgr.bmp b/image/test/reftest/bmp/bmpsuite/q/rgb32-xbgr.bmp new file mode 100644 index 0000000000..c6c05e1480 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgb32-xbgr.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgb32fakealpha.bmp b/image/test/reftest/bmp/bmpsuite/q/rgb32fakealpha.bmp new file mode 100644 index 0000000000..cb544da5b6 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgb32fakealpha.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgb32h52.bmp b/image/test/reftest/bmp/bmpsuite/q/rgb32h52.bmp new file mode 100644 index 0000000000..db6e4538ef Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgb32h52.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgba16-1924.bmp b/image/test/reftest/bmp/bmpsuite/q/rgba16-1924.bmp new file mode 100644 index 0000000000..6564098a4d Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgba16-1924.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgba16-1924.png b/image/test/reftest/bmp/bmpsuite/q/rgba16-1924.png new file mode 100644 index 0000000000..0fc182f153 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgba16-1924.png differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgba16-4444.bmp b/image/test/reftest/bmp/bmpsuite/q/rgba16-4444.bmp new file mode 100644 index 0000000000..051ff23589 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgba16-4444.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgba16-4444.png b/image/test/reftest/bmp/bmpsuite/q/rgba16-4444.png new file mode 100644 index 0000000000..bfeda6faed Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgba16-4444.png differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgba16-5551.bmp b/image/test/reftest/bmp/bmpsuite/q/rgba16-5551.bmp new file mode 100644 index 0000000000..73e2cd533f Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgba16-5551.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgba16-5551.png b/image/test/reftest/bmp/bmpsuite/q/rgba16-5551.png new file mode 100644 index 0000000000..613126a8ab Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgba16-5551.png differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgba32-1.bmp b/image/test/reftest/bmp/bmpsuite/q/rgba32-1.bmp new file mode 100644 index 0000000000..3c1e2648fc Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgba32-1.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgba32-1010102.bmp b/image/test/reftest/bmp/bmpsuite/q/rgba32-1010102.bmp new file mode 100644 index 0000000000..1a918cebf5 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgba32-1010102.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgba32-1010102.png b/image/test/reftest/bmp/bmpsuite/q/rgba32-1010102.png new file mode 100644 index 0000000000..a472fbc799 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgba32-1010102.png differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgba32-2.bmp b/image/test/reftest/bmp/bmpsuite/q/rgba32-2.bmp new file mode 100644 index 0000000000..829c7c7e34 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgba32-2.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgba32-61754.bmp b/image/test/reftest/bmp/bmpsuite/q/rgba32-61754.bmp new file mode 100644 index 0000000000..d5936fd20b Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgba32-61754.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgba32-61754.png b/image/test/reftest/bmp/bmpsuite/q/rgba32-61754.png new file mode 100644 index 0000000000..c593b14c66 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgba32-61754.png differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgba32-81284.bmp b/image/test/reftest/bmp/bmpsuite/q/rgba32-81284.bmp new file mode 100644 index 0000000000..1f9fc29d6b Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgba32-81284.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgba32-81284.png b/image/test/reftest/bmp/bmpsuite/q/rgba32-81284.png new file mode 100644 index 0000000000..c958cd36fc Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgba32-81284.png differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgba32.png b/image/test/reftest/bmp/bmpsuite/q/rgba32.png new file mode 100644 index 0000000000..25e542a655 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgba32.png differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgba32abf.bmp b/image/test/reftest/bmp/bmpsuite/q/rgba32abf.bmp new file mode 100644 index 0000000000..d9bb0189c4 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgba32abf.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/rgba32h56.bmp b/image/test/reftest/bmp/bmpsuite/q/rgba32h56.bmp new file mode 100644 index 0000000000..343baa3300 Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/q/rgba32h56.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/q/wrapper.html b/image/test/reftest/bmp/bmpsuite/q/wrapper.html new file mode 100644 index 0000000000..22b74c8fc1 --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/q/wrapper.html @@ -0,0 +1,28 @@ + + + +Image reftest wrapper + + + + + + + + + + diff --git a/image/test/reftest/bmp/bmpsuite/reftest.list b/image/test/reftest/bmp/bmpsuite/reftest.list new file mode 100644 index 0000000000..532ea5ed93 --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/reftest.list @@ -0,0 +1,8 @@ +# bmpsuite tests + +# See README.mozilla for details about these tests. + +include g/reftest.list +include q/reftest.list +include b/reftest.list +include x/reftest.list diff --git a/image/test/reftest/bmp/bmpsuite/x/ba-bm.bmp b/image/test/reftest/bmp/bmpsuite/x/ba-bm.bmp new file mode 100644 index 0000000000..d2615bde3e Binary files /dev/null and b/image/test/reftest/bmp/bmpsuite/x/ba-bm.bmp differ diff --git a/image/test/reftest/bmp/bmpsuite/x/reftest.list b/image/test/reftest/bmp/bmpsuite/x/reftest.list new file mode 100644 index 0000000000..3c93479292 --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/x/reftest.list @@ -0,0 +1,10 @@ +# bmpsuite 'files in formats related to BMP, that you might not consider to +# truly be in "BMP format"' tests + +# See ../README.mozilla for details. + +# "This image uses the OS/2v2 “Bitmap Array†(BA) container format. Although a +# BA file may contain multiple images, this file has only one." +== wrapper.html?ba-bm.bmp about:blank + + diff --git a/image/test/reftest/bmp/bmpsuite/x/wrapper.html b/image/test/reftest/bmp/bmpsuite/x/wrapper.html new file mode 100644 index 0000000000..f6c3ade538 --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/x/wrapper.html @@ -0,0 +1,28 @@ + + + +Image reftest wrapper + + + + + + + + + + diff --git a/image/test/reftest/bmp/reftest.list b/image/test/reftest/bmp/reftest.list new file mode 100644 index 0000000000..87183e6b2f --- /dev/null +++ b/image/test/reftest/bmp/reftest.list @@ -0,0 +1,16 @@ +# BMP tests + +include bmp-1bpp/reftest.list +include bmp-4bpp/reftest.list +include bmp-8bpp/reftest.list +include bmp-24bpp/reftest.list +include bmp-corrupted/reftest.list +include bmpsuite/reftest.list + +# Two bmp files where the offset to the start of the image data in the file +# is past the end of the file. In 1240629-1.bmp the offset us uint32_max, +# so we are testing that we don't try to allocate a buffer that size (and +# fail on 32 bit platforms) and declare the image in error state. If in the +# future we decide that such bmps (offset past the end of the file) are +# invalid the test will still pass, but won't be testing much. +== 1240629-1.bmp 1240629-2.bmp diff --git a/image/test/reftest/color-management/color-curv.png b/image/test/reftest/color-management/color-curv.png new file mode 100644 index 0000000000..994e3a38a6 Binary files /dev/null and b/image/test/reftest/color-management/color-curv.png differ diff --git a/image/test/reftest/color-management/color-lin.png b/image/test/reftest/color-management/color-lin.png new file mode 100644 index 0000000000..0ee276fca3 Binary files /dev/null and b/image/test/reftest/color-management/color-lin.png differ diff --git a/image/test/reftest/color-management/color-table.png b/image/test/reftest/color-management/color-table.png new file mode 100644 index 0000000000..355b3a2ba6 Binary files /dev/null and b/image/test/reftest/color-management/color-table.png differ diff --git a/image/test/reftest/color-management/invalid-chrm-ref.png b/image/test/reftest/color-management/invalid-chrm-ref.png new file mode 100644 index 0000000000..85f83f7834 Binary files /dev/null and b/image/test/reftest/color-management/invalid-chrm-ref.png differ diff --git a/image/test/reftest/color-management/invalid-chrm.png b/image/test/reftest/color-management/invalid-chrm.png new file mode 100644 index 0000000000..33dc9e9ce0 Binary files /dev/null and b/image/test/reftest/color-management/invalid-chrm.png differ diff --git a/image/test/reftest/color-management/invalid-whitepoint.png b/image/test/reftest/color-management/invalid-whitepoint.png new file mode 100644 index 0000000000..383a0a035f Binary files /dev/null and b/image/test/reftest/color-management/invalid-whitepoint.png differ diff --git a/image/test/reftest/color-management/reftest.list b/image/test/reftest/color-management/reftest.list new file mode 100644 index 0000000000..a99b4d4391 --- /dev/null +++ b/image/test/reftest/color-management/reftest.list @@ -0,0 +1,7 @@ +# Colormangement + +# test for bug 489133, test for bug 460520 +== invalid-chrm.png invalid-chrm-ref.png +== invalid-whitepoint.png invalid-chrm-ref.png +# test for bug 488955 +== trc-type.html trc-type-ref.html # Bug 1560617 diff --git a/image/test/reftest/color-management/trc-type-ref.html b/image/test/reftest/color-management/trc-type-ref.html new file mode 100644 index 0000000000..5140e6e6af --- /dev/null +++ b/image/test/reftest/color-management/trc-type-ref.html @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/image/test/reftest/color-management/trc-type.html b/image/test/reftest/color-management/trc-type.html new file mode 100644 index 0000000000..f13052bbf4 --- /dev/null +++ b/image/test/reftest/color-management/trc-type.html @@ -0,0 +1,53 @@ + + + + + + + + + diff --git a/image/test/reftest/colordepth.html b/image/test/reftest/colordepth.html new file mode 100644 index 0000000000..15d2c9f95f --- /dev/null +++ b/image/test/reftest/colordepth.html @@ -0,0 +1,16 @@ + diff --git a/image/test/reftest/downscaling/100x100.gif b/image/test/reftest/downscaling/100x100.gif new file mode 100644 index 0000000000..4ff770d368 Binary files /dev/null and b/image/test/reftest/downscaling/100x100.gif differ diff --git a/image/test/reftest/downscaling/100x100.jpg b/image/test/reftest/downscaling/100x100.jpg new file mode 100644 index 0000000000..cea2c240d8 Binary files /dev/null and b/image/test/reftest/downscaling/100x100.jpg differ diff --git a/image/test/reftest/downscaling/100x100.png b/image/test/reftest/downscaling/100x100.png new file mode 100644 index 0000000000..eb3cb08e1e Binary files /dev/null and b/image/test/reftest/downscaling/100x100.png differ diff --git a/image/test/reftest/downscaling/100x32768.gif b/image/test/reftest/downscaling/100x32768.gif new file mode 100644 index 0000000000..f55a2f482f Binary files /dev/null and b/image/test/reftest/downscaling/100x32768.gif differ diff --git a/image/test/reftest/downscaling/100x32768.jpg b/image/test/reftest/downscaling/100x32768.jpg new file mode 100644 index 0000000000..e89acc0334 Binary files /dev/null and b/image/test/reftest/downscaling/100x32768.jpg differ diff --git a/image/test/reftest/downscaling/100x32768.png b/image/test/reftest/downscaling/100x32768.png new file mode 100644 index 0000000000..7cd5509cf2 Binary files /dev/null and b/image/test/reftest/downscaling/100x32768.png differ diff --git a/image/test/reftest/downscaling/1404366-1.html b/image/test/reftest/downscaling/1404366-1.html new file mode 100644 index 0000000000..165cc7f934 --- /dev/null +++ b/image/test/reftest/downscaling/1404366-1.html @@ -0,0 +1,14 @@ + + + + + + + \ No newline at end of file diff --git a/image/test/reftest/downscaling/1404366-1.ico b/image/test/reftest/downscaling/1404366-1.ico new file mode 100644 index 0000000000..51c020b069 Binary files /dev/null and b/image/test/reftest/downscaling/1404366-1.ico differ diff --git a/image/test/reftest/downscaling/1421191-1.html b/image/test/reftest/downscaling/1421191-1.html new file mode 100644 index 0000000000..b8146a2371 --- /dev/null +++ b/image/test/reftest/downscaling/1421191-1.html @@ -0,0 +1,20 @@ + + + + + + + + diff --git a/image/test/reftest/downscaling/1421191-1.png b/image/test/reftest/downscaling/1421191-1.png new file mode 100644 index 0000000000..e9b756a79e Binary files /dev/null and b/image/test/reftest/downscaling/1421191-1.png differ diff --git a/image/test/reftest/downscaling/32768x100.gif b/image/test/reftest/downscaling/32768x100.gif new file mode 100644 index 0000000000..2194d13efc Binary files /dev/null and b/image/test/reftest/downscaling/32768x100.gif differ diff --git a/image/test/reftest/downscaling/32768x100.jpg b/image/test/reftest/downscaling/32768x100.jpg new file mode 100644 index 0000000000..807b9adb27 Binary files /dev/null and b/image/test/reftest/downscaling/32768x100.jpg differ diff --git a/image/test/reftest/downscaling/32768x100.png b/image/test/reftest/downscaling/32768x100.png new file mode 100644 index 0000000000..3fe4fe1ce5 Binary files /dev/null and b/image/test/reftest/downscaling/32768x100.png differ diff --git a/image/test/reftest/downscaling/black-border-bottom.png b/image/test/reftest/downscaling/black-border-bottom.png new file mode 100644 index 0000000000..efa7ce2dce Binary files /dev/null and b/image/test/reftest/downscaling/black-border-bottom.png differ diff --git a/image/test/reftest/downscaling/black-border-left.png b/image/test/reftest/downscaling/black-border-left.png new file mode 100644 index 0000000000..11bc67e983 Binary files /dev/null and b/image/test/reftest/downscaling/black-border-left.png differ diff --git a/image/test/reftest/downscaling/black-border-rect.svg b/image/test/reftest/downscaling/black-border-rect.svg new file mode 100644 index 0000000000..0fa01a0a63 --- /dev/null +++ b/image/test/reftest/downscaling/black-border-rect.svg @@ -0,0 +1,3 @@ + + + diff --git a/image/test/reftest/downscaling/black-border-right.png b/image/test/reftest/downscaling/black-border-right.png new file mode 100644 index 0000000000..081c52d5bc Binary files /dev/null and b/image/test/reftest/downscaling/black-border-right.png differ diff --git a/image/test/reftest/downscaling/black-border-top.png b/image/test/reftest/downscaling/black-border-top.png new file mode 100644 index 0000000000..fc6e69e02a Binary files /dev/null and b/image/test/reftest/downscaling/black-border-top.png differ diff --git a/image/test/reftest/downscaling/bmp-size-16x16-24bpp.png b/image/test/reftest/downscaling/bmp-size-16x16-24bpp.png new file mode 100644 index 0000000000..c04869e728 Binary files /dev/null and b/image/test/reftest/downscaling/bmp-size-16x16-24bpp.png differ diff --git a/image/test/reftest/downscaling/downscale-1-bigimage.png b/image/test/reftest/downscaling/downscale-1-bigimage.png new file mode 100644 index 0000000000..5e018590c3 Binary files /dev/null and b/image/test/reftest/downscaling/downscale-1-bigimage.png differ diff --git a/image/test/reftest/downscaling/downscale-1-ref.html b/image/test/reftest/downscaling/downscale-1-ref.html new file mode 100644 index 0000000000..63ec56ef7c --- /dev/null +++ b/image/test/reftest/downscaling/downscale-1-ref.html @@ -0,0 +1,8 @@ + + + + + + + diff --git a/image/test/reftest/downscaling/downscale-1-smallimage.png b/image/test/reftest/downscaling/downscale-1-smallimage.png new file mode 100644 index 0000000000..588e6b78df Binary files /dev/null and b/image/test/reftest/downscaling/downscale-1-smallimage.png differ diff --git a/image/test/reftest/downscaling/downscale-1.html b/image/test/reftest/downscaling/downscale-1.html new file mode 100644 index 0000000000..a9629ef855 --- /dev/null +++ b/image/test/reftest/downscaling/downscale-1.html @@ -0,0 +1,24 @@ + + + + + + + + + + + diff --git a/image/test/reftest/downscaling/downscale-16px.html b/image/test/reftest/downscaling/downscale-16px.html new file mode 100644 index 0000000000..06d6db2bf6 --- /dev/null +++ b/image/test/reftest/downscaling/downscale-16px.html @@ -0,0 +1,28 @@ + + + +Image reftest wrapper + + + + + + + + + + diff --git a/image/test/reftest/downscaling/downscale-2a.html b/image/test/reftest/downscaling/downscale-2a.html new file mode 100644 index 0000000000..fac11ccee5 --- /dev/null +++ b/image/test/reftest/downscaling/downscale-2a.html @@ -0,0 +1,31 @@ + + + + + + + + + + + diff --git a/image/test/reftest/downscaling/downscale-2b.html b/image/test/reftest/downscaling/downscale-2b.html new file mode 100644 index 0000000000..af7ecbff33 --- /dev/null +++ b/image/test/reftest/downscaling/downscale-2b.html @@ -0,0 +1,31 @@ + + + + + + + + + + + diff --git a/image/test/reftest/downscaling/downscale-2c.html b/image/test/reftest/downscaling/downscale-2c.html new file mode 100644 index 0000000000..18f70456b1 --- /dev/null +++ b/image/test/reftest/downscaling/downscale-2c.html @@ -0,0 +1,31 @@ + + + + + + + + + + + diff --git a/image/test/reftest/downscaling/downscale-2d.html b/image/test/reftest/downscaling/downscale-2d.html new file mode 100644 index 0000000000..8d9547b73e --- /dev/null +++ b/image/test/reftest/downscaling/downscale-2d.html @@ -0,0 +1,31 @@ + + + + + + + + + + + diff --git a/image/test/reftest/downscaling/downscale-2e.html b/image/test/reftest/downscaling/downscale-2e.html new file mode 100644 index 0000000000..c3d0d771f3 --- /dev/null +++ b/image/test/reftest/downscaling/downscale-2e.html @@ -0,0 +1,31 @@ + + + + + + + + + + + diff --git a/image/test/reftest/downscaling/downscale-2f.html b/image/test/reftest/downscaling/downscale-2f.html new file mode 100644 index 0000000000..42cfad1f57 --- /dev/null +++ b/image/test/reftest/downscaling/downscale-2f.html @@ -0,0 +1,31 @@ + + + + + + + + + + + diff --git a/image/test/reftest/downscaling/downscale-32px-ref.html b/image/test/reftest/downscaling/downscale-32px-ref.html new file mode 100644 index 0000000000..1caf3c73bf --- /dev/null +++ b/image/test/reftest/downscaling/downscale-32px-ref.html @@ -0,0 +1,8 @@ + + + + + + + diff --git a/image/test/reftest/downscaling/downscale-32px.html b/image/test/reftest/downscaling/downscale-32px.html new file mode 100644 index 0000000000..f5fce324d9 --- /dev/null +++ b/image/test/reftest/downscaling/downscale-32px.html @@ -0,0 +1,31 @@ + + + + + + + + + + + diff --git a/image/test/reftest/downscaling/downscale-8px.html b/image/test/reftest/downscaling/downscale-8px.html new file mode 100644 index 0000000000..c0586a3657 --- /dev/null +++ b/image/test/reftest/downscaling/downscale-8px.html @@ -0,0 +1,27 @@ + + + +Image reftest wrapper + + + + + + + + + diff --git a/image/test/reftest/downscaling/downscale-moz-icon-1-ref.html b/image/test/reftest/downscaling/downscale-moz-icon-1-ref.html new file mode 100644 index 0000000000..a7dd5ab8aa --- /dev/null +++ b/image/test/reftest/downscaling/downscale-moz-icon-1-ref.html @@ -0,0 +1,41 @@ + + + + + + Reference for downscaling moz-icon images (bug 1261964) + + + + + + + diff --git a/image/test/reftest/downscaling/downscale-moz-icon-1.html b/image/test/reftest/downscaling/downscale-moz-icon-1.html new file mode 100644 index 0000000000..ba37951274 --- /dev/null +++ b/image/test/reftest/downscaling/downscale-moz-icon-1.html @@ -0,0 +1,19 @@ + + + + + + Testcase for downscaling moz-icon images (bug 1261964) + + + + + + diff --git a/image/test/reftest/downscaling/downscale-orient-ref.html b/image/test/reftest/downscaling/downscale-orient-ref.html new file mode 100644 index 0000000000..e32141868f --- /dev/null +++ b/image/test/reftest/downscaling/downscale-orient-ref.html @@ -0,0 +1,24 @@ + + + + + + + + + + + diff --git a/image/test/reftest/downscaling/downscale-orient-ref.png b/image/test/reftest/downscaling/downscale-orient-ref.png new file mode 100644 index 0000000000..0db684e0d7 Binary files /dev/null and b/image/test/reftest/downscaling/downscale-orient-ref.png differ diff --git a/image/test/reftest/downscaling/downscale-orient.html b/image/test/reftest/downscaling/downscale-orient.html new file mode 100644 index 0000000000..11b849b27e --- /dev/null +++ b/image/test/reftest/downscaling/downscale-orient.html @@ -0,0 +1,24 @@ + + + + + + + + + + + diff --git a/image/test/reftest/downscaling/downscale-png.html b/image/test/reftest/downscaling/downscale-png.html new file mode 100644 index 0000000000..4752b2155a --- /dev/null +++ b/image/test/reftest/downscaling/downscale-png.html @@ -0,0 +1,31 @@ + + + + + + + + + + + diff --git a/image/test/reftest/downscaling/downscale-svg-1-ref.html b/image/test/reftest/downscaling/downscale-svg-1-ref.html new file mode 100644 index 0000000000..8935619ebd --- /dev/null +++ b/image/test/reftest/downscaling/downscale-svg-1-ref.html @@ -0,0 +1,13 @@ + + + + + + + + diff --git a/image/test/reftest/downscaling/downscale-svg-1a.html b/image/test/reftest/downscaling/downscale-svg-1a.html new file mode 100644 index 0000000000..2263cc9982 --- /dev/null +++ b/image/test/reftest/downscaling/downscale-svg-1a.html @@ -0,0 +1,8 @@ + + + + +
+ + diff --git a/image/test/reftest/downscaling/downscale-svg-1b.html b/image/test/reftest/downscaling/downscale-svg-1b.html new file mode 100644 index 0000000000..9db239c7cd --- /dev/null +++ b/image/test/reftest/downscaling/downscale-svg-1b.html @@ -0,0 +1,8 @@ + + + + +
+ + diff --git a/image/test/reftest/downscaling/downscale-svg-1c.html b/image/test/reftest/downscaling/downscale-svg-1c.html new file mode 100644 index 0000000000..f8babf0267 --- /dev/null +++ b/image/test/reftest/downscaling/downscale-svg-1c.html @@ -0,0 +1,8 @@ + + + + +
+ + diff --git a/image/test/reftest/downscaling/downscale-svg-1d.html b/image/test/reftest/downscaling/downscale-svg-1d.html new file mode 100644 index 0000000000..9a56a51de0 --- /dev/null +++ b/image/test/reftest/downscaling/downscale-svg-1d.html @@ -0,0 +1,8 @@ + + + + +
+ + diff --git a/image/test/reftest/downscaling/downscale-svg-1e.html b/image/test/reftest/downscaling/downscale-svg-1e.html new file mode 100644 index 0000000000..732ac22c96 --- /dev/null +++ b/image/test/reftest/downscaling/downscale-svg-1e.html @@ -0,0 +1,8 @@ + + + + +
+ + diff --git a/image/test/reftest/downscaling/downscale-svg-1f.html b/image/test/reftest/downscaling/downscale-svg-1f.html new file mode 100644 index 0000000000..0124682c70 --- /dev/null +++ b/image/test/reftest/downscaling/downscale-svg-1f.html @@ -0,0 +1,8 @@ + + + + +
+ + diff --git a/image/test/reftest/downscaling/ff-0RGB.ico b/image/test/reftest/downscaling/ff-0RGB.ico new file mode 100644 index 0000000000..56116b9f6a Binary files /dev/null and b/image/test/reftest/downscaling/ff-0RGB.ico differ diff --git a/image/test/reftest/downscaling/ff-0RGB.png b/image/test/reftest/downscaling/ff-0RGB.png new file mode 100644 index 0000000000..749ffcdfb3 Binary files /dev/null and b/image/test/reftest/downscaling/ff-0RGB.png differ diff --git a/image/test/reftest/downscaling/ff-ARGB.ico b/image/test/reftest/downscaling/ff-ARGB.ico new file mode 100644 index 0000000000..4681dc6495 Binary files /dev/null and b/image/test/reftest/downscaling/ff-ARGB.ico differ diff --git a/image/test/reftest/downscaling/ff-ARGB.png b/image/test/reftest/downscaling/ff-ARGB.png new file mode 100644 index 0000000000..74ea0e2f39 Binary files /dev/null and b/image/test/reftest/downscaling/ff-ARGB.png differ diff --git a/image/test/reftest/downscaling/huge-1.html b/image/test/reftest/downscaling/huge-1.html new file mode 100644 index 0000000000..6685600086 --- /dev/null +++ b/image/test/reftest/downscaling/huge-1.html @@ -0,0 +1,9 @@ + + + + + diff --git a/image/test/reftest/downscaling/image-pre-rotated-90-deg.jpg b/image/test/reftest/downscaling/image-pre-rotated-90-deg.jpg new file mode 100644 index 0000000000..b8817f9bf5 Binary files /dev/null and b/image/test/reftest/downscaling/image-pre-rotated-90-deg.jpg differ diff --git a/image/test/reftest/downscaling/lime-red-256px-bmp-in.ico b/image/test/reftest/downscaling/lime-red-256px-bmp-in.ico new file mode 100644 index 0000000000..b372cba4a2 Binary files /dev/null and b/image/test/reftest/downscaling/lime-red-256px-bmp-in.ico differ diff --git a/image/test/reftest/downscaling/lime-red-256px-png-in.ico b/image/test/reftest/downscaling/lime-red-256px-png-in.ico new file mode 100644 index 0000000000..e8578d2934 Binary files /dev/null and b/image/test/reftest/downscaling/lime-red-256px-png-in.ico differ diff --git a/image/test/reftest/downscaling/lime-red-256px.bmp b/image/test/reftest/downscaling/lime-red-256px.bmp new file mode 100644 index 0000000000..3dc808970f Binary files /dev/null and b/image/test/reftest/downscaling/lime-red-256px.bmp differ diff --git a/image/test/reftest/downscaling/lime-red-256px.gif b/image/test/reftest/downscaling/lime-red-256px.gif new file mode 100644 index 0000000000..f9f669aa4d Binary files /dev/null and b/image/test/reftest/downscaling/lime-red-256px.gif differ diff --git a/image/test/reftest/downscaling/lime-red-256px.jpg b/image/test/reftest/downscaling/lime-red-256px.jpg new file mode 100644 index 0000000000..ac8efdf360 Binary files /dev/null and b/image/test/reftest/downscaling/lime-red-256px.jpg differ diff --git a/image/test/reftest/downscaling/lime-red-256px.png b/image/test/reftest/downscaling/lime-red-256px.png new file mode 100644 index 0000000000..2be2e05a59 Binary files /dev/null and b/image/test/reftest/downscaling/lime-red-256px.png differ diff --git a/image/test/reftest/downscaling/lime-red-256px.svg b/image/test/reftest/downscaling/lime-red-256px.svg new file mode 100644 index 0000000000..530ae6d6d5 --- /dev/null +++ b/image/test/reftest/downscaling/lime-red-256px.svg @@ -0,0 +1,5 @@ + + + + diff --git a/image/test/reftest/downscaling/lime-red-32px.png b/image/test/reftest/downscaling/lime-red-32px.png new file mode 100644 index 0000000000..bfa2e7b737 Binary files /dev/null and b/image/test/reftest/downscaling/lime-red-32px.png differ diff --git a/image/test/reftest/downscaling/png-interlaced.png b/image/test/reftest/downscaling/png-interlaced.png new file mode 100644 index 0000000000..a938d0bd6a Binary files /dev/null and b/image/test/reftest/downscaling/png-interlaced.png differ diff --git a/image/test/reftest/downscaling/png-normal.png b/image/test/reftest/downscaling/png-normal.png new file mode 100644 index 0000000000..c2780fdd93 Binary files /dev/null and b/image/test/reftest/downscaling/png-normal.png differ diff --git a/image/test/reftest/downscaling/reftest.list b/image/test/reftest/downscaling/reftest.list new file mode 100644 index 0000000000..f01780ffaa --- /dev/null +++ b/image/test/reftest/downscaling/reftest.list @@ -0,0 +1,217 @@ +# Reftests for downscaling +# +# Downscaling can be a lossy process, so a bit of mismatch is acceptable here, +# as long as it's barely noticeable visually. When necessary, this can be +# explicitly allowed via 'fuzzy'/'fuzzy-if' annotations. +# +# Many of these tests check primarily that we don't lose rows or columns of +# pixels when downscaling by making sure that the result isn't too similar to +# about:blank. A small amount of fuzziness is used to ensure that the tests +# don't pass because of very slight deviations; passing tests should be +# substantially different from about:blank. This fuzziness should *not* be +# removed as doing so would make the tests pass in situations where they +# shouldn't. +# +# IMPORTANT: For robustness, each test should be listed *twice* in this +# manifest -- once with the high quality downscaling pref disabled, and once +# with this pref enabled. The pref is set via "defaults", so +# simply appending a new test to the lists below each of those lines should be +# sufficient. +# +# Also note that Mac OS X has its own system-level downscaling algorithm, so +# tests here may need Mac-specific "fuzzy-if(cocoaWidget,...)" annotations. +# Similarly, modern versions of Windows have slightly different downscaling +# behavior than other platforms, and may require "fuzzy-if(winWidget,...)". + + +# RUN TESTS NOT AFFECTED BY DOWNSCALE-DURING-DECODE: +# ================================================== +fuzzy(0-14,0-416) == downscale-svg-1a.html downscale-svg-1-ref.html?80 +fuzzy(65-65,468-480) == downscale-svg-1b.html downscale-svg-1-ref.html?72 +fuzzy(0-8,0-292) == downscale-svg-1c.html downscale-svg-1-ref.html?64 +fuzzy(7-7,208-208) == downscale-svg-1d.html downscale-svg-1-ref.html?53 +fuzzy(54-55,178-178) == downscale-svg-1e.html downscale-svg-1-ref.html?40 +fuzzy(64-64,31-31) == downscale-svg-1f.html downscale-svg-1-ref.html?24 + +# RUN TESTS WITH DOWNSCALE-DURING-DECODE DISABLED: +# ================================================ +defaults pref(image.downscale-during-decode.enabled,false) + +fuzzy-if(winWidget,0-16,0-20) fuzzy-if(cocoaWidget,0-106,0-31) == downscale-1.html downscale-1-ref.html + +fuzzy(0-20,0-999) != downscale-2a.html?203,52,left about:blank +fuzzy(0-20,0-999) != downscale-2b.html?203,52,left about:blank +fuzzy(0-20,0-999) != downscale-2c.html?203,52,left about:blank +fuzzy(0-20,0-999) != downscale-2d.html?203,52,left about:blank +fuzzy(0-20,0-999) != downscale-2e.html?203,52,left about:blank + +fuzzy(0-20,0-999) != downscale-2a.html?205,53,left about:blank +fuzzy(0-20,0-999) != downscale-2b.html?205,53,left about:blank +fuzzy(0-20,0-999) != downscale-2c.html?205,53,left about:blank +fuzzy(0-20,0-999) != downscale-2d.html?205,53,left about:blank +fuzzy(0-20,0-999) != downscale-2e.html?205,53,left about:blank + +fuzzy(0-20,0-999) != downscale-2a.html?203,52,right about:blank +fuzzy(0-20,0-999) != downscale-2b.html?203,52,right about:blank +fuzzy(0-20,0-999) != downscale-2c.html?203,52,right about:blank +fuzzy(0-20,0-999) != downscale-2d.html?203,52,right about:blank +fuzzy(0-20,0-999) != downscale-2e.html?203,52,right about:blank + +fuzzy(0-20,0-999) != downscale-2a.html?205,53,right about:blank +fuzzy(0-20,0-999) != downscale-2b.html?205,53,right about:blank +fuzzy(0-20,0-999) != downscale-2c.html?205,53,right about:blank +fuzzy(0-20,0-999) != downscale-2d.html?205,53,right about:blank +fuzzy(0-20,0-999) != downscale-2e.html?205,53,right about:blank + +fuzzy(0-20,0-999) != downscale-2a.html?203,52,top about:blank +fuzzy(0-20,0-999) != downscale-2b.html?203,52,top about:blank +fuzzy(0-20,0-999) != downscale-2c.html?203,52,top about:blank +fuzzy(0-20,0-999) != downscale-2d.html?203,52,top about:blank +fuzzy(0-20,0-999) != downscale-2e.html?203,52,top about:blank + +fuzzy(0-20,0-999) != downscale-2a.html?205,53,top about:blank +fuzzy(0-20,0-999) != downscale-2b.html?205,53,top about:blank +fuzzy(0-20,0-999) != downscale-2c.html?205,53,top about:blank +fuzzy(0-20,0-999) != downscale-2d.html?205,53,top about:blank +fuzzy(0-20,0-999) != downscale-2e.html?205,53,top about:blank + +fuzzy(0-20,0-999) != downscale-2a.html?203,52,bottom about:blank +fuzzy(0-20,0-999) != downscale-2b.html?203,52,bottom about:blank +fuzzy(0-20,0-999) != downscale-2c.html?203,52,bottom about:blank +fuzzy(0-20,0-999) != downscale-2d.html?203,52,bottom about:blank +fuzzy(0-20,0-999) != downscale-2e.html?203,52,bottom about:blank + +fuzzy(0-20,0-999) != downscale-2a.html?205,53,bottom about:blank +fuzzy(0-20,0-999) != downscale-2b.html?205,53,bottom about:blank +fuzzy(0-20,0-999) != downscale-2c.html?205,53,bottom about:blank +fuzzy(0-20,0-999) != downscale-2d.html?205,53,bottom about:blank +fuzzy(0-20,0-999) != downscale-2e.html?205,53,bottom about:blank + +# Skip on Android because it runs reftests via http, and moz-icon isn't +# accessible from http/https origins anymore. +fuzzy(0-27,0-3940) fuzzy-if(gtkWidget,0-0,0-0) skip-if(Android) fuzzy-if(appleSilicon,0-20,0-10123) == downscale-moz-icon-1.html downscale-moz-icon-1-ref.html # gtkWidget Bug 1592059: regular is 2616, no-accel is 0, qr passes with 0 + +== downscale-png.html?16,16,interlaced downscale-png.html?16,16,normal +== downscale-png.html?24,24,interlaced downscale-png.html?24,24,normal + +# Non-transparent and transparent ICO images +== downscale-16px.html?ff-0RGB.ico downscale-16px.html?ff-0RGB.png +fuzzy(0-1,0-1) fuzzy-if(gtkWidget&&swgl,1-1,1-1) == downscale-16px.html?ff-ARGB.ico downscale-16px.html?ff-ARGB.png + +# Test downscaling from all supported formats from 256 to 32. +== downscale-32px.html?.bmp downscale-32px-ref.html +== downscale-32px.html?.gif downscale-32px-ref.html +fuzzy(0-1,0-1024) == downscale-32px.html?.jpg downscale-32px-ref.html +== downscale-32px.html?.png downscale-32px-ref.html +== downscale-32px.html?.svg downscale-32px-ref.html +== downscale-32px.html?-bmp-in.ico downscale-32px-ref.html +== downscale-32px.html?-png-in.ico downscale-32px-ref.html + +# Test downscaling a JPEG with orientation metadata. +fuzzy(0-1,0-50) == downscale-orient.html downscale-orient-ref.html + +# RUN TESTS WITH DOWNSCALE-DURING-DECODE ENABLED: +# =============================================== +defaults pref(image.downscale-during-decode.enabled,true) + +fuzzy(0-31,0-127) fuzzy-if(d2d,0-31,0-147) == downscale-1.html downscale-1-ref.html # intermittently 147 pixels on win7 accelerated only (not win8) + +fuzzy(0-20,0-999) != downscale-2a.html?203,52,left about:blank +fuzzy(0-20,0-999) != downscale-2b.html?203,52,left about:blank +fuzzy(0-20,0-999) != downscale-2c.html?203,52,left about:blank +fuzzy(0-20,0-999) != downscale-2d.html?203,52,left about:blank +fuzzy(0-20,0-999) != downscale-2e.html?203,52,left about:blank +fuzzy(0-20,0-999) != downscale-2f.html?203,52,left about:blank + +fuzzy(0-20,0-999) != downscale-2a.html?205,53,left about:blank +fuzzy(0-20,0-999) != downscale-2b.html?205,53,left about:blank +fuzzy(0-20,0-999) != downscale-2c.html?205,53,left about:blank +fuzzy(0-20,0-999) != downscale-2d.html?205,53,left about:blank +fuzzy(0-20,0-999) != downscale-2e.html?205,53,left about:blank +fuzzy(0-20,0-999) != downscale-2f.html?205,53,left about:blank + +fuzzy(0-20,0-999) != downscale-2a.html?203,52,right about:blank +fuzzy(0-20,0-999) != downscale-2b.html?203,52,right about:blank +fuzzy(0-20,0-999) != downscale-2c.html?203,52,right about:blank +fuzzy(0-20,0-999) != downscale-2d.html?203,52,right about:blank +fuzzy(0-20,0-999) != downscale-2e.html?203,52,right about:blank +fuzzy(0-20,0-999) != downscale-2f.html?203,52,right about:blank + +fuzzy(0-20,0-999) != downscale-2a.html?205,53,right about:blank +fuzzy(0-20,0-999) != downscale-2b.html?205,53,right about:blank +fuzzy(0-20,0-999) != downscale-2c.html?205,53,right about:blank +fuzzy(0-20,0-999) != downscale-2d.html?205,53,right about:blank +fuzzy(0-20,0-999) != downscale-2e.html?205,53,right about:blank +fuzzy(0-20,0-999) != downscale-2f.html?205,53,right about:blank + +fuzzy(0-20,0-999) != downscale-2a.html?203,52,top about:blank +fuzzy(0-20,0-999) != downscale-2b.html?203,52,top about:blank +fuzzy(0-20,0-999) != downscale-2c.html?203,52,top about:blank +fuzzy(0-20,0-999) != downscale-2d.html?203,52,top about:blank +fuzzy(0-20,0-999) != downscale-2e.html?203,52,top about:blank +fuzzy(0-20,0-999) != downscale-2f.html?203,52,top about:blank + +fuzzy(0-20,0-999) != downscale-2a.html?205,53,top about:blank +fuzzy(0-20,0-999) != downscale-2b.html?205,53,top about:blank +fuzzy(0-20,0-999) != downscale-2c.html?205,53,top about:blank +fuzzy(0-20,0-999) != downscale-2d.html?205,53,top about:blank +fuzzy(0-20,0-999) != downscale-2e.html?205,53,top about:blank +fuzzy(0-20,0-999) != downscale-2f.html?205,53,top about:blank + +fuzzy(0-20,0-999) != downscale-2a.html?203,52,bottom about:blank +fuzzy(0-20,0-999) != downscale-2b.html?203,52,bottom about:blank +fuzzy(0-20,0-999) != downscale-2c.html?203,52,bottom about:blank +fuzzy(0-20,0-999) != downscale-2d.html?203,52,bottom about:blank +fuzzy(0-20,0-999) != downscale-2e.html?203,52,bottom about:blank +fuzzy(0-20,0-999) != downscale-2f.html?203,52,bottom about:blank + +fuzzy(0-20,0-999) != downscale-2a.html?205,53,bottom about:blank +fuzzy(0-20,0-999) != downscale-2b.html?205,53,bottom about:blank +fuzzy(0-20,0-999) != downscale-2c.html?205,53,bottom about:blank +fuzzy(0-20,0-999) != downscale-2d.html?205,53,bottom about:blank +fuzzy(0-20,0-999) != downscale-2e.html?205,53,bottom about:blank +fuzzy(0-20,0-999) != downscale-2f.html?205,53,bottom about:blank + +# Skip on Android because it runs reftests via http, and moz-icon isn't +# accessible from http/https origins anymore. +fuzzy(0-53,0-6391) fuzzy-if(appleSilicon,0-20,0-11605) fuzzy-if(gtkWidget,18-19,5502-5568) skip-if(Android) == downscale-moz-icon-1.html downscale-moz-icon-1-ref.html # gtkWidget Bug 1592059 + +== downscale-png.html?16,16,interlaced downscale-png.html?16,16,normal +== downscale-png.html?24,24,interlaced downscale-png.html?24,24,normal + +# Non-transparent and transparent ICO images +fuzzy(0-1,0-3) == downscale-16px.html?ff-0RGB.ico downscale-16px.html?ff-0RGB.png +fuzzy(0-3,0-32) fuzzy-if(swgl,3-3,33-33) == downscale-16px.html?ff-ARGB.ico downscale-16px.html?ff-ARGB.png + +# Upside-down (negative height) BMP +== downscale-8px.html?top-to-bottom-16x16-24bpp.bmp downscale-8px.html?bmp-size-16x16-24bpp.png + +# Test downscaling from all supported formats from 256 to 32. +fuzzy(0-18,0-128) == downscale-32px.html?.bmp downscale-32px-ref.html +fuzzy(0-18,0-128) == downscale-32px.html?.gif downscale-32px-ref.html +fuzzy(0-19,0-992) == downscale-32px.html?.jpg downscale-32px-ref.html +fuzzy(0-18,0-128) == downscale-32px.html?.png downscale-32px-ref.html +== downscale-32px.html?.svg downscale-32px-ref.html +fuzzy(0-18,0-128) == downscale-32px.html?-bmp-in.ico downscale-32px-ref.html +fuzzy(0-18,0-128) == downscale-32px.html?-png-in.ico downscale-32px-ref.html + +# Test downscaling a JPEG with orientation metadata. +fuzzy(0-4,0-18) == downscale-orient.html downscale-orient-ref.html + +# Test images taller or wider than 32767 pixels. +== huge-1.html?100x32768.png,100,100 huge-1.html?100x100.png,100,100 +== huge-1.html?100x32768.png,100,32768 huge-1.html?100x100.png,100,32768 +== huge-1.html?32768x100.png,100,100 huge-1.html?100x100.png,100,100 +== huge-1.html?32768x100.png,32768,100 huge-1.html?100x100.png,32768,100 +== huge-1.html?100x32768.gif,100,100 huge-1.html?100x100.gif,100,100 +== huge-1.html?100x32768.gif,100,32768 huge-1.html?100x100.gif,100,32768 +== huge-1.html?32768x100.gif,100,100 huge-1.html?100x100.gif,100,100 +== huge-1.html?32768x100.gif,32768,100 huge-1.html?100x100.gif,32768,100 +== huge-1.html?100x32768.jpg,100,100 huge-1.html?100x100.jpg,100,100 +== huge-1.html?100x32768.jpg,100,32768 huge-1.html?100x100.jpg,100,32768 +== huge-1.html?32768x100.jpg,100,100 huge-1.html?100x100.jpg,100,100 +== huge-1.html?32768x100.jpg,32768,100 huge-1.html?100x100.jpg,32768,100 + +# Only need to run these with downscaling on +!= 1421191-1.html about:blank +== 1404366-1.html about:blank diff --git a/image/test/reftest/downscaling/top-to-bottom-16x16-24bpp.bmp b/image/test/reftest/downscaling/top-to-bottom-16x16-24bpp.bmp new file mode 100644 index 0000000000..bd18f85d48 Binary files /dev/null and b/image/test/reftest/downscaling/top-to-bottom-16x16-24bpp.bmp differ diff --git a/image/test/reftest/encoders-lossless/ImageDocument.css b/image/test/reftest/encoders-lossless/ImageDocument.css new file mode 100644 index 0000000000..9a41b4c161 --- /dev/null +++ b/image/test/reftest/encoders-lossless/ImageDocument.css @@ -0,0 +1,16 @@ +body { + background: #222 url("chrome://global/skin/media/imagedoc-darknoise.png"); + margin: 0; +} + +img { + display: block; + position: absolute; + margin: auto; + top: 0; + right: 0; + bottom: 0; + left: 0; + background: hsl(0,0%,90%) url("chrome://global/skin/media/imagedoc-lightnoise.png"); + color: #222; +} diff --git a/image/test/reftest/encoders-lossless/encoder.html b/image/test/reftest/encoders-lossless/encoder.html new file mode 100644 index 0000000000..6e07995ae3 --- /dev/null +++ b/image/test/reftest/encoders-lossless/encoder.html @@ -0,0 +1,113 @@ + + + Image reftest wrapper + + + + + + + + + + diff --git a/image/test/reftest/encoders-lossless/reftest.list b/image/test/reftest/encoders-lossless/reftest.list new file mode 100644 index 0000000000..fe8fbc5bc5 --- /dev/null +++ b/image/test/reftest/encoders-lossless/reftest.list @@ -0,0 +1,175 @@ +# Encoder ref tests +# These reftests must be run as HTTP because of canvas' origin-clean security +# file:// URLs are always considered from a different origin unless same URL +# +# The test will copy a PNG image to a canvas, then use canvas.toDataUrl to get +# the data, then set the data to a new image hence invoking the appropriate +# encoder. +# +# The tests should only be used with lossless encoders. +# +# Valid arguments for encoder.html in the query string: +# - img= +# - mime= +# - options= +# Example: +# encoder.html?img=escape(reference_image.png) +# &mime=escape(image/vnd.microsoft.icon) +# &options=escape(-moz-parse-options:bpp=24;format=png) + +# PNG +HTTP == size-1x1.png encoder.html?img=size-1x1.png&mime=image/png +HTTP == size-2x2.png encoder.html?img=size-2x2.png&mime=image/png +HTTP == size-3x3.png encoder.html?img=size-3x3.png&mime=image/png +HTTP == size-4x4.png encoder.html?img=size-4x4.png&mime=image/png +HTTP == size-5x5.png encoder.html?img=size-5x5.png&mime=image/png +HTTP == size-6x6.png encoder.html?img=size-6x6.png&mime=image/png +HTTP == size-7x7.png encoder.html?img=size-7x7.png&mime=image/png +HTTP == size-8x8.png encoder.html?img=size-8x8.png&mime=image/png +HTTP == size-9x9.png encoder.html?img=size-9x9.png&mime=image/png +HTTP == size-15x15.png encoder.html?img=size-15x15.png&mime=image/png +HTTP == size-16x16.png encoder.html?img=size-16x16.png&mime=image/png +HTTP == size-17x17.png encoder.html?img=size-17x17.png&mime=image/png +HTTP == size-31x31.png encoder.html?img=size-31x31.png&mime=image/png +HTTP == size-32x32.png encoder.html?img=size-32x32.png&mime=image/png +HTTP == size-33x33.png encoder.html?img=size-33x33.png&mime=image/png + +# BMP using default parse options +HTTP == size-1x1.png encoder.html?img=size-1x1.png&mime=image/bmp +HTTP == size-2x2.png encoder.html?img=size-2x2.png&mime=image/bmp +HTTP == size-3x3.png encoder.html?img=size-3x3.png&mime=image/bmp +HTTP == size-4x4.png encoder.html?img=size-4x4.png&mime=image/bmp +HTTP == size-5x5.png encoder.html?img=size-5x5.png&mime=image/bmp +HTTP == size-6x6.png encoder.html?img=size-6x6.png&mime=image/bmp +HTTP == size-7x7.png encoder.html?img=size-7x7.png&mime=image/bmp +HTTP == size-8x8.png encoder.html?img=size-8x8.png&mime=image/bmp +HTTP == size-9x9.png encoder.html?img=size-9x9.png&mime=image/bmp +HTTP == size-15x15.png encoder.html?img=size-15x15.png&mime=image/bmp +HTTP == size-16x16.png encoder.html?img=size-16x16.png&mime=image/bmp +HTTP == size-17x17.png encoder.html?img=size-17x17.png&mime=image/bmp +HTTP == size-31x31.png encoder.html?img=size-31x31.png&mime=image/bmp +HTTP == size-32x32.png encoder.html?img=size-32x32.png&mime=image/bmp +HTTP == size-33x33.png encoder.html?img=size-33x33.png&mime=image/bmp + +# BMP using image/bmp mime type and 32bpp parse options +HTTP == size-1x1.png encoder.html?img=size-1x1.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D32 +HTTP == size-2x2.png encoder.html?img=size-2x2.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D32 +HTTP == size-3x3.png encoder.html?img=size-3x3.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D32 +HTTP == size-4x4.png encoder.html?img=size-4x4.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D32 +HTTP == size-5x5.png encoder.html?img=size-5x5.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D32 +HTTP == size-6x6.png encoder.html?img=size-6x6.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D32 +HTTP == size-7x7.png encoder.html?img=size-7x7.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D32 +HTTP == size-8x8.png encoder.html?img=size-8x8.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D32 +HTTP == size-9x9.png encoder.html?img=size-9x9.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D32 +HTTP == size-15x15.png encoder.html?img=size-15x15.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D32 +HTTP == size-16x16.png encoder.html?img=size-16x16.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D32 +HTTP == size-17x17.png encoder.html?img=size-17x17.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D32 +HTTP == size-31x31.png encoder.html?img=size-31x31.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D32 +HTTP == size-32x32.png encoder.html?img=size-32x32.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D32 +HTTP == size-33x33.png encoder.html?img=size-33x33.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D32 + +# BMP using image/bmp mime type and 24bpp parse options +HTTP == size-1x1.png encoder.html?img=size-1x1.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D24 +HTTP == size-2x2.png encoder.html?img=size-2x2.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D24 +HTTP == size-3x3.png encoder.html?img=size-3x3.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D24 +HTTP == size-4x4.png encoder.html?img=size-4x4.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D24 +HTTP == size-5x5.png encoder.html?img=size-5x5.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D24 +HTTP == size-6x6.png encoder.html?img=size-6x6.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D24 +HTTP == size-7x7.png encoder.html?img=size-7x7.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D24 +HTTP == size-8x8.png encoder.html?img=size-8x8.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D24 +HTTP == size-9x9.png encoder.html?img=size-9x9.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D24 +HTTP == size-15x15.png encoder.html?img=size-15x15.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D24 +HTTP == size-16x16.png encoder.html?img=size-16x16.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D24 +HTTP == size-17x17.png encoder.html?img=size-17x17.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D24 +HTTP == size-31x31.png encoder.html?img=size-31x31.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D24 +HTTP == size-32x32.png encoder.html?img=size-32x32.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D24 +HTTP == size-33x33.png encoder.html?img=size-33x33.png&mime=image/bmp&options=-moz-parse-options%3Abpp%3D24 + +# ICO using default parse options +HTTP == size-1x1.png encoder.html?img=size-1x1.png&mime=image/vnd.microsoft.icon +HTTP == size-2x2.png encoder.html?img=size-2x2.png&mime=image/vnd.microsoft.icon +HTTP == size-3x3.png encoder.html?img=size-3x3.png&mime=image/vnd.microsoft.icon +HTTP == size-4x4.png encoder.html?img=size-4x4.png&mime=image/vnd.microsoft.icon +HTTP == size-5x5.png encoder.html?img=size-5x5.png&mime=image/vnd.microsoft.icon +HTTP == size-6x6.png encoder.html?img=size-6x6.png&mime=image/vnd.microsoft.icon +HTTP == size-7x7.png encoder.html?img=size-7x7.png&mime=image/vnd.microsoft.icon +HTTP == size-8x8.png encoder.html?img=size-8x8.png&mime=image/vnd.microsoft.icon +HTTP == size-9x9.png encoder.html?img=size-9x9.png&mime=image/vnd.microsoft.icon +HTTP == size-15x15.png encoder.html?img=size-15x15.png&mime=image/vnd.microsoft.icon +HTTP == size-16x16.png encoder.html?img=size-16x16.png&mime=image/vnd.microsoft.icon +HTTP == size-17x17.png encoder.html?img=size-17x17.png&mime=image/vnd.microsoft.icon +HTTP == size-31x31.png encoder.html?img=size-31x31.png&mime=image/vnd.microsoft.icon +HTTP == size-32x32.png encoder.html?img=size-32x32.png&mime=image/vnd.microsoft.icon +HTTP == size-33x33.png encoder.html?img=size-33x33.png&mime=image/vnd.microsoft.icon +HTTP == size-256x256.png encoder.html?img=size-256x256.png&mime=image/vnd.microsoft.icon + +# ICO using image/vnd.microsoft.icon mime type and 32bpp parse options with bmp +HTTP == size-1x1.png encoder.html?img=size-1x1.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D32%3Bformat%3Dbmp +HTTP == size-2x2.png encoder.html?img=size-2x2.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D32%3Bformat%3Dbmp +HTTP == size-3x3.png encoder.html?img=size-3x3.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D32%3Bformat%3Dbmp +HTTP == size-4x4.png encoder.html?img=size-4x4.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D32%3Bformat%3Dbmp +HTTP == size-5x5.png encoder.html?img=size-5x5.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D32%3Bformat%3Dbmp +HTTP == size-6x6.png encoder.html?img=size-6x6.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D32%3Bformat%3Dbmp +HTTP == size-7x7.png encoder.html?img=size-7x7.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D32%3Bformat%3Dbmp +HTTP == size-8x8.png encoder.html?img=size-8x8.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D32%3Bformat%3Dbmp +HTTP == size-9x9.png encoder.html?img=size-9x9.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D32%3Bformat%3Dbmp +HTTP == size-15x15.png encoder.html?img=size-15x15.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D32%3Bformat%3Dbmp +HTTP == size-16x16.png encoder.html?img=size-16x16.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D32%3Bformat%3Dbmp +HTTP == size-17x17.png encoder.html?img=size-17x17.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D32%3Bformat%3Dbmp +HTTP == size-31x31.png encoder.html?img=size-31x31.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D32%3Bformat%3Dbmp +HTTP == size-32x32.png encoder.html?img=size-32x32.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D32%3Bformat%3Dbmp +HTTP == size-33x33.png encoder.html?img=size-33x33.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D32%3Bformat%3Dbmp +HTTP == size-256x256.png encoder.html?img=size-256x256.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D32%3Bformat%3Dbmp + +# ICO using image/vnd.microsoft.icon mime type and 24bpp parse options with bmp +HTTP == size-1x1.png encoder.html?img=size-1x1.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D24%3Bformat%3Dbmp +HTTP == size-2x2.png encoder.html?img=size-2x2.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D24%3Bformat%3Dbmp +HTTP == size-3x3.png encoder.html?img=size-3x3.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D24%3Bformat%3Dbmp +HTTP == size-4x4.png encoder.html?img=size-4x4.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D24%3Bformat%3Dbmp +HTTP == size-5x5.png encoder.html?img=size-5x5.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D24%3Bformat%3Dbmp +HTTP == size-6x6.png encoder.html?img=size-6x6.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D24%3Bformat%3Dbmp +HTTP == size-7x7.png encoder.html?img=size-7x7.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D24%3Bformat%3Dbmp +HTTP == size-8x8.png encoder.html?img=size-8x8.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D24%3Bformat%3Dbmp +HTTP == size-9x9.png encoder.html?img=size-9x9.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D24%3Bformat%3Dbmp +HTTP == size-15x15.png encoder.html?img=size-15x15.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D24%3Bformat%3Dbmp +HTTP == size-16x16.png encoder.html?img=size-16x16.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D24%3Bformat%3Dbmp +HTTP == size-17x17.png encoder.html?img=size-17x17.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D24%3Bformat%3Dbmp +HTTP == size-31x31.png encoder.html?img=size-31x31.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D24%3Bformat%3Dbmp +HTTP == size-32x32.png encoder.html?img=size-32x32.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D24%3Bformat%3Dbmp +HTTP == size-33x33.png encoder.html?img=size-33x33.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D24%3Bformat%3Dbmp +HTTP == size-256x256.png encoder.html?img=size-256x256.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Abpp%3D24%3Bformat%3Dbmp + +# ICO using image/vnd.microsoft.icon mime type png +HTTP == size-1x1.png encoder.html?img=size-1x1.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng +HTTP == size-2x2.png encoder.html?img=size-2x2.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng +HTTP == size-3x3.png encoder.html?img=size-3x3.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng +HTTP == size-4x4.png encoder.html?img=size-4x4.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng +HTTP == size-5x5.png encoder.html?img=size-5x5.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng +HTTP == size-6x6.png encoder.html?img=size-6x6.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng +HTTP == size-7x7.png encoder.html?img=size-7x7.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng +HTTP == size-8x8.png encoder.html?img=size-8x8.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng +HTTP == size-9x9.png encoder.html?img=size-9x9.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng +HTTP == size-15x15.png encoder.html?img=size-15x15.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng +HTTP == size-16x16.png encoder.html?img=size-16x16.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng +HTTP == size-17x17.png encoder.html?img=size-17x17.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng +HTTP == size-31x31.png encoder.html?img=size-31x31.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng +HTTP == size-32x32.png encoder.html?img=size-32x32.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng +HTTP == size-33x33.png encoder.html?img=size-33x33.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng +HTTP == size-256x256.png encoder.html?img=size-256x256.png&mime=image/vnd.microsoft.icon&options=-moz-parse-options%3Aformat%3Dpng + +# WEBP +HTTP == size-1x1.png encoder.html?img=size-1x1.png&mime=image/webp&options=1 +HTTP == size-2x2.png encoder.html?img=size-2x2.png&mime=image/webp&options=1 +HTTP == size-3x3.png encoder.html?img=size-3x3.png&mime=image/webp&options=1 +HTTP == size-4x4.png encoder.html?img=size-4x4.png&mime=image/webp&options=1 +HTTP == size-5x5.png encoder.html?img=size-5x5.png&mime=image/webp&options=1 +HTTP == size-6x6.png encoder.html?img=size-6x6.png&mime=image/webp&options=1 +HTTP == size-7x7.png encoder.html?img=size-7x7.png&mime=image/webp&options=1 +HTTP == size-8x8.png encoder.html?img=size-8x8.png&mime=image/webp&options=1 +HTTP == size-9x9.png encoder.html?img=size-9x9.png&mime=image/webp&options=1 +HTTP == size-15x15.png encoder.html?img=size-15x15.png&mime=image/webp&options=1 +HTTP == size-16x16.png encoder.html?img=size-16x16.png&mime=image/webp&options=1 +HTTP == size-17x17.png encoder.html?img=size-17x17.png&mime=image/webp&options=1 +HTTP == size-31x31.png encoder.html?img=size-31x31.png&mime=image/webp&options=1 +HTTP == size-32x32.png encoder.html?img=size-32x32.png&mime=image/webp&options=1 +HTTP == size-33x33.png encoder.html?img=size-33x33.png&mime=image/webp&options=1 diff --git a/image/test/reftest/encoders-lossless/size-15x15.png b/image/test/reftest/encoders-lossless/size-15x15.png new file mode 100644 index 0000000000..e1287430d0 Binary files /dev/null and b/image/test/reftest/encoders-lossless/size-15x15.png differ diff --git a/image/test/reftest/encoders-lossless/size-16x16.png b/image/test/reftest/encoders-lossless/size-16x16.png new file mode 100644 index 0000000000..c04869e728 Binary files /dev/null and b/image/test/reftest/encoders-lossless/size-16x16.png differ diff --git a/image/test/reftest/encoders-lossless/size-17x17.png b/image/test/reftest/encoders-lossless/size-17x17.png new file mode 100644 index 0000000000..00fb8e4f37 Binary files /dev/null and b/image/test/reftest/encoders-lossless/size-17x17.png differ diff --git a/image/test/reftest/encoders-lossless/size-1x1.png b/image/test/reftest/encoders-lossless/size-1x1.png new file mode 100644 index 0000000000..c05f5fef89 Binary files /dev/null and b/image/test/reftest/encoders-lossless/size-1x1.png differ diff --git a/image/test/reftest/encoders-lossless/size-256x256.png b/image/test/reftest/encoders-lossless/size-256x256.png new file mode 100644 index 0000000000..84bfada761 Binary files /dev/null and b/image/test/reftest/encoders-lossless/size-256x256.png differ diff --git a/image/test/reftest/encoders-lossless/size-2x2.png b/image/test/reftest/encoders-lossless/size-2x2.png new file mode 100644 index 0000000000..e512d3f9b4 Binary files /dev/null and b/image/test/reftest/encoders-lossless/size-2x2.png differ diff --git a/image/test/reftest/encoders-lossless/size-31x31.png b/image/test/reftest/encoders-lossless/size-31x31.png new file mode 100644 index 0000000000..e4a8642514 Binary files /dev/null and b/image/test/reftest/encoders-lossless/size-31x31.png differ diff --git a/image/test/reftest/encoders-lossless/size-32x32.png b/image/test/reftest/encoders-lossless/size-32x32.png new file mode 100644 index 0000000000..3a6fbe8ee9 Binary files /dev/null and b/image/test/reftest/encoders-lossless/size-32x32.png differ diff --git a/image/test/reftest/encoders-lossless/size-33x33.png b/image/test/reftest/encoders-lossless/size-33x33.png new file mode 100644 index 0000000000..72ef7eb636 Binary files /dev/null and b/image/test/reftest/encoders-lossless/size-33x33.png differ diff --git a/image/test/reftest/encoders-lossless/size-3x3.png b/image/test/reftest/encoders-lossless/size-3x3.png new file mode 100644 index 0000000000..cb42ec4f87 Binary files /dev/null and b/image/test/reftest/encoders-lossless/size-3x3.png differ diff --git a/image/test/reftest/encoders-lossless/size-4x4.png b/image/test/reftest/encoders-lossless/size-4x4.png new file mode 100644 index 0000000000..e6afafd89a Binary files /dev/null and b/image/test/reftest/encoders-lossless/size-4x4.png differ diff --git a/image/test/reftest/encoders-lossless/size-5x5.png b/image/test/reftest/encoders-lossless/size-5x5.png new file mode 100644 index 0000000000..a844aff76d Binary files /dev/null and b/image/test/reftest/encoders-lossless/size-5x5.png differ diff --git a/image/test/reftest/encoders-lossless/size-6x6.png b/image/test/reftest/encoders-lossless/size-6x6.png new file mode 100644 index 0000000000..415c2d9c6a Binary files /dev/null and b/image/test/reftest/encoders-lossless/size-6x6.png differ diff --git a/image/test/reftest/encoders-lossless/size-7x7.png b/image/test/reftest/encoders-lossless/size-7x7.png new file mode 100644 index 0000000000..ab2f892747 Binary files /dev/null and b/image/test/reftest/encoders-lossless/size-7x7.png differ diff --git a/image/test/reftest/encoders-lossless/size-8x8.png b/image/test/reftest/encoders-lossless/size-8x8.png new file mode 100644 index 0000000000..fe2ff40a1d Binary files /dev/null and b/image/test/reftest/encoders-lossless/size-8x8.png differ diff --git a/image/test/reftest/encoders-lossless/size-9x9.png b/image/test/reftest/encoders-lossless/size-9x9.png new file mode 100644 index 0000000000..18ab4b25de Binary files /dev/null and b/image/test/reftest/encoders-lossless/size-9x9.png differ diff --git a/image/test/reftest/encoders-lossless/test.png b/image/test/reftest/encoders-lossless/test.png new file mode 100644 index 0000000000..3a6fbe8ee9 Binary files /dev/null and b/image/test/reftest/encoders-lossless/test.png differ diff --git a/image/test/reftest/generic/accept-image-catchall-ref.html b/image/test/reftest/generic/accept-image-catchall-ref.html new file mode 100644 index 0000000000..32daa9f5d6 --- /dev/null +++ b/image/test/reftest/generic/accept-image-catchall-ref.html @@ -0,0 +1,12 @@ + + + + + Accept: header should include image/* catchall + + + + + diff --git a/image/test/reftest/generic/accept-image-catchall.html b/image/test/reftest/generic/accept-image-catchall.html new file mode 100644 index 0000000000..bcacd9fd8f --- /dev/null +++ b/image/test/reftest/generic/accept-image-catchall.html @@ -0,0 +1,13 @@ + + + + + Accept: header should include */* catchall + + + + + diff --git a/image/test/reftest/generic/check-header.sjs b/image/test/reftest/generic/check-header.sjs new file mode 100644 index 0000000000..afc39cb550 --- /dev/null +++ b/image/test/reftest/generic/check-header.sjs @@ -0,0 +1,72 @@ +const BinaryOutputStream = Components.Constructor("@mozilla.org/binaryoutputstream;1", "nsIBinaryOutputStream", "setOutputStream"); + +function isCatchall(v) +{ + // "*/*" exactly + return /^\*\/\*$/.test(v); +} + +/* +# Python used to generate the following byte array +def toHex(n): + if n < 16: return "0x" + hex(n)[2:].upper() + return "0x" + hex(n)[2:].upper() + +def hexFile(name): + f = open(name, "rb") + try: + while True: + print toHex(ord(f.read(1))) + ", ", + except: + pass + +hexFile("image/test/reftest/generic/green.png") +*/ + +const IMAGE_DATA = + [ + 0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, + 0x0D, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, + 0x00, 0x64, 0x08, 0x02, 0x00, 0x00, 0x00, 0xFF, 0x80, 0x02, 0x03, + 0x00, 0x00, 0x00, 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xAE, 0xCE, + 0x1C, 0xE9, 0x00, 0x00, 0x00, 0x9E, 0x49, 0x44, 0x41, 0x54, 0x78, + 0xDA, 0xED, 0xD0, 0x31, 0x01, 0x00, 0x00, 0x08, 0x03, 0xA0, 0x69, + 0xFF, 0xCE, 0x5A, 0xC1, 0xCF, 0x07, 0x22, 0x50, 0x99, 0x70, 0xD4, + 0x0A, 0x64, 0xC9, 0x92, 0x25, 0x4B, 0x96, 0x2C, 0x05, 0xB2, 0x64, + 0xC9, 0x92, 0x25, 0x4B, 0x96, 0x02, 0x59, 0xB2, 0x64, 0xC9, 0x92, + 0x25, 0x4B, 0x81, 0x2C, 0x59, 0xB2, 0x64, 0xC9, 0x92, 0xA5, 0x40, + 0x96, 0x2C, 0x59, 0xB2, 0x64, 0xC9, 0x52, 0x20, 0x4B, 0x96, 0x2C, + 0x59, 0xB2, 0x64, 0x29, 0x90, 0x25, 0x4B, 0x96, 0x2C, 0x59, 0xB2, + 0x14, 0xC8, 0x92, 0x25, 0x4B, 0x96, 0x2C, 0x59, 0x0A, 0x64, 0xC9, + 0x92, 0x25, 0x4B, 0x96, 0x2C, 0x05, 0xB2, 0x64, 0xC9, 0x92, 0x25, + 0x4B, 0x96, 0x02, 0x59, 0xB2, 0x64, 0xC9, 0x92, 0x25, 0x4B, 0x81, + 0x2C, 0x59, 0xB2, 0x64, 0xC9, 0x92, 0xA5, 0x40, 0x96, 0x2C, 0x59, + 0xB2, 0x64, 0xC9, 0x52, 0x20, 0x4B, 0x96, 0x2C, 0x59, 0xB2, 0x64, + 0x29, 0x90, 0x25, 0x4B, 0x96, 0x2C, 0x59, 0xB2, 0x14, 0xC8, 0x92, + 0x25, 0x4B, 0x96, 0x2C, 0x59, 0x0A, 0x64, 0xC9, 0xFA, 0xB6, 0x89, + 0x5F, 0x01, 0xC7, 0x24, 0x83, 0xB2, 0x0C, 0x00, 0x00, 0x00, 0x00, + 0x49, 0x45, 0x4E, 0x44, 0xAE, 0x42, 0x60, 0x82, + ]; + +function handleRequest(request, response) +{ + response.setHeader("Content-Type", "text/plain", false); + response.setHeader("Cache-Control", "no-cache", false); + + var accept = request.hasHeader("Accept") + ? request.getHeader("Accept") + : ""; + + if (accept.split(",").some(isCatchall)) + { + response.setHeader("Content-Type", "image/png", false); + + var stream = new BinaryOutputStream(response.bodyOutputStream); + stream.writeByteArray(IMAGE_DATA); + } + else + { + response.setStatusLine(request.httpVersion, 404, "Not found"); + response.write("Accept header contained: " + accept); + } +} diff --git a/image/test/reftest/generic/green.png b/image/test/reftest/generic/green.png new file mode 100644 index 0000000000..4718c00e62 Binary files /dev/null and b/image/test/reftest/generic/green.png differ diff --git a/image/test/reftest/generic/moz-icon-1.html b/image/test/reftest/generic/moz-icon-1.html new file mode 100644 index 0000000000..fb2dcea202 --- /dev/null +++ b/image/test/reftest/generic/moz-icon-1.html @@ -0,0 +1 @@ + diff --git a/image/test/reftest/generic/moz-icon-blank-1-almostref.html b/image/test/reftest/generic/moz-icon-blank-1-almostref.html new file mode 100644 index 0000000000..38d5e1ec86 --- /dev/null +++ b/image/test/reftest/generic/moz-icon-blank-1-almostref.html @@ -0,0 +1,2 @@ + + diff --git a/image/test/reftest/generic/moz-icon-blank-1-antiref.html b/image/test/reftest/generic/moz-icon-blank-1-antiref.html new file mode 100644 index 0000000000..2631ff4018 --- /dev/null +++ b/image/test/reftest/generic/moz-icon-blank-1-antiref.html @@ -0,0 +1,2 @@ + + diff --git a/image/test/reftest/generic/moz-icon-blank-1-antiref2.html b/image/test/reftest/generic/moz-icon-blank-1-antiref2.html new file mode 100644 index 0000000000..8553c81be0 --- /dev/null +++ b/image/test/reftest/generic/moz-icon-blank-1-antiref2.html @@ -0,0 +1,2 @@ + + diff --git a/image/test/reftest/generic/moz-icon-blank-1-ref.html b/image/test/reftest/generic/moz-icon-blank-1-ref.html new file mode 100644 index 0000000000..086d5af837 --- /dev/null +++ b/image/test/reftest/generic/moz-icon-blank-1-ref.html @@ -0,0 +1,2 @@ + + diff --git a/image/test/reftest/generic/moz-icon-blank-1.html b/image/test/reftest/generic/moz-icon-blank-1.html new file mode 100644 index 0000000000..2b52c96297 --- /dev/null +++ b/image/test/reftest/generic/moz-icon-blank-1.html @@ -0,0 +1,2 @@ + + diff --git a/image/test/reftest/generic/reftest.list b/image/test/reftest/generic/reftest.list new file mode 100644 index 0000000000..6f236399ef --- /dev/null +++ b/image/test/reftest/generic/reftest.list @@ -0,0 +1,6 @@ +HTTP == accept-image-catchall.html accept-image-catchall-ref.html +skip-if(Android) != moz-icon-1.html about:blank +== moz-icon-blank-1.html moz-icon-blank-1-ref.html +skip-if(Android) != moz-icon-blank-1-ref.html moz-icon-blank-1-antiref.html +skip-if(Android) != moz-icon-blank-1-ref.html moz-icon-blank-1-antiref2.html +fuzzy-if(OSX,44-49,335-348) fuzzy-if(winWidget,64-140,45-191) == moz-icon-blank-1-almostref.html moz-icon-blank-1-ref.html diff --git a/image/test/reftest/gif/1bit-255-trans.gif b/image/test/reftest/gif/1bit-255-trans.gif new file mode 100644 index 0000000000..60273ba81d Binary files /dev/null and b/image/test/reftest/gif/1bit-255-trans.gif differ diff --git a/image/test/reftest/gif/1bit-255-trans.png b/image/test/reftest/gif/1bit-255-trans.png new file mode 100644 index 0000000000..611480ac4c Binary files /dev/null and b/image/test/reftest/gif/1bit-255-trans.png differ diff --git a/image/test/reftest/gif/ImageDocument.css b/image/test/reftest/gif/ImageDocument.css new file mode 100644 index 0000000000..b449810986 --- /dev/null +++ b/image/test/reftest/gif/ImageDocument.css @@ -0,0 +1,16 @@ +body { + background-image: url("chrome://global/skin/media/imagedoc-darknoise.png"); + margin: 0; +} + +body > :first-child { + display: block; + position: absolute; + margin: auto; + top: 0; + right: 0; + bottom: 0; + left: 0; + background: hsl(0,0%,90%) url("chrome://global/skin/media/imagedoc-lightnoise.png"); + color: #222; +} diff --git a/image/test/reftest/gif/animation1a.gif b/image/test/reftest/gif/animation1a.gif new file mode 100644 index 0000000000..d328276545 Binary files /dev/null and b/image/test/reftest/gif/animation1a.gif differ diff --git a/image/test/reftest/gif/animation2a-finalframe.gif b/image/test/reftest/gif/animation2a-finalframe.gif new file mode 100644 index 0000000000..8d9c4aaf7d Binary files /dev/null and b/image/test/reftest/gif/animation2a-finalframe.gif differ diff --git a/image/test/reftest/gif/animation2a.gif b/image/test/reftest/gif/animation2a.gif new file mode 100644 index 0000000000..07abf8d986 Binary files /dev/null and b/image/test/reftest/gif/animation2a.gif differ diff --git a/image/test/reftest/gif/blue.gif b/image/test/reftest/gif/blue.gif new file mode 100644 index 0000000000..f9dbeeea8e Binary files /dev/null and b/image/test/reftest/gif/blue.gif differ diff --git a/image/test/reftest/gif/comment.gif b/image/test/reftest/gif/comment.gif new file mode 100644 index 0000000000..255cceb418 Binary files /dev/null and b/image/test/reftest/gif/comment.gif differ diff --git a/image/test/reftest/gif/comment.png b/image/test/reftest/gif/comment.png new file mode 100644 index 0000000000..89394ba186 Binary files /dev/null and b/image/test/reftest/gif/comment.png differ diff --git a/image/test/reftest/gif/delaytest.html b/image/test/reftest/gif/delaytest.html new file mode 100644 index 0000000000..265a201ab5 --- /dev/null +++ b/image/test/reftest/gif/delaytest.html @@ -0,0 +1,58 @@ + + + +Delayed image reftest wrapper + + + + + + + diff --git a/image/test/reftest/gif/in-colormap-trans.gif b/image/test/reftest/gif/in-colormap-trans.gif new file mode 100644 index 0000000000..48f5c7caf1 Binary files /dev/null and b/image/test/reftest/gif/in-colormap-trans.gif differ diff --git a/image/test/reftest/gif/in-colormap-trans.png b/image/test/reftest/gif/in-colormap-trans.png new file mode 100644 index 0000000000..08761dfe41 Binary files /dev/null and b/image/test/reftest/gif/in-colormap-trans.png differ diff --git a/image/test/reftest/gif/one-color-offset-ref.gif b/image/test/reftest/gif/one-color-offset-ref.gif new file mode 100644 index 0000000000..14a59ff477 Binary files /dev/null and b/image/test/reftest/gif/one-color-offset-ref.gif differ diff --git a/image/test/reftest/gif/one-color-offset.gif b/image/test/reftest/gif/one-color-offset.gif new file mode 100644 index 0000000000..e6d7c49322 Binary files /dev/null and b/image/test/reftest/gif/one-color-offset.gif differ diff --git a/image/test/reftest/gif/one-pixel-no-image-data-ref.html b/image/test/reftest/gif/one-pixel-no-image-data-ref.html new file mode 100644 index 0000000000..b23c11dc1b --- /dev/null +++ b/image/test/reftest/gif/one-pixel-no-image-data-ref.html @@ -0,0 +1,11 @@ + + +
diff --git a/image/test/reftest/gif/one-pixel-no-image-data.html b/image/test/reftest/gif/one-pixel-no-image-data.html new file mode 100644 index 0000000000..e09e90bd8b --- /dev/null +++ b/image/test/reftest/gif/one-pixel-no-image-data.html @@ -0,0 +1,11 @@ + + +
diff --git a/image/test/reftest/gif/out-of-colormap-trans.gif b/image/test/reftest/gif/out-of-colormap-trans.gif new file mode 100644 index 0000000000..17e747c9b2 Binary files /dev/null and b/image/test/reftest/gif/out-of-colormap-trans.gif differ diff --git a/image/test/reftest/gif/out-of-colormap-trans.png b/image/test/reftest/gif/out-of-colormap-trans.png new file mode 100644 index 0000000000..8d3eb581a2 Binary files /dev/null and b/image/test/reftest/gif/out-of-colormap-trans.png differ diff --git a/image/test/reftest/gif/red.gif b/image/test/reftest/gif/red.gif new file mode 100644 index 0000000000..d3c32bae25 Binary files /dev/null and b/image/test/reftest/gif/red.gif differ diff --git a/image/test/reftest/gif/reftest.list b/image/test/reftest/gif/reftest.list new file mode 100644 index 0000000000..1e44a83931 --- /dev/null +++ b/image/test/reftest/gif/reftest.list @@ -0,0 +1,32 @@ +# GIF tests + +# tests for bug 519589 +== 1bit-255-trans.gif 1bit-255-trans.png +== in-colormap-trans.gif in-colormap-trans.png +== out-of-colormap-trans.gif out-of-colormap-trans.png + +# a GIF file that uses the comment extension +== comment.gif comment.png + +# a GIF file with a background smaller than the size of the canvas +== small-background-size.gif small-background-size-ref.gif +== small-background-size-2.gif small-background-size-2-ref.gif + +# a transparent gif that disposes previous frames with clear; we must properly +# clear each frame to pass. +== delaytest.html?transparent-animation.gif transparent-animation-finalframe.html + +# test for bug 641198 +skip == test_bug641198.html animation2a-finalframe.gif # Disabled; see bug 1120144. + +# Bug 1062886: a gif with a single color and an offset +== one-color-offset.gif one-color-offset-ref.gif + +# Bug 1068230 +fuzzy-if(Android,0-1,0-8) == tile-transform.html tile-transform-ref.html + +# Bug 1234077 +== truncated-framerect.html truncated-framerect-ref.html + +# Bug 1801397 +== one-pixel-no-image-data.html one-pixel-no-image-data-ref.html diff --git a/image/test/reftest/gif/small-background-size-2-ref.gif b/image/test/reftest/gif/small-background-size-2-ref.gif new file mode 100644 index 0000000000..b513c41aa2 Binary files /dev/null and b/image/test/reftest/gif/small-background-size-2-ref.gif differ diff --git a/image/test/reftest/gif/small-background-size-2.gif b/image/test/reftest/gif/small-background-size-2.gif new file mode 100644 index 0000000000..a5e2147678 Binary files /dev/null and b/image/test/reftest/gif/small-background-size-2.gif differ diff --git a/image/test/reftest/gif/small-background-size-ref.gif b/image/test/reftest/gif/small-background-size-ref.gif new file mode 100644 index 0000000000..1b656ce439 Binary files /dev/null and b/image/test/reftest/gif/small-background-size-ref.gif differ diff --git a/image/test/reftest/gif/small-background-size.gif b/image/test/reftest/gif/small-background-size.gif new file mode 100644 index 0000000000..8185eb71e8 Binary files /dev/null and b/image/test/reftest/gif/small-background-size.gif differ diff --git a/image/test/reftest/gif/test_bug641198.html b/image/test/reftest/gif/test_bug641198.html new file mode 100644 index 0000000000..46bdb0d47c --- /dev/null +++ b/image/test/reftest/gif/test_bug641198.html @@ -0,0 +1,53 @@ + + + +Test for bug 641198 + + + + + +Animated + + + + + diff --git a/image/test/reftest/gif/tile-transform-ref.html b/image/test/reftest/gif/tile-transform-ref.html new file mode 100644 index 0000000000..5dac1a5bdf --- /dev/null +++ b/image/test/reftest/gif/tile-transform-ref.html @@ -0,0 +1,12 @@ + + + + + Intermediate surface should be transformed correctly when tiling an image + + + + + diff --git a/image/test/reftest/gif/tile-transform.html b/image/test/reftest/gif/tile-transform.html new file mode 100644 index 0000000000..541ae6bbc4 --- /dev/null +++ b/image/test/reftest/gif/tile-transform.html @@ -0,0 +1,12 @@ + + + + + Intermediate surface should be transformed correctly when tiling an image + + + + + diff --git a/image/test/reftest/gif/tiletest-ref.png b/image/test/reftest/gif/tiletest-ref.png new file mode 100644 index 0000000000..b493899cc8 Binary files /dev/null and b/image/test/reftest/gif/tiletest-ref.png differ diff --git a/image/test/reftest/gif/tiletest.gif b/image/test/reftest/gif/tiletest.gif new file mode 100644 index 0000000000..7a04c9654a Binary files /dev/null and b/image/test/reftest/gif/tiletest.gif differ diff --git a/image/test/reftest/gif/transparent-animation-finalframe.gif b/image/test/reftest/gif/transparent-animation-finalframe.gif new file mode 100644 index 0000000000..a55f92a813 Binary files /dev/null and b/image/test/reftest/gif/transparent-animation-finalframe.gif differ diff --git a/image/test/reftest/gif/transparent-animation-finalframe.html b/image/test/reftest/gif/transparent-animation-finalframe.html new file mode 100644 index 0000000000..6f160d1b7c --- /dev/null +++ b/image/test/reftest/gif/transparent-animation-finalframe.html @@ -0,0 +1,6 @@ + + + + + + diff --git a/image/test/reftest/gif/transparent-animation.gif b/image/test/reftest/gif/transparent-animation.gif new file mode 100644 index 0000000000..b2895487bd Binary files /dev/null and b/image/test/reftest/gif/transparent-animation.gif differ diff --git a/image/test/reftest/gif/truncated-framerect-interlaced-ref.gif b/image/test/reftest/gif/truncated-framerect-interlaced-ref.gif new file mode 100644 index 0000000000..ca9bf2fa71 Binary files /dev/null and b/image/test/reftest/gif/truncated-framerect-interlaced-ref.gif differ diff --git a/image/test/reftest/gif/truncated-framerect-interlaced.gif b/image/test/reftest/gif/truncated-framerect-interlaced.gif new file mode 100644 index 0000000000..59709898bd Binary files /dev/null and b/image/test/reftest/gif/truncated-framerect-interlaced.gif differ diff --git a/image/test/reftest/gif/truncated-framerect-ref.gif b/image/test/reftest/gif/truncated-framerect-ref.gif new file mode 100644 index 0000000000..ab79a455b0 Binary files /dev/null and b/image/test/reftest/gif/truncated-framerect-ref.gif differ diff --git a/image/test/reftest/gif/truncated-framerect-ref.html b/image/test/reftest/gif/truncated-framerect-ref.html new file mode 100644 index 0000000000..ef48b8a192 --- /dev/null +++ b/image/test/reftest/gif/truncated-framerect-ref.html @@ -0,0 +1,33 @@ + + + + + Bug 1234077 - Make sure GIFs still render correctly with a truncated frameRect + + + + + +
+ +
+ +
+ +
+ + diff --git a/image/test/reftest/gif/truncated-framerect.gif b/image/test/reftest/gif/truncated-framerect.gif new file mode 100644 index 0000000000..8febb2a748 Binary files /dev/null and b/image/test/reftest/gif/truncated-framerect.gif differ diff --git a/image/test/reftest/gif/truncated-framerect.html b/image/test/reftest/gif/truncated-framerect.html new file mode 100644 index 0000000000..c1c5df6538 --- /dev/null +++ b/image/test/reftest/gif/truncated-framerect.html @@ -0,0 +1,28 @@ + + + + + Bug 1234077 - Make sure GIFs still render correctly with a truncated frameRect + + + + + +
+ +
+ +
+ +
+ + diff --git a/image/test/reftest/ico/cur/pointer.cur b/image/test/reftest/ico/cur/pointer.cur new file mode 100644 index 0000000000..025ebaed1f Binary files /dev/null and b/image/test/reftest/ico/cur/pointer.cur differ diff --git a/image/test/reftest/ico/cur/pointer.png b/image/test/reftest/ico/cur/pointer.png new file mode 100644 index 0000000000..84ad8f3fbd Binary files /dev/null and b/image/test/reftest/ico/cur/pointer.png differ diff --git a/image/test/reftest/ico/cur/reftest.list b/image/test/reftest/ico/cur/reftest.list new file mode 100644 index 0000000000..635136506b --- /dev/null +++ b/image/test/reftest/ico/cur/reftest.list @@ -0,0 +1,4 @@ +# ICO BMP and PNG mixed tests + +== wrapper.html?pointer.cur wrapper.html?pointer.png + diff --git a/image/test/reftest/ico/cur/wrapper.html b/image/test/reftest/ico/cur/wrapper.html new file mode 100644 index 0000000000..45b5167754 --- /dev/null +++ b/image/test/reftest/ico/cur/wrapper.html @@ -0,0 +1,28 @@ + + + +Image reftest wrapper + + + + + + + + + + diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-not-square-transparent-1bpp.ico b/image/test/reftest/ico/ico-bmp-1bpp/ico-not-square-transparent-1bpp.ico new file mode 100644 index 0000000000..0f51d504af Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-not-square-transparent-1bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-not-square-transparent-1bpp.png b/image/test/reftest/ico/ico-bmp-1bpp/ico-not-square-transparent-1bpp.png new file mode 100644 index 0000000000..152b30d716 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-not-square-transparent-1bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-partial-transparent-1bpp.ico b/image/test/reftest/ico/ico-bmp-1bpp/ico-partial-transparent-1bpp.ico new file mode 100644 index 0000000000..def2a4ece7 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-partial-transparent-1bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-partial-transparent-1bpp.png b/image/test/reftest/ico/ico-bmp-1bpp/ico-partial-transparent-1bpp.png new file mode 100644 index 0000000000..064a68bb2e Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-partial-transparent-1bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-15x15-1bpp.ico b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-15x15-1bpp.ico new file mode 100644 index 0000000000..b68cf0ef0d Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-15x15-1bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-15x15-1bpp.png b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-15x15-1bpp.png new file mode 100644 index 0000000000..956c78ece6 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-15x15-1bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-16x16-1bpp.ico b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-16x16-1bpp.ico new file mode 100644 index 0000000000..d96a4a0e1d Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-16x16-1bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-16x16-1bpp.png b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-16x16-1bpp.png new file mode 100644 index 0000000000..90088351fa Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-16x16-1bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-17x17-1bpp.ico b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-17x17-1bpp.ico new file mode 100644 index 0000000000..4f10ad13c0 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-17x17-1bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-17x17-1bpp.png b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-17x17-1bpp.png new file mode 100644 index 0000000000..9a294696c4 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-17x17-1bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-1x1-1bpp.ico b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-1x1-1bpp.ico new file mode 100644 index 0000000000..5af8bef61a Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-1x1-1bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-1x1-1bpp.png b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-1x1-1bpp.png new file mode 100644 index 0000000000..7a07a124ea Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-1x1-1bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-256x256-1bpp.ico b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-256x256-1bpp.ico new file mode 100644 index 0000000000..63d95e3b7c Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-256x256-1bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-256x256-1bpp.png b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-256x256-1bpp.png new file mode 100644 index 0000000000..0a23d8c8ee Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-256x256-1bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-2x2-1bpp.ico b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-2x2-1bpp.ico new file mode 100644 index 0000000000..09c140f1b1 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-2x2-1bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-2x2-1bpp.png b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-2x2-1bpp.png new file mode 100644 index 0000000000..3b09f80769 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-2x2-1bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-31x31-1bpp.ico b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-31x31-1bpp.ico new file mode 100644 index 0000000000..bbfc3165ab Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-31x31-1bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-31x31-1bpp.png b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-31x31-1bpp.png new file mode 100644 index 0000000000..d1fe6ddeee Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-31x31-1bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-32x32-1bpp.ico b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-32x32-1bpp.ico new file mode 100644 index 0000000000..279ecb8358 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-32x32-1bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-32x32-1bpp.png b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-32x32-1bpp.png new file mode 100644 index 0000000000..078d3dc5d0 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-32x32-1bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-33x33-1bpp.ico b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-33x33-1bpp.ico new file mode 100644 index 0000000000..fa1862c1ca Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-33x33-1bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-33x33-1bpp.png b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-33x33-1bpp.png new file mode 100644 index 0000000000..e64e12b2aa Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-33x33-1bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-3x3-1bpp.ico b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-3x3-1bpp.ico new file mode 100644 index 0000000000..733b1f12bc Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-3x3-1bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-3x3-1bpp.png b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-3x3-1bpp.png new file mode 100644 index 0000000000..b8519a8749 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-3x3-1bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-4x4-1bpp.ico b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-4x4-1bpp.ico new file mode 100644 index 0000000000..ba3097cecd Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-4x4-1bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-4x4-1bpp.png b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-4x4-1bpp.png new file mode 100644 index 0000000000..3977b54548 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-4x4-1bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-5x5-1bpp.ico b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-5x5-1bpp.ico new file mode 100644 index 0000000000..52e32df27b Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-5x5-1bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-5x5-1bpp.png b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-5x5-1bpp.png new file mode 100644 index 0000000000..caa9246b67 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-5x5-1bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-6x6-1bpp.ico b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-6x6-1bpp.ico new file mode 100644 index 0000000000..c29651400f Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-6x6-1bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-6x6-1bpp.png b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-6x6-1bpp.png new file mode 100644 index 0000000000..30e1b0249d Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-6x6-1bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-7x7-1bpp.ico b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-7x7-1bpp.ico new file mode 100644 index 0000000000..8ce9915c44 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-7x7-1bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-7x7-1bpp.png b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-7x7-1bpp.png new file mode 100644 index 0000000000..9dbaae84cb Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-7x7-1bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-8x8-1bpp.ico b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-8x8-1bpp.ico new file mode 100644 index 0000000000..485dff028a Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-8x8-1bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-8x8-1bpp.png b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-8x8-1bpp.png new file mode 100644 index 0000000000..2201388408 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-8x8-1bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-9x9-1bpp.ico b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-9x9-1bpp.ico new file mode 100644 index 0000000000..38f34ec50a Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-9x9-1bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-size-9x9-1bpp.png b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-9x9-1bpp.png new file mode 100644 index 0000000000..7fe1b548b8 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-size-9x9-1bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-transparent-1bpp.ico b/image/test/reftest/ico/ico-bmp-1bpp/ico-transparent-1bpp.ico new file mode 100644 index 0000000000..8e361306c5 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-transparent-1bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/ico-transparent-1bpp.png b/image/test/reftest/ico/ico-bmp-1bpp/ico-transparent-1bpp.png new file mode 100644 index 0000000000..062152e3b1 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-1bpp/ico-transparent-1bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-1bpp/reftest.list b/image/test/reftest/ico/ico-bmp-1bpp/reftest.list new file mode 100644 index 0000000000..1b9ca1348a --- /dev/null +++ b/image/test/reftest/ico/ico-bmp-1bpp/reftest.list @@ -0,0 +1,23 @@ +# ICO BMP 1BPP tests + +# Images of various sizes +== ico-size-1x1-1bpp.ico ico-size-1x1-1bpp.png +== ico-size-2x2-1bpp.ico ico-size-2x2-1bpp.png +== ico-size-3x3-1bpp.ico ico-size-3x3-1bpp.png +== ico-size-4x4-1bpp.ico ico-size-4x4-1bpp.png +== ico-size-5x5-1bpp.ico ico-size-5x5-1bpp.png +== ico-size-6x6-1bpp.ico ico-size-6x6-1bpp.png +== ico-size-7x7-1bpp.ico ico-size-7x7-1bpp.png +== ico-size-8x8-1bpp.ico ico-size-8x8-1bpp.png +== ico-size-9x9-1bpp.ico ico-size-9x9-1bpp.png +== ico-size-15x15-1bpp.ico ico-size-15x15-1bpp.png +== ico-size-16x16-1bpp.ico ico-size-16x16-1bpp.png +== ico-size-17x17-1bpp.ico ico-size-17x17-1bpp.png +== ico-size-31x31-1bpp.ico ico-size-31x31-1bpp.png +== ico-size-32x32-1bpp.ico ico-size-32x32-1bpp.png +== ico-size-33x33-1bpp.ico ico-size-33x33-1bpp.png +== ico-size-256x256-1bpp.ico ico-size-256x256-1bpp.png +== ico-partial-transparent-1bpp.ico ico-partial-transparent-1bpp.png +== ico-transparent-1bpp.ico ico-transparent-1bpp.png +== ico-not-square-transparent-1bpp.ico ico-not-square-transparent-1bpp.png + diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-not-square-transparent-24bpp.ico b/image/test/reftest/ico/ico-bmp-24bpp/ico-not-square-transparent-24bpp.ico new file mode 100644 index 0000000000..16d6584ef8 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-not-square-transparent-24bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-not-square-transparent-24bpp.png b/image/test/reftest/ico/ico-bmp-24bpp/ico-not-square-transparent-24bpp.png new file mode 100644 index 0000000000..a881048b96 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-not-square-transparent-24bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-partial-transparent-24bpp.ico b/image/test/reftest/ico/ico-bmp-24bpp/ico-partial-transparent-24bpp.ico new file mode 100644 index 0000000000..ab0dc4bce1 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-partial-transparent-24bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-partial-transparent-24bpp.png b/image/test/reftest/ico/ico-bmp-24bpp/ico-partial-transparent-24bpp.png new file mode 100644 index 0000000000..0363210c74 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-partial-transparent-24bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-15x15-24bpp.ico b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-15x15-24bpp.ico new file mode 100644 index 0000000000..8721b0d169 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-15x15-24bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-15x15-24bpp.png b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-15x15-24bpp.png new file mode 100644 index 0000000000..e1287430d0 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-15x15-24bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-16x16-24bpp.ico b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-16x16-24bpp.ico new file mode 100644 index 0000000000..04e4736189 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-16x16-24bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-16x16-24bpp.png b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-16x16-24bpp.png new file mode 100644 index 0000000000..c04869e728 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-16x16-24bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-17x17-24bpp.ico b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-17x17-24bpp.ico new file mode 100644 index 0000000000..308ccb7a61 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-17x17-24bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-17x17-24bpp.png b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-17x17-24bpp.png new file mode 100644 index 0000000000..00fb8e4f37 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-17x17-24bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-1x1-24bpp.ico b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-1x1-24bpp.ico new file mode 100644 index 0000000000..e2bf90c093 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-1x1-24bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-1x1-24bpp.png b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-1x1-24bpp.png new file mode 100644 index 0000000000..c05f5fef89 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-1x1-24bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-256x256-24bpp.ico b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-256x256-24bpp.ico new file mode 100644 index 0000000000..c3977400a4 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-256x256-24bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-256x256-24bpp.png b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-256x256-24bpp.png new file mode 100644 index 0000000000..84bfada761 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-256x256-24bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-2x2-24bpp.ico b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-2x2-24bpp.ico new file mode 100644 index 0000000000..dba180a07a Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-2x2-24bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-2x2-24bpp.png b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-2x2-24bpp.png new file mode 100644 index 0000000000..e512d3f9b4 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-2x2-24bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-31x31-24bpp.ico b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-31x31-24bpp.ico new file mode 100644 index 0000000000..aa67502f61 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-31x31-24bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-31x31-24bpp.png b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-31x31-24bpp.png new file mode 100644 index 0000000000..e4a8642514 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-31x31-24bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-32x32-24bpp.ico b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-32x32-24bpp.ico new file mode 100644 index 0000000000..a85b871c5e Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-32x32-24bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-32x32-24bpp.png b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-32x32-24bpp.png new file mode 100644 index 0000000000..3a6fbe8ee9 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-32x32-24bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-33x33-24bpp.ico b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-33x33-24bpp.ico new file mode 100644 index 0000000000..a5c49374de Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-33x33-24bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-33x33-24bpp.png b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-33x33-24bpp.png new file mode 100644 index 0000000000..72ef7eb636 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-33x33-24bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-3x3-24bpp.ico b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-3x3-24bpp.ico new file mode 100644 index 0000000000..8a0b9433f4 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-3x3-24bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-3x3-24bpp.png b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-3x3-24bpp.png new file mode 100644 index 0000000000..cb42ec4f87 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-3x3-24bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-4x4-24bpp.ico b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-4x4-24bpp.ico new file mode 100644 index 0000000000..feb3f11e16 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-4x4-24bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-4x4-24bpp.png b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-4x4-24bpp.png new file mode 100644 index 0000000000..e6afafd89a Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-4x4-24bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-5x5-24bpp.ico b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-5x5-24bpp.ico new file mode 100644 index 0000000000..d607ca5724 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-5x5-24bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-5x5-24bpp.png b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-5x5-24bpp.png new file mode 100644 index 0000000000..a844aff76d Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-5x5-24bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-6x6-24bpp.ico b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-6x6-24bpp.ico new file mode 100644 index 0000000000..62a231602c Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-6x6-24bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-6x6-24bpp.png b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-6x6-24bpp.png new file mode 100644 index 0000000000..415c2d9c6a Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-6x6-24bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-7x7-24bpp.ico b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-7x7-24bpp.ico new file mode 100644 index 0000000000..d884ecfd77 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-7x7-24bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-7x7-24bpp.png b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-7x7-24bpp.png new file mode 100644 index 0000000000..ab2f892747 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-7x7-24bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-8x8-24bpp.ico b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-8x8-24bpp.ico new file mode 100644 index 0000000000..782ae220df Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-8x8-24bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-8x8-24bpp.png b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-8x8-24bpp.png new file mode 100644 index 0000000000..fe2ff40a1d Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-8x8-24bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-9x9-24bpp.ico b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-9x9-24bpp.ico new file mode 100644 index 0000000000..97992643b6 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-9x9-24bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-size-9x9-24bpp.png b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-9x9-24bpp.png new file mode 100644 index 0000000000..18ab4b25de Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-size-9x9-24bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-transparent-24bpp.ico b/image/test/reftest/ico/ico-bmp-24bpp/ico-transparent-24bpp.ico new file mode 100644 index 0000000000..8e361306c5 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-transparent-24bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/ico-transparent-24bpp.png b/image/test/reftest/ico/ico-bmp-24bpp/ico-transparent-24bpp.png new file mode 100644 index 0000000000..062152e3b1 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-24bpp/ico-transparent-24bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-24bpp/reftest.list b/image/test/reftest/ico/ico-bmp-24bpp/reftest.list new file mode 100644 index 0000000000..8772936603 --- /dev/null +++ b/image/test/reftest/ico/ico-bmp-24bpp/reftest.list @@ -0,0 +1,23 @@ +# ICO BMP 24BPP tests + +# Images of various sizes +== ico-size-1x1-24bpp.ico ico-size-1x1-24bpp.png +== ico-size-2x2-24bpp.ico ico-size-2x2-24bpp.png +== ico-size-3x3-24bpp.ico ico-size-3x3-24bpp.png +== ico-size-4x4-24bpp.ico ico-size-4x4-24bpp.png +== ico-size-5x5-24bpp.ico ico-size-5x5-24bpp.png +== ico-size-6x6-24bpp.ico ico-size-6x6-24bpp.png +== ico-size-7x7-24bpp.ico ico-size-7x7-24bpp.png +== ico-size-8x8-24bpp.ico ico-size-8x8-24bpp.png +== ico-size-9x9-24bpp.ico ico-size-9x9-24bpp.png +== ico-size-15x15-24bpp.ico ico-size-15x15-24bpp.png +== ico-size-16x16-24bpp.ico ico-size-16x16-24bpp.png +== ico-size-17x17-24bpp.ico ico-size-17x17-24bpp.png +== ico-size-31x31-24bpp.ico ico-size-31x31-24bpp.png +== ico-size-32x32-24bpp.ico ico-size-32x32-24bpp.png +== ico-size-33x33-24bpp.ico ico-size-33x33-24bpp.png +== ico-size-256x256-24bpp.ico ico-size-256x256-24bpp.png +== ico-partial-transparent-24bpp.ico ico-partial-transparent-24bpp.png +== ico-transparent-24bpp.ico ico-transparent-24bpp.png +== ico-not-square-transparent-24bpp.ico ico-not-square-transparent-24bpp.png + diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-not-square-transparent-32bpp.ico b/image/test/reftest/ico/ico-bmp-32bpp/ico-not-square-transparent-32bpp.ico new file mode 100644 index 0000000000..dd0299c413 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-not-square-transparent-32bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-not-square-transparent-32bpp.png b/image/test/reftest/ico/ico-bmp-32bpp/ico-not-square-transparent-32bpp.png new file mode 100644 index 0000000000..befc665552 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-not-square-transparent-32bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-partial-transparent-32bpp.ico b/image/test/reftest/ico/ico-bmp-32bpp/ico-partial-transparent-32bpp.ico new file mode 100644 index 0000000000..8ad62f7d0e Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-partial-transparent-32bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-partial-transparent-32bpp.png b/image/test/reftest/ico/ico-bmp-32bpp/ico-partial-transparent-32bpp.png new file mode 100644 index 0000000000..226ad6494f Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-partial-transparent-32bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-15x15-32bpp.ico b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-15x15-32bpp.ico new file mode 100644 index 0000000000..1f1b6b51ce Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-15x15-32bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-15x15-32bpp.png b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-15x15-32bpp.png new file mode 100644 index 0000000000..e1287430d0 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-15x15-32bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-16x16-32bpp.ico b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-16x16-32bpp.ico new file mode 100644 index 0000000000..7a8f01529d Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-16x16-32bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-16x16-32bpp.png b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-16x16-32bpp.png new file mode 100644 index 0000000000..c04869e728 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-16x16-32bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-17x17-32bpp.ico b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-17x17-32bpp.ico new file mode 100644 index 0000000000..b92860be4f Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-17x17-32bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-17x17-32bpp.png b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-17x17-32bpp.png new file mode 100644 index 0000000000..00fb8e4f37 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-17x17-32bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-1x1-32bpp.ico b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-1x1-32bpp.ico new file mode 100644 index 0000000000..5ad60c575c Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-1x1-32bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-1x1-32bpp.png b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-1x1-32bpp.png new file mode 100644 index 0000000000..c05f5fef89 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-1x1-32bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-256x256-32bpp.ico b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-256x256-32bpp.ico new file mode 100644 index 0000000000..f8b530ef0b Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-256x256-32bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-256x256-32bpp.png b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-256x256-32bpp.png new file mode 100644 index 0000000000..84bfada761 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-256x256-32bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-2x2-32bpp.ico b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-2x2-32bpp.ico new file mode 100644 index 0000000000..e5b2bf7e76 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-2x2-32bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-2x2-32bpp.png b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-2x2-32bpp.png new file mode 100644 index 0000000000..e512d3f9b4 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-2x2-32bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-31x31-32bpp.ico b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-31x31-32bpp.ico new file mode 100644 index 0000000000..ddcbde85f4 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-31x31-32bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-31x31-32bpp.png b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-31x31-32bpp.png new file mode 100644 index 0000000000..e4a8642514 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-31x31-32bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-32x32-32bpp.ico b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-32x32-32bpp.ico new file mode 100644 index 0000000000..a89c016485 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-32x32-32bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-32x32-32bpp.png b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-32x32-32bpp.png new file mode 100644 index 0000000000..3a6fbe8ee9 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-32x32-32bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-33x33-32bpp.ico b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-33x33-32bpp.ico new file mode 100644 index 0000000000..cda9133f8b Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-33x33-32bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-33x33-32bpp.png b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-33x33-32bpp.png new file mode 100644 index 0000000000..72ef7eb636 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-33x33-32bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-3x3-32bpp.ico b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-3x3-32bpp.ico new file mode 100644 index 0000000000..3894ccf212 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-3x3-32bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-3x3-32bpp.png b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-3x3-32bpp.png new file mode 100644 index 0000000000..cb42ec4f87 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-3x3-32bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-4x4-32bpp.ico b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-4x4-32bpp.ico new file mode 100644 index 0000000000..828494c668 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-4x4-32bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-4x4-32bpp.png b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-4x4-32bpp.png new file mode 100644 index 0000000000..e6afafd89a Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-4x4-32bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-5x5-32bpp.ico b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-5x5-32bpp.ico new file mode 100644 index 0000000000..4f0a2bcc72 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-5x5-32bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-5x5-32bpp.png b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-5x5-32bpp.png new file mode 100644 index 0000000000..a844aff76d Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-5x5-32bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-6x6-32bpp.ico b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-6x6-32bpp.ico new file mode 100644 index 0000000000..5524769e60 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-6x6-32bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-6x6-32bpp.png b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-6x6-32bpp.png new file mode 100644 index 0000000000..415c2d9c6a Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-6x6-32bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-7x7-32bpp.ico b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-7x7-32bpp.ico new file mode 100644 index 0000000000..6aeebb898d Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-7x7-32bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-7x7-32bpp.png b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-7x7-32bpp.png new file mode 100644 index 0000000000..ab2f892747 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-7x7-32bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-8x8-32bpp.ico b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-8x8-32bpp.ico new file mode 100644 index 0000000000..824c744a20 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-8x8-32bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-8x8-32bpp.png b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-8x8-32bpp.png new file mode 100644 index 0000000000..fe2ff40a1d Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-8x8-32bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-9x9-32bpp.ico b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-9x9-32bpp.ico new file mode 100644 index 0000000000..cf1f6e9c88 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-9x9-32bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-size-9x9-32bpp.png b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-9x9-32bpp.png new file mode 100644 index 0000000000..18ab4b25de Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-size-9x9-32bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-transparent-32bpp.ico b/image/test/reftest/ico/ico-bmp-32bpp/ico-transparent-32bpp.ico new file mode 100644 index 0000000000..151b7cb361 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-transparent-32bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/ico-transparent-32bpp.png b/image/test/reftest/ico/ico-bmp-32bpp/ico-transparent-32bpp.png new file mode 100644 index 0000000000..062152e3b1 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-32bpp/ico-transparent-32bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-32bpp/reftest.list b/image/test/reftest/ico/ico-bmp-32bpp/reftest.list new file mode 100644 index 0000000000..e05355a2bf --- /dev/null +++ b/image/test/reftest/ico/ico-bmp-32bpp/reftest.list @@ -0,0 +1,22 @@ +# ICO BMP 32BPP tests + +# Images of various sizes +== ico-size-1x1-32bpp.ico ico-size-1x1-32bpp.png +== ico-size-2x2-32bpp.ico ico-size-2x2-32bpp.png +== ico-size-3x3-32bpp.ico ico-size-3x3-32bpp.png +== ico-size-4x4-32bpp.ico ico-size-4x4-32bpp.png +== ico-size-5x5-32bpp.ico ico-size-5x5-32bpp.png +== ico-size-6x6-32bpp.ico ico-size-6x6-32bpp.png +== ico-size-7x7-32bpp.ico ico-size-7x7-32bpp.png +== ico-size-8x8-32bpp.ico ico-size-8x8-32bpp.png +== ico-size-9x9-32bpp.ico ico-size-9x9-32bpp.png +== ico-size-15x15-32bpp.ico ico-size-15x15-32bpp.png +== ico-size-16x16-32bpp.ico ico-size-16x16-32bpp.png +== ico-size-17x17-32bpp.ico ico-size-17x17-32bpp.png +== ico-size-31x31-32bpp.ico ico-size-31x31-32bpp.png +== ico-size-32x32-32bpp.ico ico-size-32x32-32bpp.png +== ico-size-33x33-32bpp.ico ico-size-33x33-32bpp.png +== ico-size-256x256-32bpp.ico ico-size-256x256-32bpp.png +== ico-partial-transparent-32bpp.ico ico-partial-transparent-32bpp.png +== ico-transparent-32bpp.ico ico-transparent-32bpp.png +== ico-not-square-transparent-32bpp.ico ico-not-square-transparent-32bpp.png diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-not-square-transparent-4bpp.ico b/image/test/reftest/ico/ico-bmp-4bpp/ico-not-square-transparent-4bpp.ico new file mode 100644 index 0000000000..d502d2ef6b Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-not-square-transparent-4bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-not-square-transparent-4bpp.png b/image/test/reftest/ico/ico-bmp-4bpp/ico-not-square-transparent-4bpp.png new file mode 100644 index 0000000000..3e556ad293 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-not-square-transparent-4bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-partial-transparent-4bpp.ico b/image/test/reftest/ico/ico-bmp-4bpp/ico-partial-transparent-4bpp.ico new file mode 100644 index 0000000000..7bd3b8a69f Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-partial-transparent-4bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-partial-transparent-4bpp.png b/image/test/reftest/ico/ico-bmp-4bpp/ico-partial-transparent-4bpp.png new file mode 100644 index 0000000000..9ff0ce41f7 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-partial-transparent-4bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-15x15-4bpp.ico b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-15x15-4bpp.ico new file mode 100644 index 0000000000..de5c49e2a6 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-15x15-4bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-15x15-4bpp.png b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-15x15-4bpp.png new file mode 100644 index 0000000000..5d4a3f9534 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-15x15-4bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-16x16-4bpp.ico b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-16x16-4bpp.ico new file mode 100644 index 0000000000..b856b3f376 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-16x16-4bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-16x16-4bpp.png b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-16x16-4bpp.png new file mode 100644 index 0000000000..d45d63f539 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-16x16-4bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-17x17-4bpp.ico b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-17x17-4bpp.ico new file mode 100644 index 0000000000..44e055d2f7 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-17x17-4bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-17x17-4bpp.png b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-17x17-4bpp.png new file mode 100644 index 0000000000..bf48903299 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-17x17-4bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-1x1-4bpp.ico b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-1x1-4bpp.ico new file mode 100644 index 0000000000..fd46c328d5 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-1x1-4bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-1x1-4bpp.png b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-1x1-4bpp.png new file mode 100644 index 0000000000..d41dd645b7 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-1x1-4bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-256x256-4bpp.ico b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-256x256-4bpp.ico new file mode 100644 index 0000000000..6d28edaa8f Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-256x256-4bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-256x256-4bpp.png b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-256x256-4bpp.png new file mode 100644 index 0000000000..3acdef8303 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-256x256-4bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-2x2-4bpp.ico b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-2x2-4bpp.ico new file mode 100644 index 0000000000..7dc4afde68 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-2x2-4bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-2x2-4bpp.png b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-2x2-4bpp.png new file mode 100644 index 0000000000..b2d6050415 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-2x2-4bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-31x31-4bpp.ico b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-31x31-4bpp.ico new file mode 100644 index 0000000000..0471332d6b Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-31x31-4bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-31x31-4bpp.png b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-31x31-4bpp.png new file mode 100644 index 0000000000..cb12a3448d Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-31x31-4bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-32x32-4bpp.ico b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-32x32-4bpp.ico new file mode 100644 index 0000000000..ef005dc5bf Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-32x32-4bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-32x32-4bpp.png b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-32x32-4bpp.png new file mode 100644 index 0000000000..58d867d120 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-32x32-4bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-33x33-4bpp.ico b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-33x33-4bpp.ico new file mode 100644 index 0000000000..4c71963a49 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-33x33-4bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-33x33-4bpp.png b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-33x33-4bpp.png new file mode 100644 index 0000000000..064fde198c Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-33x33-4bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-3x3-4bpp.ico b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-3x3-4bpp.ico new file mode 100644 index 0000000000..aaa6350e96 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-3x3-4bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-3x3-4bpp.png b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-3x3-4bpp.png new file mode 100644 index 0000000000..e34114d5c9 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-3x3-4bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-4x4-4bpp.ico b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-4x4-4bpp.ico new file mode 100644 index 0000000000..767bebed41 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-4x4-4bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-4x4-4bpp.png b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-4x4-4bpp.png new file mode 100644 index 0000000000..3efa555620 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-4x4-4bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-5x5-4bpp.ico b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-5x5-4bpp.ico new file mode 100644 index 0000000000..309b6fe5b0 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-5x5-4bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-5x5-4bpp.png b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-5x5-4bpp.png new file mode 100644 index 0000000000..02ebf57a51 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-5x5-4bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-6x6-4bpp.ico b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-6x6-4bpp.ico new file mode 100644 index 0000000000..255fda6a84 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-6x6-4bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-6x6-4bpp.png b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-6x6-4bpp.png new file mode 100644 index 0000000000..1f5769d09c Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-6x6-4bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-7x7-4bpp.ico b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-7x7-4bpp.ico new file mode 100644 index 0000000000..1a39634526 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-7x7-4bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-7x7-4bpp.png b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-7x7-4bpp.png new file mode 100644 index 0000000000..59a1b98b52 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-7x7-4bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-8x8-4bpp.ico b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-8x8-4bpp.ico new file mode 100644 index 0000000000..40bc9f8937 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-8x8-4bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-8x8-4bpp.png b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-8x8-4bpp.png new file mode 100644 index 0000000000..cf44f59676 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-8x8-4bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-9x9-4bpp.ico b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-9x9-4bpp.ico new file mode 100644 index 0000000000..bda12f32b9 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-9x9-4bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-size-9x9-4bpp.png b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-9x9-4bpp.png new file mode 100644 index 0000000000..2e07364135 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-size-9x9-4bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-transparent-4bpp.ico b/image/test/reftest/ico/ico-bmp-4bpp/ico-transparent-4bpp.ico new file mode 100644 index 0000000000..8e361306c5 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-transparent-4bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/ico-transparent-4bpp.png b/image/test/reftest/ico/ico-bmp-4bpp/ico-transparent-4bpp.png new file mode 100644 index 0000000000..062152e3b1 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-4bpp/ico-transparent-4bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-4bpp/reftest.list b/image/test/reftest/ico/ico-bmp-4bpp/reftest.list new file mode 100644 index 0000000000..6caac4ac86 --- /dev/null +++ b/image/test/reftest/ico/ico-bmp-4bpp/reftest.list @@ -0,0 +1,23 @@ +# ICO BMP 4BPP tests + +# Images of various sizes +== ico-size-1x1-4bpp.ico ico-size-1x1-4bpp.png +== ico-size-2x2-4bpp.ico ico-size-2x2-4bpp.png +== ico-size-3x3-4bpp.ico ico-size-3x3-4bpp.png +== ico-size-4x4-4bpp.ico ico-size-4x4-4bpp.png +== ico-size-5x5-4bpp.ico ico-size-5x5-4bpp.png +== ico-size-6x6-4bpp.ico ico-size-6x6-4bpp.png +== ico-size-7x7-4bpp.ico ico-size-7x7-4bpp.png +== ico-size-8x8-4bpp.ico ico-size-8x8-4bpp.png +== ico-size-9x9-4bpp.ico ico-size-9x9-4bpp.png +== ico-size-15x15-4bpp.ico ico-size-15x15-4bpp.png +== ico-size-16x16-4bpp.ico ico-size-16x16-4bpp.png +== ico-size-17x17-4bpp.ico ico-size-17x17-4bpp.png +== ico-size-31x31-4bpp.ico ico-size-31x31-4bpp.png +== ico-size-32x32-4bpp.ico ico-size-32x32-4bpp.png +== ico-size-33x33-4bpp.ico ico-size-33x33-4bpp.png +== ico-size-256x256-4bpp.ico ico-size-256x256-4bpp.png +== ico-partial-transparent-4bpp.ico ico-partial-transparent-4bpp.png +== ico-transparent-4bpp.ico ico-transparent-4bpp.png +== ico-not-square-transparent-4bpp.ico ico-not-square-transparent-4bpp.png + diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-not-square-transparent-8bpp.ico b/image/test/reftest/ico/ico-bmp-8bpp/ico-not-square-transparent-8bpp.ico new file mode 100644 index 0000000000..d28b9a04ec Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-not-square-transparent-8bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-not-square-transparent-8bpp.png b/image/test/reftest/ico/ico-bmp-8bpp/ico-not-square-transparent-8bpp.png new file mode 100644 index 0000000000..36a4eb5122 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-not-square-transparent-8bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-partial-transparent-8bpp.ico b/image/test/reftest/ico/ico-bmp-8bpp/ico-partial-transparent-8bpp.ico new file mode 100644 index 0000000000..9074caa401 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-partial-transparent-8bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-partial-transparent-8bpp.png b/image/test/reftest/ico/ico-bmp-8bpp/ico-partial-transparent-8bpp.png new file mode 100644 index 0000000000..6f990f2572 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-partial-transparent-8bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-15x15-8bpp.ico b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-15x15-8bpp.ico new file mode 100644 index 0000000000..f3f3a13530 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-15x15-8bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-15x15-8bpp.png b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-15x15-8bpp.png new file mode 100644 index 0000000000..e1287430d0 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-15x15-8bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-16x16-8bpp.ico b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-16x16-8bpp.ico new file mode 100644 index 0000000000..24c20e23ec Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-16x16-8bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-16x16-8bpp.png b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-16x16-8bpp.png new file mode 100644 index 0000000000..2e66b2e5f9 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-16x16-8bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-17x17-8bpp.ico b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-17x17-8bpp.ico new file mode 100644 index 0000000000..7fa66b9b21 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-17x17-8bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-17x17-8bpp.png b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-17x17-8bpp.png new file mode 100644 index 0000000000..4d11d7561c Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-17x17-8bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-1x1-8bpp.ico b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-1x1-8bpp.ico new file mode 100644 index 0000000000..3cf3320eae Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-1x1-8bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-1x1-8bpp.png b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-1x1-8bpp.png new file mode 100644 index 0000000000..c05f5fef89 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-1x1-8bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-256x256-8bpp.ico b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-256x256-8bpp.ico new file mode 100644 index 0000000000..524b6f7c8e Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-256x256-8bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-256x256-8bpp.png b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-256x256-8bpp.png new file mode 100644 index 0000000000..f367468c95 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-256x256-8bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-2x2-8bpp.ico b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-2x2-8bpp.ico new file mode 100644 index 0000000000..95d8375a00 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-2x2-8bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-2x2-8bpp.png b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-2x2-8bpp.png new file mode 100644 index 0000000000..e512d3f9b4 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-2x2-8bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-31x31-8bpp.ico b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-31x31-8bpp.ico new file mode 100644 index 0000000000..7806754474 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-31x31-8bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-31x31-8bpp.png b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-31x31-8bpp.png new file mode 100644 index 0000000000..84bf61078c Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-31x31-8bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-32x32-8bpp.ico b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-32x32-8bpp.ico new file mode 100644 index 0000000000..d21cc5b967 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-32x32-8bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-32x32-8bpp.png b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-32x32-8bpp.png new file mode 100644 index 0000000000..349fd4df24 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-32x32-8bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-33x33-8bpp.ico b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-33x33-8bpp.ico new file mode 100644 index 0000000000..1b419b2632 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-33x33-8bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-33x33-8bpp.png b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-33x33-8bpp.png new file mode 100644 index 0000000000..a4c100649a Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-33x33-8bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-3x3-8bpp.ico b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-3x3-8bpp.ico new file mode 100644 index 0000000000..869f74fcdc Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-3x3-8bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-3x3-8bpp.png b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-3x3-8bpp.png new file mode 100644 index 0000000000..cb42ec4f87 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-3x3-8bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-4x4-8bpp.ico b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-4x4-8bpp.ico new file mode 100644 index 0000000000..3967563727 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-4x4-8bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-4x4-8bpp.png b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-4x4-8bpp.png new file mode 100644 index 0000000000..e6afafd89a Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-4x4-8bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-5x5-8bpp.ico b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-5x5-8bpp.ico new file mode 100644 index 0000000000..92814e3661 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-5x5-8bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-5x5-8bpp.png b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-5x5-8bpp.png new file mode 100644 index 0000000000..a844aff76d Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-5x5-8bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-6x6-8bpp.ico b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-6x6-8bpp.ico new file mode 100644 index 0000000000..1af478a8a8 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-6x6-8bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-6x6-8bpp.png b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-6x6-8bpp.png new file mode 100644 index 0000000000..415c2d9c6a Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-6x6-8bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-7x7-8bpp.ico b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-7x7-8bpp.ico new file mode 100644 index 0000000000..1c70820ebd Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-7x7-8bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-7x7-8bpp.png b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-7x7-8bpp.png new file mode 100644 index 0000000000..ab2f892747 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-7x7-8bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-8x8-8bpp.ico b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-8x8-8bpp.ico new file mode 100644 index 0000000000..782ae220df Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-8x8-8bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-8x8-8bpp.png b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-8x8-8bpp.png new file mode 100644 index 0000000000..fe2ff40a1d Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-8x8-8bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-9x9-8bpp.ico b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-9x9-8bpp.ico new file mode 100644 index 0000000000..6825372b4a Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-9x9-8bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-size-9x9-8bpp.png b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-9x9-8bpp.png new file mode 100644 index 0000000000..18ab4b25de Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-size-9x9-8bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-transparent-8bpp.ico b/image/test/reftest/ico/ico-bmp-8bpp/ico-transparent-8bpp.ico new file mode 100644 index 0000000000..8e361306c5 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-transparent-8bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/ico-transparent-8bpp.png b/image/test/reftest/ico/ico-bmp-8bpp/ico-transparent-8bpp.png new file mode 100644 index 0000000000..062152e3b1 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-8bpp/ico-transparent-8bpp.png differ diff --git a/image/test/reftest/ico/ico-bmp-8bpp/reftest.list b/image/test/reftest/ico/ico-bmp-8bpp/reftest.list new file mode 100644 index 0000000000..5a6b543238 --- /dev/null +++ b/image/test/reftest/ico/ico-bmp-8bpp/reftest.list @@ -0,0 +1,23 @@ +# ICO BMP 8BPP tests + +# Images of various sizes +== ico-size-1x1-8bpp.ico ico-size-1x1-8bpp.png +== ico-size-2x2-8bpp.ico ico-size-2x2-8bpp.png +== ico-size-3x3-8bpp.ico ico-size-3x3-8bpp.png +== ico-size-4x4-8bpp.ico ico-size-4x4-8bpp.png +== ico-size-5x5-8bpp.ico ico-size-5x5-8bpp.png +== ico-size-6x6-8bpp.ico ico-size-6x6-8bpp.png +== ico-size-7x7-8bpp.ico ico-size-7x7-8bpp.png +== ico-size-8x8-8bpp.ico ico-size-8x8-8bpp.png +== ico-size-9x9-8bpp.ico ico-size-9x9-8bpp.png +== ico-size-15x15-8bpp.ico ico-size-15x15-8bpp.png +== ico-size-16x16-8bpp.ico ico-size-16x16-8bpp.png +== ico-size-17x17-8bpp.ico ico-size-17x17-8bpp.png +== ico-size-31x31-8bpp.ico ico-size-31x31-8bpp.png +== ico-size-32x32-8bpp.ico ico-size-32x32-8bpp.png +== ico-size-33x33-8bpp.ico ico-size-33x33-8bpp.png +== ico-size-256x256-8bpp.ico ico-size-256x256-8bpp.png +== ico-partial-transparent-8bpp.ico ico-partial-transparent-8bpp.png +== ico-transparent-8bpp.ico ico-transparent-8bpp.png +== ico-not-square-transparent-8bpp.ico ico-not-square-transparent-8bpp.png + diff --git a/image/test/reftest/ico/ico-bmp-corrupted/16x16.png b/image/test/reftest/ico/ico-bmp-corrupted/16x16.png new file mode 100644 index 0000000000..c04869e728 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-corrupted/16x16.png differ diff --git a/image/test/reftest/ico/ico-bmp-corrupted/invalid-bpp.ico b/image/test/reftest/ico/ico-bmp-corrupted/invalid-bpp.ico new file mode 100644 index 0000000000..1189e4c040 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-corrupted/invalid-bpp.ico differ diff --git a/image/test/reftest/ico/ico-bmp-corrupted/invalid-compression-RLE4.ico b/image/test/reftest/ico/ico-bmp-corrupted/invalid-compression-RLE4.ico new file mode 100644 index 0000000000..8fd0a5d658 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-corrupted/invalid-compression-RLE4.ico differ diff --git a/image/test/reftest/ico/ico-bmp-corrupted/invalid-compression-RLE8.ico b/image/test/reftest/ico/ico-bmp-corrupted/invalid-compression-RLE8.ico new file mode 100644 index 0000000000..1f185ca620 Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-corrupted/invalid-compression-RLE8.ico differ diff --git a/image/test/reftest/ico/ico-bmp-corrupted/invalid-compression.ico b/image/test/reftest/ico/ico-bmp-corrupted/invalid-compression.ico new file mode 100644 index 0000000000..a49a783c5f Binary files /dev/null and b/image/test/reftest/ico/ico-bmp-corrupted/invalid-compression.ico differ diff --git a/image/test/reftest/ico/ico-bmp-corrupted/reftest.list b/image/test/reftest/ico/ico-bmp-corrupted/reftest.list new file mode 100644 index 0000000000..2467b1323e --- /dev/null +++ b/image/test/reftest/ico/ico-bmp-corrupted/reftest.list @@ -0,0 +1,10 @@ +# ICOs containing corrupted BMP tests + +# Invalid value for bits per pixel (BPP) - detected when decoding the header. +== wrapper.html?invalid-bpp.ico about:blank +# Invalid BPP values for RLE4 - detected when decoding the image data. +== wrapper.html?invalid-compression-RLE4.ico about:blank +# Invalid BPP values for RLE8 - detected when decoding the image data. +== wrapper.html?invalid-compression-RLE8.ico about:blank +# Invalid compression value - detected when decoding the image data. +== wrapper.html?invalid-compression.ico about:blank diff --git a/image/test/reftest/ico/ico-bmp-corrupted/wrapper.html b/image/test/reftest/ico/ico-bmp-corrupted/wrapper.html new file mode 100644 index 0000000000..943bc75bf2 --- /dev/null +++ b/image/test/reftest/ico/ico-bmp-corrupted/wrapper.html @@ -0,0 +1,80 @@ + + + +Image reftest wrapper + + + + + + + + + + diff --git a/image/test/reftest/ico/ico-mixed/mixed-bmp-png.ico b/image/test/reftest/ico/ico-mixed/mixed-bmp-png.ico new file mode 100644 index 0000000000..32e2c4995c Binary files /dev/null and b/image/test/reftest/ico/ico-mixed/mixed-bmp-png.ico differ diff --git a/image/test/reftest/ico/ico-mixed/mixed-bmp-png.png b/image/test/reftest/ico/ico-mixed/mixed-bmp-png.png new file mode 100644 index 0000000000..b6aee74092 Binary files /dev/null and b/image/test/reftest/ico/ico-mixed/mixed-bmp-png.png differ diff --git a/image/test/reftest/ico/ico-mixed/mixed-bmp-png32.png b/image/test/reftest/ico/ico-mixed/mixed-bmp-png32.png new file mode 100644 index 0000000000..a058991272 Binary files /dev/null and b/image/test/reftest/ico/ico-mixed/mixed-bmp-png32.png differ diff --git a/image/test/reftest/ico/ico-mixed/mixed-bmp-png48.png b/image/test/reftest/ico/ico-mixed/mixed-bmp-png48.png new file mode 100644 index 0000000000..61bea5c804 Binary files /dev/null and b/image/test/reftest/ico/ico-mixed/mixed-bmp-png48.png differ diff --git a/image/test/reftest/ico/ico-mixed/reftest.list b/image/test/reftest/ico/ico-mixed/reftest.list new file mode 100644 index 0000000000..36134e40ab --- /dev/null +++ b/image/test/reftest/ico/ico-mixed/reftest.list @@ -0,0 +1,3 @@ +# ICO BMP and PNG mixed tests + +== mixed-bmp-png.ico mixed-bmp-png48.png diff --git a/image/test/reftest/ico/ico-png/corrupted_x00n0g01.ico b/image/test/reftest/ico/ico-png/corrupted_x00n0g01.ico new file mode 100644 index 0000000000..18b97b0b7e Binary files /dev/null and b/image/test/reftest/ico/ico-png/corrupted_x00n0g01.ico differ diff --git a/image/test/reftest/ico/ico-png/corrupted_xxcrn0g04.ico b/image/test/reftest/ico/ico-png/corrupted_xxcrn0g04.ico new file mode 100644 index 0000000000..3fa5285c5b Binary files /dev/null and b/image/test/reftest/ico/ico-png/corrupted_xxcrn0g04.ico differ diff --git a/image/test/reftest/ico/ico-png/ico-size-15x15-png.ico b/image/test/reftest/ico/ico-png/ico-size-15x15-png.ico new file mode 100644 index 0000000000..e67644a890 Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-15x15-png.ico differ diff --git a/image/test/reftest/ico/ico-png/ico-size-15x15-png.png b/image/test/reftest/ico/ico-png/ico-size-15x15-png.png new file mode 100644 index 0000000000..e1287430d0 Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-15x15-png.png differ diff --git a/image/test/reftest/ico/ico-png/ico-size-16x16-png.ico b/image/test/reftest/ico/ico-png/ico-size-16x16-png.ico new file mode 100644 index 0000000000..442ab4dc80 Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-16x16-png.ico differ diff --git a/image/test/reftest/ico/ico-png/ico-size-16x16-png.png b/image/test/reftest/ico/ico-png/ico-size-16x16-png.png new file mode 100644 index 0000000000..c04869e728 Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-16x16-png.png differ diff --git a/image/test/reftest/ico/ico-png/ico-size-17x17-png.ico b/image/test/reftest/ico/ico-png/ico-size-17x17-png.ico new file mode 100644 index 0000000000..f135385d7e Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-17x17-png.ico differ diff --git a/image/test/reftest/ico/ico-png/ico-size-17x17-png.png b/image/test/reftest/ico/ico-png/ico-size-17x17-png.png new file mode 100644 index 0000000000..00fb8e4f37 Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-17x17-png.png differ diff --git a/image/test/reftest/ico/ico-png/ico-size-1x1-png.ico b/image/test/reftest/ico/ico-png/ico-size-1x1-png.ico new file mode 100644 index 0000000000..8eb80c7db2 Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-1x1-png.ico differ diff --git a/image/test/reftest/ico/ico-png/ico-size-1x1-png.png b/image/test/reftest/ico/ico-png/ico-size-1x1-png.png new file mode 100644 index 0000000000..c05f5fef89 Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-1x1-png.png differ diff --git a/image/test/reftest/ico/ico-png/ico-size-256x256-png.ico b/image/test/reftest/ico/ico-png/ico-size-256x256-png.ico new file mode 100644 index 0000000000..ecb88edf3c Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-256x256-png.ico differ diff --git a/image/test/reftest/ico/ico-png/ico-size-256x256-png.png b/image/test/reftest/ico/ico-png/ico-size-256x256-png.png new file mode 100644 index 0000000000..2d2f52d6c1 Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-256x256-png.png differ diff --git a/image/test/reftest/ico/ico-png/ico-size-2x2-png.ico b/image/test/reftest/ico/ico-png/ico-size-2x2-png.ico new file mode 100644 index 0000000000..5799953c98 Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-2x2-png.ico differ diff --git a/image/test/reftest/ico/ico-png/ico-size-2x2-png.png b/image/test/reftest/ico/ico-png/ico-size-2x2-png.png new file mode 100644 index 0000000000..e512d3f9b4 Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-2x2-png.png differ diff --git a/image/test/reftest/ico/ico-png/ico-size-31x31-png.ico b/image/test/reftest/ico/ico-png/ico-size-31x31-png.ico new file mode 100644 index 0000000000..2e9fbd8f9c Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-31x31-png.ico differ diff --git a/image/test/reftest/ico/ico-png/ico-size-31x31-png.png b/image/test/reftest/ico/ico-png/ico-size-31x31-png.png new file mode 100644 index 0000000000..e4a8642514 Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-31x31-png.png differ diff --git a/image/test/reftest/ico/ico-png/ico-size-32x32-png.ico b/image/test/reftest/ico/ico-png/ico-size-32x32-png.ico new file mode 100644 index 0000000000..af97a86630 Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-32x32-png.ico differ diff --git a/image/test/reftest/ico/ico-png/ico-size-32x32-png.png b/image/test/reftest/ico/ico-png/ico-size-32x32-png.png new file mode 100644 index 0000000000..3a6fbe8ee9 Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-32x32-png.png differ diff --git a/image/test/reftest/ico/ico-png/ico-size-33x33-png.ico b/image/test/reftest/ico/ico-png/ico-size-33x33-png.ico new file mode 100644 index 0000000000..2509c8c1f2 Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-33x33-png.ico differ diff --git a/image/test/reftest/ico/ico-png/ico-size-33x33-png.png b/image/test/reftest/ico/ico-png/ico-size-33x33-png.png new file mode 100644 index 0000000000..72ef7eb636 Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-33x33-png.png differ diff --git a/image/test/reftest/ico/ico-png/ico-size-3x3-png.ico b/image/test/reftest/ico/ico-png/ico-size-3x3-png.ico new file mode 100644 index 0000000000..d2cd649c84 Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-3x3-png.ico differ diff --git a/image/test/reftest/ico/ico-png/ico-size-3x3-png.png b/image/test/reftest/ico/ico-png/ico-size-3x3-png.png new file mode 100644 index 0000000000..cb42ec4f87 Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-3x3-png.png differ diff --git a/image/test/reftest/ico/ico-png/ico-size-4x4-png.ico b/image/test/reftest/ico/ico-png/ico-size-4x4-png.ico new file mode 100644 index 0000000000..60180aad5e Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-4x4-png.ico differ diff --git a/image/test/reftest/ico/ico-png/ico-size-4x4-png.png b/image/test/reftest/ico/ico-png/ico-size-4x4-png.png new file mode 100644 index 0000000000..e6afafd89a Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-4x4-png.png differ diff --git a/image/test/reftest/ico/ico-png/ico-size-5x5-png.ico b/image/test/reftest/ico/ico-png/ico-size-5x5-png.ico new file mode 100644 index 0000000000..089c0c8858 Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-5x5-png.ico differ diff --git a/image/test/reftest/ico/ico-png/ico-size-5x5-png.png b/image/test/reftest/ico/ico-png/ico-size-5x5-png.png new file mode 100644 index 0000000000..a844aff76d Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-5x5-png.png differ diff --git a/image/test/reftest/ico/ico-png/ico-size-6x6-png.ico b/image/test/reftest/ico/ico-png/ico-size-6x6-png.ico new file mode 100644 index 0000000000..2ee75d25ab Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-6x6-png.ico differ diff --git a/image/test/reftest/ico/ico-png/ico-size-6x6-png.png b/image/test/reftest/ico/ico-png/ico-size-6x6-png.png new file mode 100644 index 0000000000..415c2d9c6a Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-6x6-png.png differ diff --git a/image/test/reftest/ico/ico-png/ico-size-7x7-png.ico b/image/test/reftest/ico/ico-png/ico-size-7x7-png.ico new file mode 100644 index 0000000000..ade9a3ecde Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-7x7-png.ico differ diff --git a/image/test/reftest/ico/ico-png/ico-size-7x7-png.png b/image/test/reftest/ico/ico-png/ico-size-7x7-png.png new file mode 100644 index 0000000000..ab2f892747 Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-7x7-png.png differ diff --git a/image/test/reftest/ico/ico-png/ico-size-8x8-png.ico b/image/test/reftest/ico/ico-png/ico-size-8x8-png.ico new file mode 100644 index 0000000000..a0a150bad6 Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-8x8-png.ico differ diff --git a/image/test/reftest/ico/ico-png/ico-size-8x8-png.png b/image/test/reftest/ico/ico-png/ico-size-8x8-png.png new file mode 100644 index 0000000000..fe2ff40a1d Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-8x8-png.png differ diff --git a/image/test/reftest/ico/ico-png/ico-size-9x9-png.ico b/image/test/reftest/ico/ico-png/ico-size-9x9-png.ico new file mode 100644 index 0000000000..a53357b449 Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-9x9-png.ico differ diff --git a/image/test/reftest/ico/ico-png/ico-size-9x9-png.png b/image/test/reftest/ico/ico-png/ico-size-9x9-png.png new file mode 100644 index 0000000000..18ab4b25de Binary files /dev/null and b/image/test/reftest/ico/ico-png/ico-size-9x9-png.png differ diff --git a/image/test/reftest/ico/ico-png/reftest.list b/image/test/reftest/ico/ico-png/reftest.list new file mode 100644 index 0000000000..002d0e4f32 --- /dev/null +++ b/image/test/reftest/ico/ico-png/reftest.list @@ -0,0 +1,29 @@ +# ICO PNG tests + +# Images of various sizes +== ico-size-1x1-png.ico ico-size-1x1-png.png +== ico-size-2x2-png.ico ico-size-2x2-png.png +== ico-size-3x3-png.ico ico-size-3x3-png.png +== ico-size-4x4-png.ico ico-size-4x4-png.png +== ico-size-5x5-png.ico ico-size-5x5-png.png +== ico-size-6x6-png.ico ico-size-6x6-png.png +== ico-size-7x7-png.ico ico-size-7x7-png.png +== ico-size-8x8-png.ico ico-size-8x8-png.png +== ico-size-9x9-png.ico ico-size-9x9-png.png +== ico-size-15x15-png.ico ico-size-15x15-png.png +== ico-size-16x16-png.ico ico-size-16x16-png.png +== ico-size-17x17-png.ico ico-size-17x17-png.png +== ico-size-31x31-png.ico ico-size-31x31-png.png +== ico-size-32x32-png.ico ico-size-32x32-png.png +== ico-size-33x33-png.ico ico-size-33x33-png.png +== ico-size-256x256-png.ico ico-size-256x256-png.png + +# Corrupted files so no image should be loaded +# x00n0g01 - empty 0x0 grayscale file +== wrapper.html?x00n0g01.ico about:blank +# xcrn0g04 - added cr bytes +== wrapper.html?xcrn0g04.ico about:blank + +# Test ICO PNG transparency +== transparent-png.ico transparent-png.png + diff --git a/image/test/reftest/ico/ico-png/tmp.ico b/image/test/reftest/ico/ico-png/tmp.ico new file mode 100644 index 0000000000..5723a2e776 Binary files /dev/null and b/image/test/reftest/ico/ico-png/tmp.ico differ diff --git a/image/test/reftest/ico/ico-png/transparent-png.ico b/image/test/reftest/ico/ico-png/transparent-png.ico new file mode 100644 index 0000000000..cc8a4a31db Binary files /dev/null and b/image/test/reftest/ico/ico-png/transparent-png.ico differ diff --git a/image/test/reftest/ico/ico-png/transparent-png.png b/image/test/reftest/ico/ico-png/transparent-png.png new file mode 100644 index 0000000000..29e3a24359 Binary files /dev/null and b/image/test/reftest/ico/ico-png/transparent-png.png differ diff --git a/image/test/reftest/ico/ico-png/wrapper.html b/image/test/reftest/ico/ico-png/wrapper.html new file mode 100644 index 0000000000..45b5167754 --- /dev/null +++ b/image/test/reftest/ico/ico-png/wrapper.html @@ -0,0 +1,28 @@ + + + +Image reftest wrapper + + + + + + + + + + diff --git a/image/test/reftest/ico/ico-png/x00n0g01.png b/image/test/reftest/ico/ico-png/x00n0g01.png new file mode 100644 index 0000000000..db3a5fda7e Binary files /dev/null and b/image/test/reftest/ico/ico-png/x00n0g01.png differ diff --git a/image/test/reftest/ico/ico-png/xcrn0g04.png b/image/test/reftest/ico/ico-png/xcrn0g04.png new file mode 100644 index 0000000000..5bce9f3ada Binary files /dev/null and b/image/test/reftest/ico/ico-png/xcrn0g04.png differ diff --git a/image/test/reftest/ico/reftest.list b/image/test/reftest/ico/reftest.list new file mode 100644 index 0000000000..22ed9b4fe7 --- /dev/null +++ b/image/test/reftest/ico/reftest.list @@ -0,0 +1,11 @@ +# ICO tests + +include ico-bmp-1bpp/reftest.list +include ico-bmp-4bpp/reftest.list +include ico-bmp-8bpp/reftest.list +include ico-bmp-24bpp/reftest.list +include ico-bmp-32bpp/reftest.list +include ico-bmp-corrupted/reftest.list +include ico-png/reftest.list +include ico-mixed/reftest.list +include cur/reftest.list diff --git a/image/test/reftest/img2html.html b/image/test/reftest/img2html.html new file mode 100644 index 0000000000..57f45bbdd3 --- /dev/null +++ b/image/test/reftest/img2html.html @@ -0,0 +1,122 @@ + + +Image-to-html converter + + + +

Image-to-html converter

+

Enter the relative path to an image file, and this will convert it +to a pure HTML representation (no images).

+ + +
+ Path to image:
+ + Fill canvas with (instead of transparency).
+ +

+
+ (img / canvas/ imghtml) +

+ Result:
+ +
+ + + + + + diff --git a/image/test/reftest/jpeg/blue.html b/image/test/reftest/jpeg/blue.html new file mode 100644 index 0000000000..3f4bb44f7e --- /dev/null +++ b/image/test/reftest/jpeg/blue.html @@ -0,0 +1 @@ + diff --git a/image/test/reftest/jpeg/blue.jpg b/image/test/reftest/jpeg/blue.jpg new file mode 100644 index 0000000000..b5fef5d26c Binary files /dev/null and b/image/test/reftest/jpeg/blue.jpg differ diff --git a/image/test/reftest/jpeg/jpg-cmyk-1.jpg b/image/test/reftest/jpeg/jpg-cmyk-1.jpg new file mode 100644 index 0000000000..ddb2c106f2 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-cmyk-1.jpg differ diff --git a/image/test/reftest/jpeg/jpg-cmyk-1.png b/image/test/reftest/jpeg/jpg-cmyk-1.png new file mode 100644 index 0000000000..06915d5bce Binary files /dev/null and b/image/test/reftest/jpeg/jpg-cmyk-1.png differ diff --git a/image/test/reftest/jpeg/jpg-cmyk-2.jpg b/image/test/reftest/jpeg/jpg-cmyk-2.jpg new file mode 100644 index 0000000000..b955bde549 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-cmyk-2.jpg differ diff --git a/image/test/reftest/jpeg/jpg-cmyk-2.png b/image/test/reftest/jpeg/jpg-cmyk-2.png new file mode 100644 index 0000000000..9691e42b65 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-cmyk-2.png differ diff --git a/image/test/reftest/jpeg/jpg-gray.jpg b/image/test/reftest/jpeg/jpg-gray.jpg new file mode 100644 index 0000000000..af0413e3c1 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-gray.jpg differ diff --git a/image/test/reftest/jpeg/jpg-gray.png b/image/test/reftest/jpeg/jpg-gray.png new file mode 100644 index 0000000000..c5aedc34dc Binary files /dev/null and b/image/test/reftest/jpeg/jpg-gray.png differ diff --git a/image/test/reftest/jpeg/jpg-progressive-1000-ref.html b/image/test/reftest/jpeg/jpg-progressive-1000-ref.html new file mode 100644 index 0000000000..0ff2497102 --- /dev/null +++ b/image/test/reftest/jpeg/jpg-progressive-1000-ref.html @@ -0,0 +1 @@ + diff --git a/image/test/reftest/jpeg/jpg-progressive-1000.html b/image/test/reftest/jpeg/jpg-progressive-1000.html new file mode 100644 index 0000000000..b9eaf9c53a --- /dev/null +++ b/image/test/reftest/jpeg/jpg-progressive-1000.html @@ -0,0 +1 @@ + diff --git a/image/test/reftest/jpeg/jpg-progressive-1000.jpg b/image/test/reftest/jpeg/jpg-progressive-1000.jpg new file mode 100644 index 0000000000..65a4325b53 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-progressive-1000.jpg differ diff --git a/image/test/reftest/jpeg/jpg-progressive.jpg b/image/test/reftest/jpeg/jpg-progressive.jpg new file mode 100644 index 0000000000..db3cf59c26 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-progressive.jpg differ diff --git a/image/test/reftest/jpeg/jpg-progressive.png b/image/test/reftest/jpeg/jpg-progressive.png new file mode 100644 index 0000000000..3a6fbe8ee9 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-progressive.png differ diff --git a/image/test/reftest/jpeg/jpg-size-15x15.jpg b/image/test/reftest/jpeg/jpg-size-15x15.jpg new file mode 100644 index 0000000000..efe120a27f Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-15x15.jpg differ diff --git a/image/test/reftest/jpeg/jpg-size-15x15.png b/image/test/reftest/jpeg/jpg-size-15x15.png new file mode 100644 index 0000000000..e1287430d0 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-15x15.png differ diff --git a/image/test/reftest/jpeg/jpg-size-16x16.jpg b/image/test/reftest/jpeg/jpg-size-16x16.jpg new file mode 100644 index 0000000000..148ec733f9 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-16x16.jpg differ diff --git a/image/test/reftest/jpeg/jpg-size-16x16.png b/image/test/reftest/jpeg/jpg-size-16x16.png new file mode 100644 index 0000000000..c04869e728 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-16x16.png differ diff --git a/image/test/reftest/jpeg/jpg-size-17x17.jpg b/image/test/reftest/jpeg/jpg-size-17x17.jpg new file mode 100644 index 0000000000..b06bdb0d69 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-17x17.jpg differ diff --git a/image/test/reftest/jpeg/jpg-size-17x17.png b/image/test/reftest/jpeg/jpg-size-17x17.png new file mode 100644 index 0000000000..00fb8e4f37 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-17x17.png differ diff --git a/image/test/reftest/jpeg/jpg-size-1x1.jpg b/image/test/reftest/jpeg/jpg-size-1x1.jpg new file mode 100644 index 0000000000..73b68dfc06 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-1x1.jpg differ diff --git a/image/test/reftest/jpeg/jpg-size-1x1.png b/image/test/reftest/jpeg/jpg-size-1x1.png new file mode 100644 index 0000000000..c05f5fef89 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-1x1.png differ diff --git a/image/test/reftest/jpeg/jpg-size-2x2.jpg b/image/test/reftest/jpeg/jpg-size-2x2.jpg new file mode 100644 index 0000000000..bc50260ea6 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-2x2.jpg differ diff --git a/image/test/reftest/jpeg/jpg-size-2x2.png b/image/test/reftest/jpeg/jpg-size-2x2.png new file mode 100644 index 0000000000..e512d3f9b4 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-2x2.png differ diff --git a/image/test/reftest/jpeg/jpg-size-31x31.jpg b/image/test/reftest/jpeg/jpg-size-31x31.jpg new file mode 100644 index 0000000000..8fa0cc2367 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-31x31.jpg differ diff --git a/image/test/reftest/jpeg/jpg-size-31x31.png b/image/test/reftest/jpeg/jpg-size-31x31.png new file mode 100644 index 0000000000..e4a8642514 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-31x31.png differ diff --git a/image/test/reftest/jpeg/jpg-size-32x32.jpg b/image/test/reftest/jpeg/jpg-size-32x32.jpg new file mode 100644 index 0000000000..b11d62df6d Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-32x32.jpg differ diff --git a/image/test/reftest/jpeg/jpg-size-32x32.png b/image/test/reftest/jpeg/jpg-size-32x32.png new file mode 100644 index 0000000000..3a6fbe8ee9 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-32x32.png differ diff --git a/image/test/reftest/jpeg/jpg-size-33x33.jpg b/image/test/reftest/jpeg/jpg-size-33x33.jpg new file mode 100644 index 0000000000..5ac1169b4b Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-33x33.jpg differ diff --git a/image/test/reftest/jpeg/jpg-size-33x33.png b/image/test/reftest/jpeg/jpg-size-33x33.png new file mode 100644 index 0000000000..72ef7eb636 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-33x33.png differ diff --git a/image/test/reftest/jpeg/jpg-size-3x3.jpg b/image/test/reftest/jpeg/jpg-size-3x3.jpg new file mode 100644 index 0000000000..cf370d8ece Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-3x3.jpg differ diff --git a/image/test/reftest/jpeg/jpg-size-3x3.png b/image/test/reftest/jpeg/jpg-size-3x3.png new file mode 100644 index 0000000000..cb42ec4f87 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-3x3.png differ diff --git a/image/test/reftest/jpeg/jpg-size-4x4.jpg b/image/test/reftest/jpeg/jpg-size-4x4.jpg new file mode 100644 index 0000000000..5adf760a1b Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-4x4.jpg differ diff --git a/image/test/reftest/jpeg/jpg-size-4x4.png b/image/test/reftest/jpeg/jpg-size-4x4.png new file mode 100644 index 0000000000..e6afafd89a Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-4x4.png differ diff --git a/image/test/reftest/jpeg/jpg-size-5x5.jpg b/image/test/reftest/jpeg/jpg-size-5x5.jpg new file mode 100644 index 0000000000..4d5fd0501c Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-5x5.jpg differ diff --git a/image/test/reftest/jpeg/jpg-size-5x5.png b/image/test/reftest/jpeg/jpg-size-5x5.png new file mode 100644 index 0000000000..a844aff76d Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-5x5.png differ diff --git a/image/test/reftest/jpeg/jpg-size-6x6.jpg b/image/test/reftest/jpeg/jpg-size-6x6.jpg new file mode 100644 index 0000000000..415c2d9c6a Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-6x6.jpg differ diff --git a/image/test/reftest/jpeg/jpg-size-6x6.png b/image/test/reftest/jpeg/jpg-size-6x6.png new file mode 100644 index 0000000000..415c2d9c6a Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-6x6.png differ diff --git a/image/test/reftest/jpeg/jpg-size-7x7.jpg b/image/test/reftest/jpeg/jpg-size-7x7.jpg new file mode 100644 index 0000000000..5495f7e43e Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-7x7.jpg differ diff --git a/image/test/reftest/jpeg/jpg-size-7x7.png b/image/test/reftest/jpeg/jpg-size-7x7.png new file mode 100644 index 0000000000..ab2f892747 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-7x7.png differ diff --git a/image/test/reftest/jpeg/jpg-size-8x8.jpg b/image/test/reftest/jpeg/jpg-size-8x8.jpg new file mode 100644 index 0000000000..84a5c8f426 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-8x8.jpg differ diff --git a/image/test/reftest/jpeg/jpg-size-8x8.png b/image/test/reftest/jpeg/jpg-size-8x8.png new file mode 100644 index 0000000000..fe2ff40a1d Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-8x8.png differ diff --git a/image/test/reftest/jpeg/jpg-size-9x9.jpg b/image/test/reftest/jpeg/jpg-size-9x9.jpg new file mode 100644 index 0000000000..d0a15e599f Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-9x9.jpg differ diff --git a/image/test/reftest/jpeg/jpg-size-9x9.png b/image/test/reftest/jpeg/jpg-size-9x9.png new file mode 100644 index 0000000000..18ab4b25de Binary files /dev/null and b/image/test/reftest/jpeg/jpg-size-9x9.png differ diff --git a/image/test/reftest/jpeg/jpg-srgb-icc.jpg b/image/test/reftest/jpeg/jpg-srgb-icc.jpg new file mode 100644 index 0000000000..3ebefac732 Binary files /dev/null and b/image/test/reftest/jpeg/jpg-srgb-icc.jpg differ diff --git a/image/test/reftest/jpeg/jpg-srgb-icc.png b/image/test/reftest/jpeg/jpg-srgb-icc.png new file mode 100644 index 0000000000..1d8efc687a Binary files /dev/null and b/image/test/reftest/jpeg/jpg-srgb-icc.png differ diff --git a/image/test/reftest/jpeg/non-interleaved_progressive-1-halfred-ref.png b/image/test/reftest/jpeg/non-interleaved_progressive-1-halfred-ref.png new file mode 100644 index 0000000000..7d0c9e5580 Binary files /dev/null and b/image/test/reftest/jpeg/non-interleaved_progressive-1-halfred-ref.png differ diff --git a/image/test/reftest/jpeg/non-interleaved_progressive-1.jpg b/image/test/reftest/jpeg/non-interleaved_progressive-1.jpg new file mode 100644 index 0000000000..5128473dfd Binary files /dev/null and b/image/test/reftest/jpeg/non-interleaved_progressive-1.jpg differ diff --git a/image/test/reftest/jpeg/non-interleaved_progressive-2-white-ref.png b/image/test/reftest/jpeg/non-interleaved_progressive-2-white-ref.png new file mode 100644 index 0000000000..597329a663 Binary files /dev/null and b/image/test/reftest/jpeg/non-interleaved_progressive-2-white-ref.png differ diff --git a/image/test/reftest/jpeg/non-interleaved_progressive-2.jpg b/image/test/reftest/jpeg/non-interleaved_progressive-2.jpg new file mode 100644 index 0000000000..d4c80e9124 Binary files /dev/null and b/image/test/reftest/jpeg/non-interleaved_progressive-2.jpg differ diff --git a/image/test/reftest/jpeg/red-bad-marker.jpg b/image/test/reftest/jpeg/red-bad-marker.jpg new file mode 100644 index 0000000000..4abda17e59 Binary files /dev/null and b/image/test/reftest/jpeg/red-bad-marker.jpg differ diff --git a/image/test/reftest/jpeg/red.jpg b/image/test/reftest/jpeg/red.jpg new file mode 100644 index 0000000000..8fca4b938f Binary files /dev/null and b/image/test/reftest/jpeg/red.jpg differ diff --git a/image/test/reftest/jpeg/reftest.list b/image/test/reftest/jpeg/reftest.list new file mode 100644 index 0000000000..d8723b8071 --- /dev/null +++ b/image/test/reftest/jpeg/reftest.list @@ -0,0 +1,73 @@ +# JPEG tests + +# Images of various sizes. +== jpg-size-1x1.jpg jpg-size-1x1.png +== jpg-size-2x2.jpg jpg-size-2x2.png +== jpg-size-3x3.jpg jpg-size-3x3.png +== jpg-size-4x4.jpg jpg-size-4x4.png +== jpg-size-5x5.jpg jpg-size-5x5.png +== jpg-size-6x6.jpg jpg-size-6x6.png +== jpg-size-7x7.jpg jpg-size-7x7.png +== jpg-size-8x8.jpg jpg-size-8x8.png +== jpg-size-9x9.jpg jpg-size-9x9.png +== jpg-size-15x15.jpg jpg-size-15x15.png +== jpg-size-16x16.jpg jpg-size-16x16.png +== jpg-size-17x17.jpg jpg-size-17x17.png +== jpg-size-31x31.jpg jpg-size-31x31.png +== jpg-size-32x32.jpg jpg-size-32x32.png +== jpg-size-33x33.jpg jpg-size-33x33.png +# Progressive encoding +== jpg-progressive.jpg jpg-progressive.png +# Grayscale colorspace +== jpg-gray.jpg jpg-gray.png +# CMYK colorspace +== jpg-cmyk-1.jpg jpg-cmyk-1.png +== jpg-cmyk-2.jpg jpg-cmyk-2.png +# This intermittently fails on Android due to async image decoding (bug #685516) +# Sometimes the image decodes in time and the test passes, other times the image +# appears blank and the test fails. This only seems to be triggered since the +# switch to 24-bit colour (bug #803299). +random-if(Android) == jpg-srgb-icc.jpg jpg-srgb-icc.png + +# webcam-simulacrum.mjpg is a hand-edited file containing red.jpg and blue.jpg, +# concatenated together with the relevant headers for +# multipart/x-mixed-replace. Specifically, with the headers in +# webcam-simulacrum.mjpg^headers^, the web browser will get the following: +# +# HTTP 200 OK +# Content-Type: multipart/x-mixed-replace;boundary=BOUNDARYOMG +# +# --BOUNDARYOMG\r\n +# Content-Type: image/jpeg\r\n +# \r\n +# (no newline) +# --BOUNDARYOMG\r\n +# Content-Type: image/jpeg\r\n +# \r\n +# (no newline) +# --BOUNDARYOMG--\r\n +# +# (The boundary is arbitrary, and just has to be defined as something that +# won't be in the text of the contents themselves. --$(boundary)\r\n means +# "Here is the beginning of a boundary," and --$(boundary)-- means "All done +# sending you parts.") +HTTP == webcam-simulacrum.mjpg blue.jpg +# Same as the above but as img elements in html files to get better test +# coverage of multipart images. +# Images loaded at the top level are actually loaded into an ImageDocument +# which is a slim html document wrapper around the image. +# Multipart images send multiple OnStartRequest's, each OnStartRequest causes +# us to create a new ImageDocument to show the next part. +# This differs from displaying a multipart image in an img element in a regular +# document where we use the same document and same elements and same layout +# frames for each part. So we have this testcase to test those different +# codepaths. +HTTP == webcam-simulacrum.html blue.html + +== non-interleaved_progressive-1.jpg non-interleaved_progressive-1-halfred-ref.png +== non-interleaved_progressive-2.jpg non-interleaved_progressive-2-white-ref.png + +== red-bad-marker.jpg red.jpg + +# check that we reject jpegs with > 1000 scans +== jpg-progressive-1000.html jpg-progressive-1000-ref.html diff --git a/image/test/reftest/jpeg/webcam-simulacrum.html b/image/test/reftest/jpeg/webcam-simulacrum.html new file mode 100644 index 0000000000..2fc6395c7a --- /dev/null +++ b/image/test/reftest/jpeg/webcam-simulacrum.html @@ -0,0 +1 @@ + diff --git a/image/test/reftest/jpeg/webcam-simulacrum.mjpg b/image/test/reftest/jpeg/webcam-simulacrum.mjpg new file mode 100644 index 0000000000..a593273c0e Binary files /dev/null and b/image/test/reftest/jpeg/webcam-simulacrum.mjpg differ diff --git a/image/test/reftest/jpeg/webcam-simulacrum.mjpg^headers^ b/image/test/reftest/jpeg/webcam-simulacrum.mjpg^headers^ new file mode 100644 index 0000000000..f5e846508e --- /dev/null +++ b/image/test/reftest/jpeg/webcam-simulacrum.mjpg^headers^ @@ -0,0 +1,3 @@ +HTTP 200 OK +Content-Type: multipart/x-mixed-replace;boundary=BOUNDARYOMG +Cache-Control: no-cache diff --git a/image/test/reftest/jxl/jxl-size-33x33.jxl b/image/test/reftest/jxl/jxl-size-33x33.jxl new file mode 100644 index 0000000000..da7c1c76f1 Binary files /dev/null and b/image/test/reftest/jxl/jxl-size-33x33.jxl differ diff --git a/image/test/reftest/jxl/jxl-size-33x33.png b/image/test/reftest/jxl/jxl-size-33x33.png new file mode 100644 index 0000000000..72ef7eb636 Binary files /dev/null and b/image/test/reftest/jxl/jxl-size-33x33.png differ diff --git a/image/test/reftest/jxl/reftest.list b/image/test/reftest/jxl/reftest.list new file mode 100644 index 0000000000..04819b5543 --- /dev/null +++ b/image/test/reftest/jxl/reftest.list @@ -0,0 +1,3 @@ +# JXL tests + +pref(image.jxl.enabled,true) == jxl-size-33x33.jxl jxl-size-33x33.png diff --git a/image/test/reftest/pngsuite-ancillary/ccwn2c08.html b/image/test/reftest/pngsuite-ancillary/ccwn2c08.html new file mode 100644 index 0000000000..dc4996e2b0 --- /dev/null +++ b/image/test/reftest/pngsuite-ancillary/ccwn2c08.html @@ -0,0 +1,1242 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-ancillary/ccwn2c08.png b/image/test/reftest/pngsuite-ancillary/ccwn2c08.png new file mode 100644 index 0000000000..47c24817b7 Binary files /dev/null and b/image/test/reftest/pngsuite-ancillary/ccwn2c08.png differ diff --git a/image/test/reftest/pngsuite-ancillary/ccwn3p08.html b/image/test/reftest/pngsuite-ancillary/ccwn3p08.html new file mode 100644 index 0000000000..52e636eaad --- /dev/null +++ b/image/test/reftest/pngsuite-ancillary/ccwn3p08.html @@ -0,0 +1,1272 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-ancillary/ccwn3p08.png b/image/test/reftest/pngsuite-ancillary/ccwn3p08.png new file mode 100644 index 0000000000..8bb2c10981 Binary files /dev/null and b/image/test/reftest/pngsuite-ancillary/ccwn3p08.png differ diff --git a/image/test/reftest/pngsuite-ancillary/cdfn2c08.html b/image/test/reftest/pngsuite-ancillary/cdfn2c08.html new file mode 100644 index 0000000000..aaae670ec4 --- /dev/null +++ b/image/test/reftest/pngsuite-ancillary/cdfn2c08.html @@ -0,0 +1,326 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-ancillary/cdfn2c08.png b/image/test/reftest/pngsuite-ancillary/cdfn2c08.png new file mode 100644 index 0000000000..559e5261e7 Binary files /dev/null and b/image/test/reftest/pngsuite-ancillary/cdfn2c08.png differ diff --git a/image/test/reftest/pngsuite-ancillary/cdhn2c08.html b/image/test/reftest/pngsuite-ancillary/cdhn2c08.html new file mode 100644 index 0000000000..d56ebf2e1b --- /dev/null +++ b/image/test/reftest/pngsuite-ancillary/cdhn2c08.html @@ -0,0 +1,278 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-ancillary/cdhn2c08.png b/image/test/reftest/pngsuite-ancillary/cdhn2c08.png new file mode 100644 index 0000000000..3e07e8ecbd Binary files /dev/null and b/image/test/reftest/pngsuite-ancillary/cdhn2c08.png differ diff --git a/image/test/reftest/pngsuite-ancillary/cdsn2c08.html b/image/test/reftest/pngsuite-ancillary/cdsn2c08.html new file mode 100644 index 0000000000..3ba83a6f5a --- /dev/null +++ b/image/test/reftest/pngsuite-ancillary/cdsn2c08.html @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-ancillary/cdsn2c08.png b/image/test/reftest/pngsuite-ancillary/cdsn2c08.png new file mode 100644 index 0000000000..076c32cc08 Binary files /dev/null and b/image/test/reftest/pngsuite-ancillary/cdsn2c08.png differ diff --git a/image/test/reftest/pngsuite-ancillary/cdun2c08.html b/image/test/reftest/pngsuite-ancillary/cdun2c08.html new file mode 100644 index 0000000000..b782337185 --- /dev/null +++ b/image/test/reftest/pngsuite-ancillary/cdun2c08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-ancillary/cdun2c08.png b/image/test/reftest/pngsuite-ancillary/cdun2c08.png new file mode 100644 index 0000000000..846033be6b Binary files /dev/null and b/image/test/reftest/pngsuite-ancillary/cdun2c08.png differ diff --git a/image/test/reftest/pngsuite-ancillary/ch1n3p04.html b/image/test/reftest/pngsuite-ancillary/ch1n3p04.html new file mode 100644 index 0000000000..dc2a121de2 --- /dev/null +++ b/image/test/reftest/pngsuite-ancillary/ch1n3p04.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-ancillary/ch1n3p04.png b/image/test/reftest/pngsuite-ancillary/ch1n3p04.png new file mode 100644 index 0000000000..17cd12dfc9 Binary files /dev/null and b/image/test/reftest/pngsuite-ancillary/ch1n3p04.png differ diff --git a/image/test/reftest/pngsuite-ancillary/ch2n3p08.html b/image/test/reftest/pngsuite-ancillary/ch2n3p08.html new file mode 100644 index 0000000000..78b72c61c6 --- /dev/null +++ b/image/test/reftest/pngsuite-ancillary/ch2n3p08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-ancillary/ch2n3p08.png b/image/test/reftest/pngsuite-ancillary/ch2n3p08.png new file mode 100644 index 0000000000..25c17987a7 Binary files /dev/null and b/image/test/reftest/pngsuite-ancillary/ch2n3p08.png differ diff --git a/image/test/reftest/pngsuite-ancillary/cm0n0g04.html b/image/test/reftest/pngsuite-ancillary/cm0n0g04.html new file mode 100644 index 0000000000..25d3abca33 --- /dev/null +++ b/image/test/reftest/pngsuite-ancillary/cm0n0g04.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-ancillary/cm0n0g04.png b/image/test/reftest/pngsuite-ancillary/cm0n0g04.png new file mode 100644 index 0000000000..9fba5db3b8 Binary files /dev/null and b/image/test/reftest/pngsuite-ancillary/cm0n0g04.png differ diff --git a/image/test/reftest/pngsuite-ancillary/cm7n0g04.html b/image/test/reftest/pngsuite-ancillary/cm7n0g04.html new file mode 100644 index 0000000000..25d3abca33 --- /dev/null +++ b/image/test/reftest/pngsuite-ancillary/cm7n0g04.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-ancillary/cm7n0g04.png b/image/test/reftest/pngsuite-ancillary/cm7n0g04.png new file mode 100644 index 0000000000..f7dc46e685 Binary files /dev/null and b/image/test/reftest/pngsuite-ancillary/cm7n0g04.png differ diff --git a/image/test/reftest/pngsuite-ancillary/cm9n0g04.html b/image/test/reftest/pngsuite-ancillary/cm9n0g04.html new file mode 100644 index 0000000000..25d3abca33 --- /dev/null +++ b/image/test/reftest/pngsuite-ancillary/cm9n0g04.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-ancillary/cm9n0g04.png b/image/test/reftest/pngsuite-ancillary/cm9n0g04.png new file mode 100644 index 0000000000..dd70911adc Binary files /dev/null and b/image/test/reftest/pngsuite-ancillary/cm9n0g04.png differ diff --git a/image/test/reftest/pngsuite-ancillary/cs3n2c16.html b/image/test/reftest/pngsuite-ancillary/cs3n2c16.html new file mode 100644 index 0000000000..bc4ab1488f --- /dev/null +++ b/image/test/reftest/pngsuite-ancillary/cs3n2c16.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-ancillary/cs3n2c16.png b/image/test/reftest/pngsuite-ancillary/cs3n2c16.png new file mode 100644 index 0000000000..bf5fd20a20 Binary files /dev/null and b/image/test/reftest/pngsuite-ancillary/cs3n2c16.png differ diff --git a/image/test/reftest/pngsuite-ancillary/cs3n3p08.html b/image/test/reftest/pngsuite-ancillary/cs3n3p08.html new file mode 100644 index 0000000000..21557a4004 --- /dev/null +++ b/image/test/reftest/pngsuite-ancillary/cs3n3p08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-ancillary/cs3n3p08.png b/image/test/reftest/pngsuite-ancillary/cs3n3p08.png new file mode 100644 index 0000000000..f4a66237bf Binary files /dev/null and b/image/test/reftest/pngsuite-ancillary/cs3n3p08.png differ diff --git a/image/test/reftest/pngsuite-ancillary/cs5n2c08.html b/image/test/reftest/pngsuite-ancillary/cs5n2c08.html new file mode 100644 index 0000000000..d1642a1bf5 --- /dev/null +++ b/image/test/reftest/pngsuite-ancillary/cs5n2c08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-ancillary/cs5n2c08.png b/image/test/reftest/pngsuite-ancillary/cs5n2c08.png new file mode 100644 index 0000000000..40f947c33e Binary files /dev/null and b/image/test/reftest/pngsuite-ancillary/cs5n2c08.png differ diff --git a/image/test/reftest/pngsuite-ancillary/cs5n3p08.html b/image/test/reftest/pngsuite-ancillary/cs5n3p08.html new file mode 100644 index 0000000000..d1642a1bf5 --- /dev/null +++ b/image/test/reftest/pngsuite-ancillary/cs5n3p08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-ancillary/cs5n3p08.png b/image/test/reftest/pngsuite-ancillary/cs5n3p08.png new file mode 100644 index 0000000000..dfd6e6e6ec Binary files /dev/null and b/image/test/reftest/pngsuite-ancillary/cs5n3p08.png differ diff --git a/image/test/reftest/pngsuite-ancillary/cs8n2c08.html b/image/test/reftest/pngsuite-ancillary/cs8n2c08.html new file mode 100644 index 0000000000..549341e76c --- /dev/null +++ b/image/test/reftest/pngsuite-ancillary/cs8n2c08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-ancillary/cs8n2c08.png b/image/test/reftest/pngsuite-ancillary/cs8n2c08.png new file mode 100644 index 0000000000..8e01d3294f Binary files /dev/null and b/image/test/reftest/pngsuite-ancillary/cs8n2c08.png differ diff --git a/image/test/reftest/pngsuite-ancillary/cs8n3p08.html b/image/test/reftest/pngsuite-ancillary/cs8n3p08.html new file mode 100644 index 0000000000..549341e76c --- /dev/null +++ b/image/test/reftest/pngsuite-ancillary/cs8n3p08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-ancillary/cs8n3p08.png b/image/test/reftest/pngsuite-ancillary/cs8n3p08.png new file mode 100644 index 0000000000..a44066eb6e Binary files /dev/null and b/image/test/reftest/pngsuite-ancillary/cs8n3p08.png differ diff --git a/image/test/reftest/pngsuite-ancillary/ct0n0g04.html b/image/test/reftest/pngsuite-ancillary/ct0n0g04.html new file mode 100644 index 0000000000..25d3abca33 --- /dev/null +++ b/image/test/reftest/pngsuite-ancillary/ct0n0g04.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-ancillary/ct0n0g04.png b/image/test/reftest/pngsuite-ancillary/ct0n0g04.png new file mode 100644 index 0000000000..40d1e062f8 Binary files /dev/null and b/image/test/reftest/pngsuite-ancillary/ct0n0g04.png differ diff --git a/image/test/reftest/pngsuite-ancillary/ct1n0g04.html b/image/test/reftest/pngsuite-ancillary/ct1n0g04.html new file mode 100644 index 0000000000..25d3abca33 --- /dev/null +++ b/image/test/reftest/pngsuite-ancillary/ct1n0g04.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-ancillary/ct1n0g04.png b/image/test/reftest/pngsuite-ancillary/ct1n0g04.png new file mode 100644 index 0000000000..3ba110aa76 Binary files /dev/null and b/image/test/reftest/pngsuite-ancillary/ct1n0g04.png differ diff --git a/image/test/reftest/pngsuite-ancillary/ctzn0g04.html b/image/test/reftest/pngsuite-ancillary/ctzn0g04.html new file mode 100644 index 0000000000..25d3abca33 --- /dev/null +++ b/image/test/reftest/pngsuite-ancillary/ctzn0g04.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-ancillary/ctzn0g04.png b/image/test/reftest/pngsuite-ancillary/ctzn0g04.png new file mode 100644 index 0000000000..b4401c9cfc Binary files /dev/null and b/image/test/reftest/pngsuite-ancillary/ctzn0g04.png differ diff --git a/image/test/reftest/pngsuite-ancillary/qcms-asm-check.js b/image/test/reftest/pngsuite-ancillary/qcms-asm-check.js new file mode 100644 index 0000000000..32e4434aa7 --- /dev/null +++ b/image/test/reftest/pngsuite-ancillary/qcms-asm-check.js @@ -0,0 +1,28 @@ +// This is a workaround for bug 465088, that the qcms assembly doesn't +// quite match the non-assembly output. + +function check_qcms_has_assembly() +{ + // We have assembly code on x86 and x86_64 architectures. + // Unfortunately, detecting that is a little complicated. + + if (navigator.platform == "MacIntel") { + return true; + } + + if (navigator.platform.indexOf("Win") == 0 || navigator.platform == "OS/2") { + // Assume all Windows and OS/2 is x86 or x86_64. We don't + // expose any way for Web content to check. + return true; + } + + // On most Unix-like platforms, navigator.platform is basically + // |uname -sm|. + if (navigator.platform.match(/(i[3456]86|x86_64|amd64|i86)/)) { + return true; + } + + return false; +} + +var qcms_has_assembly = check_qcms_has_assembly(); diff --git a/image/test/reftest/pngsuite-ancillary/reftest.list b/image/test/reftest/pngsuite-ancillary/reftest.list new file mode 100644 index 0000000000..b5608716cc --- /dev/null +++ b/image/test/reftest/pngsuite-ancillary/reftest.list @@ -0,0 +1,62 @@ +# PngSuite - Ancillary chunks + +# cHRM chunks +# +# ccwn2c08 - gamma 1.0000 chunk, chroma chunk w:0.3127,0.3290 r:0.64,0.33 g:0.30,0.60 b:0.15,0.06 +fuzzy-if(appleSilicon,1-1,12-12) fuzzy-if(winWidget,0-8,0-569) fuzzy-if(Android,0-1,0-6) == ccwn2c08.png ccwn2c08.html +# ccwn3p08 - gamma 1.0000 chunk, chroma chunk w:0.3127,0.3290 r:0.64,0.33 g:0.30,0.60 b:0.15,0.06 +fuzzy-if(appleSilicon,1-1,4-4) fuzzy-if(winWidget,0-8,0-577) fuzzy-if(Android,0-1,0-19) == ccwn3p08.png ccwn3p08.html + +# pHYs chunks +# +# PngSuite implies these first 3 should end up as 32x32 bitmaps, but +# per discussion in bug 408622 that's not actually true. +# +# cdfn2c08 - physical pixel dimensions, 8x32 flat pixels +== cdfn2c08.png cdfn2c08.html +# cdhn2c08 - physical pixel dimensions, 32x8 high pixels +== cdhn2c08.png cdhn2c08.html +# cdsn2c08 - physical pixel dimensions, 8x8 square pixels +== cdsn2c08.png cdsn2c08.html +# cdun2c08 - physical pixel dimensions, 1000 pixels per 1 meter +== cdun2c08.png cdun2c08.html + +# hISt chunks (shouldn't affect display on 24bit systems) +# +# ch1n3p04 - histogram 15 colors +== ch1n3p04.png ch1n3p04.html +# ch2n3p08 - histogram 256 colors +== ch2n3p08.png ch2n3p08.html + +# tIME chunks (doesn't affect display) +# +# cm0n0g04 - modification time, 01-jan-2000 12:34:56 +== cm0n0g04.png cm0n0g04.html +# cm7n0g04 - modification time, 01-jan-1970 00:00:00 +== cm7n0g04.png cm7n0g04.html +# cm9n0g04 - modification time, 31-dec-1999 23:59:59 +== cm9n0g04.png cm9n0g04.html + +# sBIT chunks +# +# cs3n2c16 - color, 13 significant bits +== cs3n2c16.png cs3n2c16.html +# cs3n3p08 - paletted, 3 significant bits +== cs3n3p08.png cs3n3p08.html +# cs5n2c08 - color, 5 significant bits +== cs5n2c08.png cs5n2c08.html +# cs5n3p08 - paletted, 5 significant bits +== cs5n3p08.png cs5n3p08.html +# cs8n2c08 - color, 8 significant bits (reference) +== cs8n2c08.png cs8n2c08.html +# cs8n3p08 - paletted, 8 significant bits (reference) +== cs8n3p08.png cs8n3p08.html + +# tEXt chunks (doesn't affect display) +# +# ct0n0g04 - no textual data +== ct0n0g04.png ct0n0g04.html +# ct1n0g04 - with textual data +== ct1n0g04.png ct1n0g04.html +# ctzn0g04 - with compressed textual data +== ctzn0g04.png ctzn0g04.html diff --git a/image/test/reftest/pngsuite-background/bg__4a08.html b/image/test/reftest/pngsuite-background/bg__4a08.html new file mode 100644 index 0000000000..743ad1200a --- /dev/null +++ b/image/test/reftest/pngsuite-background/bg__4a08.html @@ -0,0 +1,1092 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-background/bg__4a16.html b/image/test/reftest/pngsuite-background/bg__4a16.html new file mode 100644 index 0000000000..b15b280f1c --- /dev/null +++ b/image/test/reftest/pngsuite-background/bg__4a16.html @@ -0,0 +1,1092 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-background/bg__6a08.html b/image/test/reftest/pngsuite-background/bg__6a08.html new file mode 100644 index 0000000000..1ab2721f31 --- /dev/null +++ b/image/test/reftest/pngsuite-background/bg__6a08.html @@ -0,0 +1,1092 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-background/bg__6a16.html b/image/test/reftest/pngsuite-background/bg__6a16.html new file mode 100644 index 0000000000..8ead05a34f --- /dev/null +++ b/image/test/reftest/pngsuite-background/bg__6a16.html @@ -0,0 +1,1092 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-background/bgai4a08.png b/image/test/reftest/pngsuite-background/bgai4a08.png new file mode 100644 index 0000000000..398132be5f Binary files /dev/null and b/image/test/reftest/pngsuite-background/bgai4a08.png differ diff --git a/image/test/reftest/pngsuite-background/bgai4a16.png b/image/test/reftest/pngsuite-background/bgai4a16.png new file mode 100644 index 0000000000..51192e7311 Binary files /dev/null and b/image/test/reftest/pngsuite-background/bgai4a16.png differ diff --git a/image/test/reftest/pngsuite-background/bgan6a08.png b/image/test/reftest/pngsuite-background/bgan6a08.png new file mode 100644 index 0000000000..e608738763 Binary files /dev/null and b/image/test/reftest/pngsuite-background/bgan6a08.png differ diff --git a/image/test/reftest/pngsuite-background/bgan6a16.png b/image/test/reftest/pngsuite-background/bgan6a16.png new file mode 100644 index 0000000000..984a99525f Binary files /dev/null and b/image/test/reftest/pngsuite-background/bgan6a16.png differ diff --git a/image/test/reftest/pngsuite-background/bgbn4a08.png b/image/test/reftest/pngsuite-background/bgbn4a08.png new file mode 100644 index 0000000000..7cbefc3bff Binary files /dev/null and b/image/test/reftest/pngsuite-background/bgbn4a08.png differ diff --git a/image/test/reftest/pngsuite-background/bggn4a16.png b/image/test/reftest/pngsuite-background/bggn4a16.png new file mode 100644 index 0000000000..13fd85ba19 Binary files /dev/null and b/image/test/reftest/pngsuite-background/bggn4a16.png differ diff --git a/image/test/reftest/pngsuite-background/bgwn6a08.png b/image/test/reftest/pngsuite-background/bgwn6a08.png new file mode 100644 index 0000000000..a67ff205bb Binary files /dev/null and b/image/test/reftest/pngsuite-background/bgwn6a08.png differ diff --git a/image/test/reftest/pngsuite-background/bgyn6a16.png b/image/test/reftest/pngsuite-background/bgyn6a16.png new file mode 100644 index 0000000000..ae3e9be58a Binary files /dev/null and b/image/test/reftest/pngsuite-background/bgyn6a16.png differ diff --git a/image/test/reftest/pngsuite-background/reftest.list b/image/test/reftest/pngsuite-background/reftest.list new file mode 100644 index 0000000000..1b6c514de1 --- /dev/null +++ b/image/test/reftest/pngsuite-background/reftest.list @@ -0,0 +1,22 @@ +# PngSuite - Background colors +# +# Note 1: The first 4 images have no bKGD chunk, the last 4 do. The background +# color indicated by bKGD isn't used, so the two sets of images are rendered +# identically and thus share common reference HTML files. + +# bgai4a08 - 8 bit grayscale, alpha, no background chunk, interlaced +fuzzy(0-2,0-1024) == wrapper.html?bgai4a08.png bg__4a08.html +# bgai4a16 - 16 bit grayscale, alpha, no background chunk, interlaced +fuzzy(0-2,0-1024) == wrapper.html?bgai4a16.png bg__4a16.html +# bgan6a08 - 3x8 bits rgb color, alpha, no background chunk +fuzzy(0-2,0-1024) == wrapper.html?bgan6a08.png bg__6a08.html +# bgan6a16 - 3x16 bits rgb color, alpha, no background chunk +fuzzy(0-2,0-1024) == wrapper.html?bgan6a16.png bg__6a16.html +# bgbn4a08 - 8 bit grayscale, alpha, black background chunk +fuzzy(0-2,0-1024) == wrapper.html?bgbn4a08.png bg__4a08.html +# bggn4a16 - 16 bit grayscale, alpha, gray background chunk +fuzzy(0-2,0-1024) == wrapper.html?bggn4a16.png bg__4a16.html +# bgwn6a08 - 3x8 bits rgb color, alpha, white background chunk +fuzzy(0-2,0-1024) == wrapper.html?bgwn6a08.png bg__6a08.html +# bgyn6a16 - 3x16 bits rgb color, alpha, yellow background chunk +fuzzy(0-2,0-1024) == wrapper.html?bgyn6a16.png bg__6a16.html diff --git a/image/test/reftest/pngsuite-background/wrapper.html b/image/test/reftest/pngsuite-background/wrapper.html new file mode 100644 index 0000000000..45b5167754 --- /dev/null +++ b/image/test/reftest/pngsuite-background/wrapper.html @@ -0,0 +1,28 @@ + + + +Image reftest wrapper + + + + + + + + + + diff --git a/image/test/reftest/pngsuite-basic-i/basi0g01.html b/image/test/reftest/pngsuite-basic-i/basi0g01.html new file mode 100644 index 0000000000..7389a1b66e --- /dev/null +++ b/image/test/reftest/pngsuite-basic-i/basi0g01.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-basic-i/basi0g01.png b/image/test/reftest/pngsuite-basic-i/basi0g01.png new file mode 100644 index 0000000000..556fa72704 Binary files /dev/null and b/image/test/reftest/pngsuite-basic-i/basi0g01.png differ diff --git a/image/test/reftest/pngsuite-basic-i/basi0g02.html b/image/test/reftest/pngsuite-basic-i/basi0g02.html new file mode 100644 index 0000000000..538afad142 --- /dev/null +++ b/image/test/reftest/pngsuite-basic-i/basi0g02.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-basic-i/basi0g02.png b/image/test/reftest/pngsuite-basic-i/basi0g02.png new file mode 100644 index 0000000000..ce09821ef1 Binary files /dev/null and b/image/test/reftest/pngsuite-basic-i/basi0g02.png differ diff --git a/image/test/reftest/pngsuite-basic-i/basi0g04.html b/image/test/reftest/pngsuite-basic-i/basi0g04.html new file mode 100644 index 0000000000..d782230d4b --- /dev/null +++ b/image/test/reftest/pngsuite-basic-i/basi0g04.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-basic-i/basi0g04.png b/image/test/reftest/pngsuite-basic-i/basi0g04.png new file mode 100644 index 0000000000..3853273f93 Binary files /dev/null and b/image/test/reftest/pngsuite-basic-i/basi0g04.png differ diff --git a/image/test/reftest/pngsuite-basic-i/basi0g08.html b/image/test/reftest/pngsuite-basic-i/basi0g08.html new file mode 100644 index 0000000000..5aaf11cabb --- /dev/null +++ b/image/test/reftest/pngsuite-basic-i/basi0g08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-basic-i/basi0g08.png b/image/test/reftest/pngsuite-basic-i/basi0g08.png new file mode 100644 index 0000000000..faed8bec44 Binary files /dev/null and b/image/test/reftest/pngsuite-basic-i/basi0g08.png differ diff --git a/image/test/reftest/pngsuite-basic-i/basi0g16.html b/image/test/reftest/pngsuite-basic-i/basi0g16.html new file mode 100644 index 0000000000..fc18c727be --- /dev/null +++ b/image/test/reftest/pngsuite-basic-i/basi0g16.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-basic-i/basi0g16.png b/image/test/reftest/pngsuite-basic-i/basi0g16.png new file mode 100644 index 0000000000..a9f28165ef Binary files /dev/null and b/image/test/reftest/pngsuite-basic-i/basi0g16.png differ diff --git a/image/test/reftest/pngsuite-basic-i/basi2c08.html b/image/test/reftest/pngsuite-basic-i/basi2c08.html new file mode 100644 index 0000000000..e30216bdf0 --- /dev/null +++ b/image/test/reftest/pngsuite-basic-i/basi2c08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-basic-i/basi2c08.png b/image/test/reftest/pngsuite-basic-i/basi2c08.png new file mode 100644 index 0000000000..2aab44d42b Binary files /dev/null and b/image/test/reftest/pngsuite-basic-i/basi2c08.png differ diff --git a/image/test/reftest/pngsuite-basic-i/basi2c16.html b/image/test/reftest/pngsuite-basic-i/basi2c16.html new file mode 100644 index 0000000000..dd08f0e3d0 --- /dev/null +++ b/image/test/reftest/pngsuite-basic-i/basi2c16.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-basic-i/basi2c16.png b/image/test/reftest/pngsuite-basic-i/basi2c16.png new file mode 100644 index 0000000000..cd7e50f914 Binary files /dev/null and b/image/test/reftest/pngsuite-basic-i/basi2c16.png differ diff --git a/image/test/reftest/pngsuite-basic-i/basi3p01.html b/image/test/reftest/pngsuite-basic-i/basi3p01.html new file mode 100644 index 0000000000..2cb512200a --- /dev/null +++ b/image/test/reftest/pngsuite-basic-i/basi3p01.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-basic-i/basi3p01.png b/image/test/reftest/pngsuite-basic-i/basi3p01.png new file mode 100644 index 0000000000..00a7cea6c2 Binary files /dev/null and b/image/test/reftest/pngsuite-basic-i/basi3p01.png differ diff --git a/image/test/reftest/pngsuite-basic-i/basi3p02.html b/image/test/reftest/pngsuite-basic-i/basi3p02.html new file mode 100644 index 0000000000..4555fbb9b9 --- /dev/null +++ b/image/test/reftest/pngsuite-basic-i/basi3p02.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-basic-i/basi3p02.png b/image/test/reftest/pngsuite-basic-i/basi3p02.png new file mode 100644 index 0000000000..bb16b44b30 Binary files /dev/null and b/image/test/reftest/pngsuite-basic-i/basi3p02.png differ diff --git a/image/test/reftest/pngsuite-basic-i/basi3p04.html b/image/test/reftest/pngsuite-basic-i/basi3p04.html new file mode 100644 index 0000000000..dc2a121de2 --- /dev/null +++ b/image/test/reftest/pngsuite-basic-i/basi3p04.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-basic-i/basi3p04.png b/image/test/reftest/pngsuite-basic-i/basi3p04.png new file mode 100644 index 0000000000..b4e888e247 Binary files /dev/null and b/image/test/reftest/pngsuite-basic-i/basi3p04.png differ diff --git a/image/test/reftest/pngsuite-basic-i/basi3p08.html b/image/test/reftest/pngsuite-basic-i/basi3p08.html new file mode 100644 index 0000000000..78b72c61c6 --- /dev/null +++ b/image/test/reftest/pngsuite-basic-i/basi3p08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-basic-i/basi3p08.png b/image/test/reftest/pngsuite-basic-i/basi3p08.png new file mode 100644 index 0000000000..50a6d1cac7 Binary files /dev/null and b/image/test/reftest/pngsuite-basic-i/basi3p08.png differ diff --git a/image/test/reftest/pngsuite-basic-i/basi4a08.png b/image/test/reftest/pngsuite-basic-i/basi4a08.png new file mode 100644 index 0000000000..398132be5f Binary files /dev/null and b/image/test/reftest/pngsuite-basic-i/basi4a08.png differ diff --git a/image/test/reftest/pngsuite-basic-i/basi4a16.png b/image/test/reftest/pngsuite-basic-i/basi4a16.png new file mode 100644 index 0000000000..51192e7311 Binary files /dev/null and b/image/test/reftest/pngsuite-basic-i/basi4a16.png differ diff --git a/image/test/reftest/pngsuite-basic-i/basi6a08.png b/image/test/reftest/pngsuite-basic-i/basi6a08.png new file mode 100644 index 0000000000..aecb32e0d9 Binary files /dev/null and b/image/test/reftest/pngsuite-basic-i/basi6a08.png differ diff --git a/image/test/reftest/pngsuite-basic-i/basi6a16.png b/image/test/reftest/pngsuite-basic-i/basi6a16.png new file mode 100644 index 0000000000..4181533ad8 Binary files /dev/null and b/image/test/reftest/pngsuite-basic-i/basi6a16.png differ diff --git a/image/test/reftest/pngsuite-basic-i/reftest.list b/image/test/reftest/pngsuite-basic-i/reftest.list new file mode 100644 index 0000000000..bc61af89d8 --- /dev/null +++ b/image/test/reftest/pngsuite-basic-i/reftest.list @@ -0,0 +1,33 @@ +# PngSuite - Basic formats (interlaced) + + +# basi0g01 - black & white +== basi0g01.png basi0g01.html +# basi0g02 - 2 bit (4 level) grayscale +== basi0g02.png basi0g02.html +# basi0g04 - 4 bit (16 level) grayscale +== basi0g04.png basi0g04.html +# basi0g08 - 8 bit (256 level) grayscale +== basi0g08.png basi0g08.html +# basi0g16 - 16 bit (64k level) grayscale +== basi0g16.png basi0g16.html +# basi2c08 - 3x8 bits rgb color +== basi2c08.png basi2c08.html +# basi2c16 - 3x16 bits rgb color +== basi2c16.png basi2c16.html +# basi3p01 - 1 bit (2 color) paletted +== basi3p01.png basi3p01.html +# basi3p02 - 2 bit (4 color) paletted +== basi3p02.png basi3p02.html +# basi3p04 - 4 bit (16 color) paletted +== basi3p04.png basi3p04.html +# basi3p08 - 8 bit (256 color) paletted +== basi3p08.png basi3p08.html +# basi4a08 - 8 bit grayscale + 8 bit alpha-channel +#== basi4a08.png basi4a08.html +# basi4a16 - 16 bit grayscale + 16 bit alpha-channel +#== basi4a16.png basi4a16.html +# basi6a08 - 3x8 bits rgb color + 8 bit alpha-channel +#== basi6a08.png basi6a08.html +# basi6a16 - 3x16 bits rgb color + 16 bit alpha-channel +#== basi6a16.png basi6a16.html diff --git a/image/test/reftest/pngsuite-basic-n/basn0g01.html b/image/test/reftest/pngsuite-basic-n/basn0g01.html new file mode 100644 index 0000000000..7389a1b66e --- /dev/null +++ b/image/test/reftest/pngsuite-basic-n/basn0g01.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-basic-n/basn0g01.png b/image/test/reftest/pngsuite-basic-n/basn0g01.png new file mode 100644 index 0000000000..1d722423aa Binary files /dev/null and b/image/test/reftest/pngsuite-basic-n/basn0g01.png differ diff --git a/image/test/reftest/pngsuite-basic-n/basn0g02.html b/image/test/reftest/pngsuite-basic-n/basn0g02.html new file mode 100644 index 0000000000..538afad142 --- /dev/null +++ b/image/test/reftest/pngsuite-basic-n/basn0g02.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-basic-n/basn0g02.png b/image/test/reftest/pngsuite-basic-n/basn0g02.png new file mode 100644 index 0000000000..508332418f Binary files /dev/null and b/image/test/reftest/pngsuite-basic-n/basn0g02.png differ diff --git a/image/test/reftest/pngsuite-basic-n/basn0g04.html b/image/test/reftest/pngsuite-basic-n/basn0g04.html new file mode 100644 index 0000000000..d782230d4b --- /dev/null +++ b/image/test/reftest/pngsuite-basic-n/basn0g04.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-basic-n/basn0g04.png b/image/test/reftest/pngsuite-basic-n/basn0g04.png new file mode 100644 index 0000000000..0bf3687863 Binary files /dev/null and b/image/test/reftest/pngsuite-basic-n/basn0g04.png differ diff --git a/image/test/reftest/pngsuite-basic-n/basn0g08.html b/image/test/reftest/pngsuite-basic-n/basn0g08.html new file mode 100644 index 0000000000..5aaf11cabb --- /dev/null +++ b/image/test/reftest/pngsuite-basic-n/basn0g08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-basic-n/basn0g08.png b/image/test/reftest/pngsuite-basic-n/basn0g08.png new file mode 100644 index 0000000000..23c82379a2 Binary files /dev/null and b/image/test/reftest/pngsuite-basic-n/basn0g08.png differ diff --git a/image/test/reftest/pngsuite-basic-n/basn0g16.html b/image/test/reftest/pngsuite-basic-n/basn0g16.html new file mode 100644 index 0000000000..fc18c727be --- /dev/null +++ b/image/test/reftest/pngsuite-basic-n/basn0g16.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-basic-n/basn0g16.png b/image/test/reftest/pngsuite-basic-n/basn0g16.png new file mode 100644 index 0000000000..e7c82f78eb Binary files /dev/null and b/image/test/reftest/pngsuite-basic-n/basn0g16.png differ diff --git a/image/test/reftest/pngsuite-basic-n/basn2c08.html b/image/test/reftest/pngsuite-basic-n/basn2c08.html new file mode 100644 index 0000000000..e30216bdf0 --- /dev/null +++ b/image/test/reftest/pngsuite-basic-n/basn2c08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-basic-n/basn2c08.png b/image/test/reftest/pngsuite-basic-n/basn2c08.png new file mode 100644 index 0000000000..db5ad15865 Binary files /dev/null and b/image/test/reftest/pngsuite-basic-n/basn2c08.png differ diff --git a/image/test/reftest/pngsuite-basic-n/basn2c16.html b/image/test/reftest/pngsuite-basic-n/basn2c16.html new file mode 100644 index 0000000000..dd08f0e3d0 --- /dev/null +++ b/image/test/reftest/pngsuite-basic-n/basn2c16.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-basic-n/basn2c16.png b/image/test/reftest/pngsuite-basic-n/basn2c16.png new file mode 100644 index 0000000000..50c1cb91a0 Binary files /dev/null and b/image/test/reftest/pngsuite-basic-n/basn2c16.png differ diff --git a/image/test/reftest/pngsuite-basic-n/basn3p01.html b/image/test/reftest/pngsuite-basic-n/basn3p01.html new file mode 100644 index 0000000000..2cb512200a --- /dev/null +++ b/image/test/reftest/pngsuite-basic-n/basn3p01.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-basic-n/basn3p01.png b/image/test/reftest/pngsuite-basic-n/basn3p01.png new file mode 100644 index 0000000000..b145c2b8ef Binary files /dev/null and b/image/test/reftest/pngsuite-basic-n/basn3p01.png differ diff --git a/image/test/reftest/pngsuite-basic-n/basn3p02.html b/image/test/reftest/pngsuite-basic-n/basn3p02.html new file mode 100644 index 0000000000..4555fbb9b9 --- /dev/null +++ b/image/test/reftest/pngsuite-basic-n/basn3p02.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-basic-n/basn3p02.png b/image/test/reftest/pngsuite-basic-n/basn3p02.png new file mode 100644 index 0000000000..8985b3d818 Binary files /dev/null and b/image/test/reftest/pngsuite-basic-n/basn3p02.png differ diff --git a/image/test/reftest/pngsuite-basic-n/basn3p04.html b/image/test/reftest/pngsuite-basic-n/basn3p04.html new file mode 100644 index 0000000000..dc2a121de2 --- /dev/null +++ b/image/test/reftest/pngsuite-basic-n/basn3p04.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-basic-n/basn3p04.png b/image/test/reftest/pngsuite-basic-n/basn3p04.png new file mode 100644 index 0000000000..0fbf9e827b Binary files /dev/null and b/image/test/reftest/pngsuite-basic-n/basn3p04.png differ diff --git a/image/test/reftest/pngsuite-basic-n/basn3p08.html b/image/test/reftest/pngsuite-basic-n/basn3p08.html new file mode 100644 index 0000000000..78b72c61c6 --- /dev/null +++ b/image/test/reftest/pngsuite-basic-n/basn3p08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-basic-n/basn3p08.png b/image/test/reftest/pngsuite-basic-n/basn3p08.png new file mode 100644 index 0000000000..0ddad07e5f Binary files /dev/null and b/image/test/reftest/pngsuite-basic-n/basn3p08.png differ diff --git a/image/test/reftest/pngsuite-basic-n/basn4a08.png b/image/test/reftest/pngsuite-basic-n/basn4a08.png new file mode 100644 index 0000000000..3e13052201 Binary files /dev/null and b/image/test/reftest/pngsuite-basic-n/basn4a08.png differ diff --git a/image/test/reftest/pngsuite-basic-n/basn4a16.png b/image/test/reftest/pngsuite-basic-n/basn4a16.png new file mode 100644 index 0000000000..8243644d07 Binary files /dev/null and b/image/test/reftest/pngsuite-basic-n/basn4a16.png differ diff --git a/image/test/reftest/pngsuite-basic-n/basn6a08.png b/image/test/reftest/pngsuite-basic-n/basn6a08.png new file mode 100644 index 0000000000..e608738763 Binary files /dev/null and b/image/test/reftest/pngsuite-basic-n/basn6a08.png differ diff --git a/image/test/reftest/pngsuite-basic-n/basn6a16.png b/image/test/reftest/pngsuite-basic-n/basn6a16.png new file mode 100644 index 0000000000..984a99525f Binary files /dev/null and b/image/test/reftest/pngsuite-basic-n/basn6a16.png differ diff --git a/image/test/reftest/pngsuite-basic-n/reftest.list b/image/test/reftest/pngsuite-basic-n/reftest.list new file mode 100644 index 0000000000..c59a5a7e47 --- /dev/null +++ b/image/test/reftest/pngsuite-basic-n/reftest.list @@ -0,0 +1,33 @@ +# PngSuite - Basic formats (non-interlaced) + + +# basn0g01 - black & white +== basn0g01.png basn0g01.html +# basn0g02 - 2 bit (4 level) grayscale +== basn0g02.png basn0g02.html +# basn0g04 - 4 bit (16 level) grayscale +== basn0g04.png basn0g04.html +# basn0g08 - 8 bit (256 level) grayscale +== basn0g08.png basn0g08.html +# basn0g16 - 16 bit (64k level) grayscale +== basn0g16.png basn0g16.html +# basn2c08 - 3x8 bits rgb color +== basn2c08.png basn2c08.html +# basn2c16 - 3x16 bits rgb color +== basn2c16.png basn2c16.html +# basn3p01 - 1 bit (2 color) paletted +== basn3p01.png basn3p01.html +# basn3p02 - 2 bit (4 color) paletted +== basn3p02.png basn3p02.html +# basn3p04 - 4 bit (16 color) paletted +== basn3p04.png basn3p04.html +# basn3p08 - 8 bit (256 color) paletted +== basn3p08.png basn3p08.html +# basn4a08 - 8 bit grayscale + 8 bit alpha-channel +#== basn4a08.png basn4a08.html +# basn4a16 - 16 bit grayscale + 16 bit alpha-channel +#== basn4a16.png basn4a16.html +# basn6a08 - 3x8 bits rgb color + 8 bit alpha-channel +#== basn6a08.png basn6a08.html +# basn6a16 - 3x16 bits rgb color + 16 bit alpha-channel +#== basn6a16.png basn6a16.html diff --git a/image/test/reftest/pngsuite-chunkorder/color.html b/image/test/reftest/pngsuite-chunkorder/color.html new file mode 100644 index 0000000000..dd08f0e3d0 --- /dev/null +++ b/image/test/reftest/pngsuite-chunkorder/color.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-chunkorder/grayscale.html b/image/test/reftest/pngsuite-chunkorder/grayscale.html new file mode 100644 index 0000000000..fc18c727be --- /dev/null +++ b/image/test/reftest/pngsuite-chunkorder/grayscale.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-chunkorder/oi1n0g16.png b/image/test/reftest/pngsuite-chunkorder/oi1n0g16.png new file mode 100644 index 0000000000..e7c82f78eb Binary files /dev/null and b/image/test/reftest/pngsuite-chunkorder/oi1n0g16.png differ diff --git a/image/test/reftest/pngsuite-chunkorder/oi1n2c16.png b/image/test/reftest/pngsuite-chunkorder/oi1n2c16.png new file mode 100644 index 0000000000..50c1cb91a0 Binary files /dev/null and b/image/test/reftest/pngsuite-chunkorder/oi1n2c16.png differ diff --git a/image/test/reftest/pngsuite-chunkorder/oi2n0g16.png b/image/test/reftest/pngsuite-chunkorder/oi2n0g16.png new file mode 100644 index 0000000000..14d64c583d Binary files /dev/null and b/image/test/reftest/pngsuite-chunkorder/oi2n0g16.png differ diff --git a/image/test/reftest/pngsuite-chunkorder/oi2n2c16.png b/image/test/reftest/pngsuite-chunkorder/oi2n2c16.png new file mode 100644 index 0000000000..4c2e3e3352 Binary files /dev/null and b/image/test/reftest/pngsuite-chunkorder/oi2n2c16.png differ diff --git a/image/test/reftest/pngsuite-chunkorder/oi4n0g16.png b/image/test/reftest/pngsuite-chunkorder/oi4n0g16.png new file mode 100644 index 0000000000..69e73ede31 Binary files /dev/null and b/image/test/reftest/pngsuite-chunkorder/oi4n0g16.png differ diff --git a/image/test/reftest/pngsuite-chunkorder/oi4n2c16.png b/image/test/reftest/pngsuite-chunkorder/oi4n2c16.png new file mode 100644 index 0000000000..93691e373a Binary files /dev/null and b/image/test/reftest/pngsuite-chunkorder/oi4n2c16.png differ diff --git a/image/test/reftest/pngsuite-chunkorder/oi9n0g16.png b/image/test/reftest/pngsuite-chunkorder/oi9n0g16.png new file mode 100644 index 0000000000..9248413576 Binary files /dev/null and b/image/test/reftest/pngsuite-chunkorder/oi9n0g16.png differ diff --git a/image/test/reftest/pngsuite-chunkorder/oi9n2c16.png b/image/test/reftest/pngsuite-chunkorder/oi9n2c16.png new file mode 100644 index 0000000000..f0512e49f2 Binary files /dev/null and b/image/test/reftest/pngsuite-chunkorder/oi9n2c16.png differ diff --git a/image/test/reftest/pngsuite-chunkorder/reftest.list b/image/test/reftest/pngsuite-chunkorder/reftest.list new file mode 100644 index 0000000000..2e161d0d39 --- /dev/null +++ b/image/test/reftest/pngsuite-chunkorder/reftest.list @@ -0,0 +1,21 @@ +# PngSuite - Chunk ordering +# +# The resulting images of a type (color or grayscale) should all look the +# same, so they share common HTML reference files. + +# oi1n0g16 - grayscale mother image with 1 idat-chunk +== oi1n0g16.png grayscale.html +# oi1n2c16 - color mother image with 1 idat-chunk +== oi1n2c16.png color.html +# oi2n0g16 - grayscale image with 2 idat-chunks +== oi2n0g16.png grayscale.html +# oi2n2c16 - color image with 2 idat-chunks +== oi2n2c16.png color.html +# oi4n0g16 - grayscale image with 4 unequal sized idat-chunks +== oi4n0g16.png grayscale.html +# oi4n2c16 - color image with 4 unequal sized idat-chunks +== oi4n2c16.png color.html +# oi9n0g16 - grayscale image with all idat-chunks length one +== oi9n0g16.png grayscale.html +# oi9n2c16 - color image with all idat-chunks length one +== oi9n2c16.png color.html diff --git a/image/test/reftest/pngsuite-corrupted/reftest.list b/image/test/reftest/pngsuite-corrupted/reftest.list new file mode 100644 index 0000000000..86c5880f2c --- /dev/null +++ b/image/test/reftest/pngsuite-corrupted/reftest.list @@ -0,0 +1,10 @@ +# PngSuite - Corrupted files +# +# Note: these are corrupt files, and so no image should be rendered. + +# x00n0g01 - empty 0x0 grayscale file +== wrapper.html?x00n0g01.png about:blank +# xcrn0g04 - added cr bytes +== wrapper.html?xcrn0g04.png about:blank +# xlfn0g04 - added lf bytes +== wrapper.html?xlfn0g04.png about:blank diff --git a/image/test/reftest/pngsuite-corrupted/wrapper.html b/image/test/reftest/pngsuite-corrupted/wrapper.html new file mode 100644 index 0000000000..45b5167754 --- /dev/null +++ b/image/test/reftest/pngsuite-corrupted/wrapper.html @@ -0,0 +1,28 @@ + + + +Image reftest wrapper + + + + + + + + + + diff --git a/image/test/reftest/pngsuite-corrupted/x00n0g01.png b/image/test/reftest/pngsuite-corrupted/x00n0g01.png new file mode 100644 index 0000000000..db3a5fda7e Binary files /dev/null and b/image/test/reftest/pngsuite-corrupted/x00n0g01.png differ diff --git a/image/test/reftest/pngsuite-corrupted/xcrn0g04.png b/image/test/reftest/pngsuite-corrupted/xcrn0g04.png new file mode 100644 index 0000000000..5bce9f3ada Binary files /dev/null and b/image/test/reftest/pngsuite-corrupted/xcrn0g04.png differ diff --git a/image/test/reftest/pngsuite-corrupted/xlfn0g04.png b/image/test/reftest/pngsuite-corrupted/xlfn0g04.png new file mode 100644 index 0000000000..1fd104ba61 --- /dev/null +++ b/image/test/reftest/pngsuite-corrupted/xlfn0g04.png @@ -0,0 +1,13 @@ +‰PNG + + + + + +IHDR “áÈ)ÈIDATxœ]ÑÁ +Â0 P*@ð¡#° + +#TâÈ10lPF`Ø F=•ŸÄIQâ*çÅuí”`%qk +Hžñšˆ©ñ´€m÷Íüµàߟ Ñ=,¸fìOK + +ç ÐtŽÀ(Èïä’צíF ;èPº€¯¾{xpç]9‡/p*$(ì*éyìÕƒ ×þÚéçè@÷C¼  cÔqž‹NÛU#„)11·.räðfä0°ägh(¥týÙÂEøÿ‰kIEND®B`‚ \ No newline at end of file diff --git a/image/test/reftest/pngsuite-filtering/f00n0g08.html b/image/test/reftest/pngsuite-filtering/f00n0g08.html new file mode 100644 index 0000000000..3df624891b --- /dev/null +++ b/image/test/reftest/pngsuite-filtering/f00n0g08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-filtering/f00n0g08.png b/image/test/reftest/pngsuite-filtering/f00n0g08.png new file mode 100644 index 0000000000..45a0075967 Binary files /dev/null and b/image/test/reftest/pngsuite-filtering/f00n0g08.png differ diff --git a/image/test/reftest/pngsuite-filtering/f00n2c08.html b/image/test/reftest/pngsuite-filtering/f00n2c08.html new file mode 100644 index 0000000000..2e5f1e1868 --- /dev/null +++ b/image/test/reftest/pngsuite-filtering/f00n2c08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-filtering/f00n2c08.png b/image/test/reftest/pngsuite-filtering/f00n2c08.png new file mode 100644 index 0000000000..d6a1ffff62 Binary files /dev/null and b/image/test/reftest/pngsuite-filtering/f00n2c08.png differ diff --git a/image/test/reftest/pngsuite-filtering/f01n0g08.html b/image/test/reftest/pngsuite-filtering/f01n0g08.html new file mode 100644 index 0000000000..2e056ecb9f --- /dev/null +++ b/image/test/reftest/pngsuite-filtering/f01n0g08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-filtering/f01n0g08.png b/image/test/reftest/pngsuite-filtering/f01n0g08.png new file mode 100644 index 0000000000..4a1107b463 Binary files /dev/null and b/image/test/reftest/pngsuite-filtering/f01n0g08.png differ diff --git a/image/test/reftest/pngsuite-filtering/f01n2c08.html b/image/test/reftest/pngsuite-filtering/f01n2c08.html new file mode 100644 index 0000000000..25c4fe0446 --- /dev/null +++ b/image/test/reftest/pngsuite-filtering/f01n2c08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-filtering/f01n2c08.png b/image/test/reftest/pngsuite-filtering/f01n2c08.png new file mode 100644 index 0000000000..26fee958ce Binary files /dev/null and b/image/test/reftest/pngsuite-filtering/f01n2c08.png differ diff --git a/image/test/reftest/pngsuite-filtering/f02n0g08.html b/image/test/reftest/pngsuite-filtering/f02n0g08.html new file mode 100644 index 0000000000..c9a6263f47 --- /dev/null +++ b/image/test/reftest/pngsuite-filtering/f02n0g08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-filtering/f02n0g08.png b/image/test/reftest/pngsuite-filtering/f02n0g08.png new file mode 100644 index 0000000000..bfe410c5e7 Binary files /dev/null and b/image/test/reftest/pngsuite-filtering/f02n0g08.png differ diff --git a/image/test/reftest/pngsuite-filtering/f02n2c08.html b/image/test/reftest/pngsuite-filtering/f02n2c08.html new file mode 100644 index 0000000000..051691ab99 --- /dev/null +++ b/image/test/reftest/pngsuite-filtering/f02n2c08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-filtering/f02n2c08.png b/image/test/reftest/pngsuite-filtering/f02n2c08.png new file mode 100644 index 0000000000..e590f12348 Binary files /dev/null and b/image/test/reftest/pngsuite-filtering/f02n2c08.png differ diff --git a/image/test/reftest/pngsuite-filtering/f03n0g08.html b/image/test/reftest/pngsuite-filtering/f03n0g08.html new file mode 100644 index 0000000000..f40bbe51b7 --- /dev/null +++ b/image/test/reftest/pngsuite-filtering/f03n0g08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-filtering/f03n0g08.png b/image/test/reftest/pngsuite-filtering/f03n0g08.png new file mode 100644 index 0000000000..ed01e2923c Binary files /dev/null and b/image/test/reftest/pngsuite-filtering/f03n0g08.png differ diff --git a/image/test/reftest/pngsuite-filtering/f03n2c08.html b/image/test/reftest/pngsuite-filtering/f03n2c08.html new file mode 100644 index 0000000000..3d3c85e6cf --- /dev/null +++ b/image/test/reftest/pngsuite-filtering/f03n2c08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-filtering/f03n2c08.png b/image/test/reftest/pngsuite-filtering/f03n2c08.png new file mode 100644 index 0000000000..758115059d Binary files /dev/null and b/image/test/reftest/pngsuite-filtering/f03n2c08.png differ diff --git a/image/test/reftest/pngsuite-filtering/f04n0g08.html b/image/test/reftest/pngsuite-filtering/f04n0g08.html new file mode 100644 index 0000000000..3c7ce550ba --- /dev/null +++ b/image/test/reftest/pngsuite-filtering/f04n0g08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-filtering/f04n0g08.png b/image/test/reftest/pngsuite-filtering/f04n0g08.png new file mode 100644 index 0000000000..663fdae3e7 Binary files /dev/null and b/image/test/reftest/pngsuite-filtering/f04n0g08.png differ diff --git a/image/test/reftest/pngsuite-filtering/f04n2c08.html b/image/test/reftest/pngsuite-filtering/f04n2c08.html new file mode 100644 index 0000000000..77c90face2 --- /dev/null +++ b/image/test/reftest/pngsuite-filtering/f04n2c08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-filtering/f04n2c08.png b/image/test/reftest/pngsuite-filtering/f04n2c08.png new file mode 100644 index 0000000000..3c8b5116e7 Binary files /dev/null and b/image/test/reftest/pngsuite-filtering/f04n2c08.png differ diff --git a/image/test/reftest/pngsuite-filtering/reftest.list b/image/test/reftest/pngsuite-filtering/reftest.list new file mode 100644 index 0000000000..3a39efbbe3 --- /dev/null +++ b/image/test/reftest/pngsuite-filtering/reftest.list @@ -0,0 +1,22 @@ +# PngSuite - Image filtering + +# f00n0g08 - grayscale, no interlacing, filter-type 0 +skip-if(ThreadSanitizer) == f00n0g08.png f00n0g08.html +# f00n2c08 - color, no interlacing, filter-type 0 +== f00n2c08.png f00n2c08.html +# f01n0g08 - grayscale, no interlacing, filter-type 1 +== f01n0g08.png f01n0g08.html +# f01n2c08 - color, no interlacing, filter-type 1 +== f01n2c08.png f01n2c08.html +# f02n0g08 - grayscale, no interlacing, filter-type 2 +== f02n0g08.png f02n0g08.html +# f02n2c08 - color, no interlacing, filter-type 2 +== f02n2c08.png f02n2c08.html +# f03n0g08 - grayscale, no interlacing, filter-type 3 +== f03n0g08.png f03n0g08.html +# f03n2c08 - color, no interlacing, filter-type 3 +== f03n2c08.png f03n2c08.html +# f04n0g08 - grayscale, no interlacing, filter-type 4 +== f04n0g08.png f04n0g08.html +# f04n2c08 - color, no interlacing, filter-type 4 +== f04n2c08.png f04n2c08.html diff --git a/image/test/reftest/pngsuite-gamma/g03n0g16.html b/image/test/reftest/pngsuite-gamma/g03n0g16.html new file mode 100644 index 0000000000..dc15a536b5 --- /dev/null +++ b/image/test/reftest/pngsuite-gamma/g03n0g16.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-gamma/g03n0g16.png b/image/test/reftest/pngsuite-gamma/g03n0g16.png new file mode 100644 index 0000000000..41083ca80f Binary files /dev/null and b/image/test/reftest/pngsuite-gamma/g03n0g16.png differ diff --git a/image/test/reftest/pngsuite-gamma/g03n2c08.html b/image/test/reftest/pngsuite-gamma/g03n2c08.html new file mode 100644 index 0000000000..c2d02beed9 --- /dev/null +++ b/image/test/reftest/pngsuite-gamma/g03n2c08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-gamma/g03n2c08.png b/image/test/reftest/pngsuite-gamma/g03n2c08.png new file mode 100644 index 0000000000..a9354dbee6 Binary files /dev/null and b/image/test/reftest/pngsuite-gamma/g03n2c08.png differ diff --git a/image/test/reftest/pngsuite-gamma/g03n3p04.html b/image/test/reftest/pngsuite-gamma/g03n3p04.html new file mode 100644 index 0000000000..efcf39f291 --- /dev/null +++ b/image/test/reftest/pngsuite-gamma/g03n3p04.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-gamma/g03n3p04.png b/image/test/reftest/pngsuite-gamma/g03n3p04.png new file mode 100644 index 0000000000..60396c95af Binary files /dev/null and b/image/test/reftest/pngsuite-gamma/g03n3p04.png differ diff --git a/image/test/reftest/pngsuite-gamma/g04n0g16.html b/image/test/reftest/pngsuite-gamma/g04n0g16.html new file mode 100644 index 0000000000..5bec9867fa --- /dev/null +++ b/image/test/reftest/pngsuite-gamma/g04n0g16.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-gamma/g04n0g16.png b/image/test/reftest/pngsuite-gamma/g04n0g16.png new file mode 100644 index 0000000000..32395b76c9 Binary files /dev/null and b/image/test/reftest/pngsuite-gamma/g04n0g16.png differ diff --git a/image/test/reftest/pngsuite-gamma/g04n2c08.html b/image/test/reftest/pngsuite-gamma/g04n2c08.html new file mode 100644 index 0000000000..b3b0556c6e --- /dev/null +++ b/image/test/reftest/pngsuite-gamma/g04n2c08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-gamma/g04n2c08.png b/image/test/reftest/pngsuite-gamma/g04n2c08.png new file mode 100644 index 0000000000..a652b0ce87 Binary files /dev/null and b/image/test/reftest/pngsuite-gamma/g04n2c08.png differ diff --git a/image/test/reftest/pngsuite-gamma/g04n3p04.html b/image/test/reftest/pngsuite-gamma/g04n3p04.html new file mode 100644 index 0000000000..337dcb49d7 --- /dev/null +++ b/image/test/reftest/pngsuite-gamma/g04n3p04.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-gamma/g04n3p04.png b/image/test/reftest/pngsuite-gamma/g04n3p04.png new file mode 100644 index 0000000000..5661cc3131 Binary files /dev/null and b/image/test/reftest/pngsuite-gamma/g04n3p04.png differ diff --git a/image/test/reftest/pngsuite-gamma/g05n0g16.html b/image/test/reftest/pngsuite-gamma/g05n0g16.html new file mode 100644 index 0000000000..ab100e638b --- /dev/null +++ b/image/test/reftest/pngsuite-gamma/g05n0g16.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-gamma/g05n0g16.png b/image/test/reftest/pngsuite-gamma/g05n0g16.png new file mode 100644 index 0000000000..70b37f01e2 Binary files /dev/null and b/image/test/reftest/pngsuite-gamma/g05n0g16.png differ diff --git a/image/test/reftest/pngsuite-gamma/g05n2c08.html b/image/test/reftest/pngsuite-gamma/g05n2c08.html new file mode 100644 index 0000000000..475ecd21df --- /dev/null +++ b/image/test/reftest/pngsuite-gamma/g05n2c08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-gamma/g05n2c08.png b/image/test/reftest/pngsuite-gamma/g05n2c08.png new file mode 100644 index 0000000000..932c136536 Binary files /dev/null and b/image/test/reftest/pngsuite-gamma/g05n2c08.png differ diff --git a/image/test/reftest/pngsuite-gamma/g05n3p04.html b/image/test/reftest/pngsuite-gamma/g05n3p04.html new file mode 100644 index 0000000000..d71689c29a --- /dev/null +++ b/image/test/reftest/pngsuite-gamma/g05n3p04.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-gamma/g05n3p04.png b/image/test/reftest/pngsuite-gamma/g05n3p04.png new file mode 100644 index 0000000000..9619930585 Binary files /dev/null and b/image/test/reftest/pngsuite-gamma/g05n3p04.png differ diff --git a/image/test/reftest/pngsuite-gamma/g07n0g16.html b/image/test/reftest/pngsuite-gamma/g07n0g16.html new file mode 100644 index 0000000000..b9f1a1c3ea --- /dev/null +++ b/image/test/reftest/pngsuite-gamma/g07n0g16.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-gamma/g07n0g16.png b/image/test/reftest/pngsuite-gamma/g07n0g16.png new file mode 100644 index 0000000000..d6a47c2d57 Binary files /dev/null and b/image/test/reftest/pngsuite-gamma/g07n0g16.png differ diff --git a/image/test/reftest/pngsuite-gamma/g07n2c08.html b/image/test/reftest/pngsuite-gamma/g07n2c08.html new file mode 100644 index 0000000000..0a5b63bf01 --- /dev/null +++ b/image/test/reftest/pngsuite-gamma/g07n2c08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-gamma/g07n2c08.png b/image/test/reftest/pngsuite-gamma/g07n2c08.png new file mode 100644 index 0000000000..597346460f Binary files /dev/null and b/image/test/reftest/pngsuite-gamma/g07n2c08.png differ diff --git a/image/test/reftest/pngsuite-gamma/g07n3p04.html b/image/test/reftest/pngsuite-gamma/g07n3p04.html new file mode 100644 index 0000000000..7303ed0d70 --- /dev/null +++ b/image/test/reftest/pngsuite-gamma/g07n3p04.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-gamma/g07n3p04.png b/image/test/reftest/pngsuite-gamma/g07n3p04.png new file mode 100644 index 0000000000..c73fb61365 Binary files /dev/null and b/image/test/reftest/pngsuite-gamma/g07n3p04.png differ diff --git a/image/test/reftest/pngsuite-gamma/g10n0g16.html b/image/test/reftest/pngsuite-gamma/g10n0g16.html new file mode 100644 index 0000000000..29301dd710 --- /dev/null +++ b/image/test/reftest/pngsuite-gamma/g10n0g16.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-gamma/g10n0g16.png b/image/test/reftest/pngsuite-gamma/g10n0g16.png new file mode 100644 index 0000000000..85f2c958e9 Binary files /dev/null and b/image/test/reftest/pngsuite-gamma/g10n0g16.png differ diff --git a/image/test/reftest/pngsuite-gamma/g10n2c08.html b/image/test/reftest/pngsuite-gamma/g10n2c08.html new file mode 100644 index 0000000000..24e8637b74 --- /dev/null +++ b/image/test/reftest/pngsuite-gamma/g10n2c08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-gamma/g10n2c08.png b/image/test/reftest/pngsuite-gamma/g10n2c08.png new file mode 100644 index 0000000000..b3039970c1 Binary files /dev/null and b/image/test/reftest/pngsuite-gamma/g10n2c08.png differ diff --git a/image/test/reftest/pngsuite-gamma/g10n3p04.html b/image/test/reftest/pngsuite-gamma/g10n3p04.html new file mode 100644 index 0000000000..7c25d439d8 --- /dev/null +++ b/image/test/reftest/pngsuite-gamma/g10n3p04.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-gamma/g10n3p04.png b/image/test/reftest/pngsuite-gamma/g10n3p04.png new file mode 100644 index 0000000000..1b6a6be2ca Binary files /dev/null and b/image/test/reftest/pngsuite-gamma/g10n3p04.png differ diff --git a/image/test/reftest/pngsuite-gamma/g25n0g16.html b/image/test/reftest/pngsuite-gamma/g25n0g16.html new file mode 100644 index 0000000000..7f3d84edf4 --- /dev/null +++ b/image/test/reftest/pngsuite-gamma/g25n0g16.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-gamma/g25n0g16.png b/image/test/reftest/pngsuite-gamma/g25n0g16.png new file mode 100644 index 0000000000..a9f6787c7a Binary files /dev/null and b/image/test/reftest/pngsuite-gamma/g25n0g16.png differ diff --git a/image/test/reftest/pngsuite-gamma/g25n2c08.html b/image/test/reftest/pngsuite-gamma/g25n2c08.html new file mode 100644 index 0000000000..2476d2cc9d --- /dev/null +++ b/image/test/reftest/pngsuite-gamma/g25n2c08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-gamma/g25n2c08.png b/image/test/reftest/pngsuite-gamma/g25n2c08.png new file mode 100644 index 0000000000..03f505a64b Binary files /dev/null and b/image/test/reftest/pngsuite-gamma/g25n2c08.png differ diff --git a/image/test/reftest/pngsuite-gamma/g25n3p04.html b/image/test/reftest/pngsuite-gamma/g25n3p04.html new file mode 100644 index 0000000000..3cb0205bed --- /dev/null +++ b/image/test/reftest/pngsuite-gamma/g25n3p04.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-gamma/g25n3p04.png b/image/test/reftest/pngsuite-gamma/g25n3p04.png new file mode 100644 index 0000000000..4f943c6175 Binary files /dev/null and b/image/test/reftest/pngsuite-gamma/g25n3p04.png differ diff --git a/image/test/reftest/pngsuite-gamma/reftest.list b/image/test/reftest/pngsuite-gamma/reftest.list new file mode 100644 index 0000000000..1b5abdda75 --- /dev/null +++ b/image/test/reftest/pngsuite-gamma/reftest.list @@ -0,0 +1,38 @@ +# PngSuite - Gamma values + +# g03n0g16 - grayscale, file-gamma = 0.35 +== g03n0g16.png g03n0g16.html +# g03n2c08 - color, file-gamma = 0.35 +== g03n2c08.png g03n2c08.html +# g03n3p04 - paletted, file-gamma = 0.35 +== g03n3p04.png g03n3p04.html +# g04n0g16 - grayscale, file-gamma = 0.45 +== g04n0g16.png g04n0g16.html +# g04n2c08 - color, file-gamma = 0.45 +== g04n2c08.png g04n2c08.html +# g04n3p04 - paletted, file-gamma = 0.45 +== g04n3p04.png g04n3p04.html +# g05n0g16 - grayscale, file-gamma = 0.55 +== g05n0g16.png g05n0g16.html +# g05n2c08 - color, file-gamma = 0.55 +== g05n2c08.png g05n2c08.html +# g05n3p04 - paletted, file-gamma = 0.55 +== g05n3p04.png g05n3p04.html +# g07n0g16 - grayscale, file-gamma = 0.70 +== g07n0g16.png g07n0g16.html +# g07n2c08 - color, file-gamma = 0.70 +== g07n2c08.png g07n2c08.html +# g07n3p04 - paletted, file-gamma = 0.70 +== g07n3p04.png g07n3p04.html +# g10n0g16 - grayscale, file-gamma = 1.00 +== g10n0g16.png g10n0g16.html +# g10n2c08 - color, file-gamma = 1.00 +== g10n2c08.png g10n2c08.html +# g10n3p04 - paletted, file-gamma = 1.00 +== g10n3p04.png g10n3p04.html +# g25n0g16 - grayscale, file-gamma = 2.50 +== g25n0g16.png g25n0g16.html +# g25n2c08 - color, file-gamma = 2.50 +== g25n2c08.png g25n2c08.html +# g25n3p04 - paletted, file-gamma = 2.50 +== g25n3p04.png g25n3p04.html diff --git a/image/test/reftest/pngsuite-oddsizes/reftest.list b/image/test/reftest/pngsuite-oddsizes/reftest.list new file mode 100644 index 0000000000..fa72e005b6 --- /dev/null +++ b/image/test/reftest/pngsuite-oddsizes/reftest.list @@ -0,0 +1,77 @@ +# PngSuite - Odd sizes +# +# Note: For each size, there are 2 PNGs (one interlaced, one not). Both +# versions look identical, so they share a common HTML reference file. + +# s01i3p01 - 1x1 paletted file, interlaced +== s01i3p01.png s01_3p01.html +# s01n3p01 - 1x1 paletted file, no interlacing +== s01n3p01.png s01_3p01.html +# s02i3p01 - 2x2 paletted file, interlaced +== s02i3p01.png s02_3p01.html +# s02n3p01 - 2x2 paletted file, no interlacing +== s02n3p01.png s02_3p01.html +# s03i3p01 - 3x3 paletted file, interlaced +== s03i3p01.png s03_3p01.html +# s03n3p01 - 3x3 paletted file, no interlacing +== s03n3p01.png s03_3p01.html +# s04i3p01 - 4x4 paletted file, interlaced +== s04i3p01.png s04_3p01.html +# s04n3p01 - 4x4 paletted file, no interlacing +== s04n3p01.png s04_3p01.html +# s05i3p02 - 5x5 paletted file, interlaced +== s05i3p02.png s05_3p02.html +# s05n3p02 - 5x5 paletted file, no interlacing +== s05n3p02.png s05_3p02.html +# s06i3p02 - 6x6 paletted file, interlaced +== s06i3p02.png s06_3p02.html +# s06n3p02 - 6x6 paletted file, no interlacing +== s06n3p02.png s06_3p02.html +# s07i3p02 - 7x7 paletted file, interlaced +== s07i3p02.png s07_3p02.html +# s07n3p02 - 7x7 paletted file, no interlacing +== s07n3p02.png s07_3p02.html +# s08i3p02 - 8x8 paletted file, interlaced +== s08i3p02.png s08_3p02.html +# s08n3p02 - 8x8 paletted file, no interlacing +== s08n3p02.png s08_3p02.html +# s09i3p02 - 9x9 paletted file, interlaced +== s09i3p02.png s09_3p02.html +# s09n3p02 - 9x9 paletted file, no interlacing +== s09n3p02.png s09_3p02.html +# s32i3p04 - 32x32 paletted file, interlaced +== s32i3p04.png s32_3p04.html +# s32n3p04 - 32x32 paletted file, no interlacing +== s32n3p04.png s32_3p04.html +# s33i3p04 - 33x33 paletted file, interlaced +== s33i3p04.png s33_3p04.html +# s33n3p04 - 33x33 paletted file, no interlacing +== s33n3p04.png s33_3p04.html +# s34i3p04 - 34x34 paletted file, interlaced +== s34i3p04.png s34_3p04.html +# s34n3p04 - 34x34 paletted file, no interlacing +== s34n3p04.png s34_3p04.html +# s35i3p04 - 35x35 paletted file, interlaced +== s35i3p04.png s35_3p04.html +# s35n3p04 - 35x35 paletted file, no interlacing +== s35n3p04.png s35_3p04.html +# s36i3p04 - 36x36 paletted file, interlaced +== s36i3p04.png s36_3p04.html +# s36n3p04 - 36x36 paletted file, no interlacing +== s36n3p04.png s36_3p04.html +# s37i3p04 - 37x37 paletted file, interlaced +== s37i3p04.png s37_3p04.html +# s37n3p04 - 37x37 paletted file, no interlacing +== s37n3p04.png s37_3p04.html +# s38i3p04 - 38x38 paletted file, interlaced +== s38i3p04.png s38_3p04.html +# s38n3p04 - 38x38 paletted file, no interlacing +== s38n3p04.png s38_3p04.html +# s39i3p04 - 39x39 paletted file, interlaced +== s39i3p04.png s39_3p04.html +# s39n3p04 - 39x39 paletted file, no interlacing +== s39n3p04.png s39_3p04.html +# s40i3p04 - 40x40 paletted file, interlaced +== s40i3p04.png s40_3p04.html +# s40n3p04 - 40x40 paletted file, no interlacing +== s40n3p04.png s40_3p04.html diff --git a/image/test/reftest/pngsuite-oddsizes/s01_3p01.html b/image/test/reftest/pngsuite-oddsizes/s01_3p01.html new file mode 100644 index 0000000000..f38d98f1a6 --- /dev/null +++ b/image/test/reftest/pngsuite-oddsizes/s01_3p01.html @@ -0,0 +1,9 @@ + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-oddsizes/s01i3p01.png b/image/test/reftest/pngsuite-oddsizes/s01i3p01.png new file mode 100644 index 0000000000..6c0fad1fc9 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s01i3p01.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s01n3p01.png b/image/test/reftest/pngsuite-oddsizes/s01n3p01.png new file mode 100644 index 0000000000..cb2c8c7826 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s01n3p01.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s02_3p01.html b/image/test/reftest/pngsuite-oddsizes/s02_3p01.html new file mode 100644 index 0000000000..ad4660a24c --- /dev/null +++ b/image/test/reftest/pngsuite-oddsizes/s02_3p01.html @@ -0,0 +1,14 @@ + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-oddsizes/s02i3p01.png b/image/test/reftest/pngsuite-oddsizes/s02i3p01.png new file mode 100644 index 0000000000..2defaed911 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s02i3p01.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s02n3p01.png b/image/test/reftest/pngsuite-oddsizes/s02n3p01.png new file mode 100644 index 0000000000..2b1b669643 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s02n3p01.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s03_3p01.html b/image/test/reftest/pngsuite-oddsizes/s03_3p01.html new file mode 100644 index 0000000000..adff34db31 --- /dev/null +++ b/image/test/reftest/pngsuite-oddsizes/s03_3p01.html @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-oddsizes/s03i3p01.png b/image/test/reftest/pngsuite-oddsizes/s03i3p01.png new file mode 100644 index 0000000000..c23fdc4631 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s03i3p01.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s03n3p01.png b/image/test/reftest/pngsuite-oddsizes/s03n3p01.png new file mode 100644 index 0000000000..6d96ee4f87 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s03n3p01.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s04_3p01.html b/image/test/reftest/pngsuite-oddsizes/s04_3p01.html new file mode 100644 index 0000000000..d97c2d42cc --- /dev/null +++ b/image/test/reftest/pngsuite-oddsizes/s04_3p01.html @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-oddsizes/s04i3p01.png b/image/test/reftest/pngsuite-oddsizes/s04i3p01.png new file mode 100644 index 0000000000..0e710c2c39 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s04i3p01.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s04n3p01.png b/image/test/reftest/pngsuite-oddsizes/s04n3p01.png new file mode 100644 index 0000000000..956396c45b Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s04n3p01.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s05_3p02.html b/image/test/reftest/pngsuite-oddsizes/s05_3p02.html new file mode 100644 index 0000000000..e5664fb9de --- /dev/null +++ b/image/test/reftest/pngsuite-oddsizes/s05_3p02.html @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-oddsizes/s05i3p02.png b/image/test/reftest/pngsuite-oddsizes/s05i3p02.png new file mode 100644 index 0000000000..d14cbd351a Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s05i3p02.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s05n3p02.png b/image/test/reftest/pngsuite-oddsizes/s05n3p02.png new file mode 100644 index 0000000000..bf940f0576 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s05n3p02.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s06_3p02.html b/image/test/reftest/pngsuite-oddsizes/s06_3p02.html new file mode 100644 index 0000000000..6d13dc56fc --- /dev/null +++ b/image/test/reftest/pngsuite-oddsizes/s06_3p02.html @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-oddsizes/s06i3p02.png b/image/test/reftest/pngsuite-oddsizes/s06i3p02.png new file mode 100644 index 0000000000..456ada3200 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s06i3p02.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s06n3p02.png b/image/test/reftest/pngsuite-oddsizes/s06n3p02.png new file mode 100644 index 0000000000..501064dc25 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s06n3p02.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s07_3p02.html b/image/test/reftest/pngsuite-oddsizes/s07_3p02.html new file mode 100644 index 0000000000..3fc2d42a71 --- /dev/null +++ b/image/test/reftest/pngsuite-oddsizes/s07_3p02.html @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-oddsizes/s07i3p02.png b/image/test/reftest/pngsuite-oddsizes/s07i3p02.png new file mode 100644 index 0000000000..44b66bab9e Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s07i3p02.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s07n3p02.png b/image/test/reftest/pngsuite-oddsizes/s07n3p02.png new file mode 100644 index 0000000000..6a582593d6 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s07n3p02.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s08_3p02.html b/image/test/reftest/pngsuite-oddsizes/s08_3p02.html new file mode 100644 index 0000000000..52079c3195 --- /dev/null +++ b/image/test/reftest/pngsuite-oddsizes/s08_3p02.html @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-oddsizes/s08i3p02.png b/image/test/reftest/pngsuite-oddsizes/s08i3p02.png new file mode 100644 index 0000000000..acf74f3fc4 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s08i3p02.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s08n3p02.png b/image/test/reftest/pngsuite-oddsizes/s08n3p02.png new file mode 100644 index 0000000000..b7094e1b4f Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s08n3p02.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s09_3p02.html b/image/test/reftest/pngsuite-oddsizes/s09_3p02.html new file mode 100644 index 0000000000..3b994e1283 --- /dev/null +++ b/image/test/reftest/pngsuite-oddsizes/s09_3p02.html @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-oddsizes/s09i3p02.png b/image/test/reftest/pngsuite-oddsizes/s09i3p02.png new file mode 100644 index 0000000000..0bfae8e456 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s09i3p02.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s09n3p02.png b/image/test/reftest/pngsuite-oddsizes/s09n3p02.png new file mode 100644 index 0000000000..711ab82451 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s09n3p02.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s32_3p04.html b/image/test/reftest/pngsuite-oddsizes/s32_3p04.html new file mode 100644 index 0000000000..a10399ba62 --- /dev/null +++ b/image/test/reftest/pngsuite-oddsizes/s32_3p04.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-oddsizes/s32i3p04.png b/image/test/reftest/pngsuite-oddsizes/s32i3p04.png new file mode 100644 index 0000000000..0841910b72 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s32i3p04.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s32n3p04.png b/image/test/reftest/pngsuite-oddsizes/s32n3p04.png new file mode 100644 index 0000000000..fa58e3e3f6 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s32n3p04.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s33_3p04.html b/image/test/reftest/pngsuite-oddsizes/s33_3p04.html new file mode 100644 index 0000000000..d845558ceb --- /dev/null +++ b/image/test/reftest/pngsuite-oddsizes/s33_3p04.html @@ -0,0 +1,1161 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-oddsizes/s33i3p04.png b/image/test/reftest/pngsuite-oddsizes/s33i3p04.png new file mode 100644 index 0000000000..ab0dc14aba Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s33i3p04.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s33n3p04.png b/image/test/reftest/pngsuite-oddsizes/s33n3p04.png new file mode 100644 index 0000000000..764f1a3dc7 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s33n3p04.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s34_3p04.html b/image/test/reftest/pngsuite-oddsizes/s34_3p04.html new file mode 100644 index 0000000000..605ff92648 --- /dev/null +++ b/image/test/reftest/pngsuite-oddsizes/s34_3p04.html @@ -0,0 +1,1230 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-oddsizes/s34i3p04.png b/image/test/reftest/pngsuite-oddsizes/s34i3p04.png new file mode 100644 index 0000000000..bd99039be4 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s34i3p04.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s34n3p04.png b/image/test/reftest/pngsuite-oddsizes/s34n3p04.png new file mode 100644 index 0000000000..9cbc68b3b9 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s34n3p04.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s35_3p04.html b/image/test/reftest/pngsuite-oddsizes/s35_3p04.html new file mode 100644 index 0000000000..6a5f720a99 --- /dev/null +++ b/image/test/reftest/pngsuite-oddsizes/s35_3p04.html @@ -0,0 +1,1301 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-oddsizes/s35i3p04.png b/image/test/reftest/pngsuite-oddsizes/s35i3p04.png new file mode 100644 index 0000000000..e2a5e0a659 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s35i3p04.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s35n3p04.png b/image/test/reftest/pngsuite-oddsizes/s35n3p04.png new file mode 100644 index 0000000000..90b892ebaf Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s35n3p04.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s36_3p04.html b/image/test/reftest/pngsuite-oddsizes/s36_3p04.html new file mode 100644 index 0000000000..68a5ae4be1 --- /dev/null +++ b/image/test/reftest/pngsuite-oddsizes/s36_3p04.html @@ -0,0 +1,1374 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-oddsizes/s36i3p04.png b/image/test/reftest/pngsuite-oddsizes/s36i3p04.png new file mode 100644 index 0000000000..eb61b6f9a3 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s36i3p04.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s36n3p04.png b/image/test/reftest/pngsuite-oddsizes/s36n3p04.png new file mode 100644 index 0000000000..b38d179774 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s36n3p04.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s37_3p04.html b/image/test/reftest/pngsuite-oddsizes/s37_3p04.html new file mode 100644 index 0000000000..0f19b653a1 --- /dev/null +++ b/image/test/reftest/pngsuite-oddsizes/s37_3p04.html @@ -0,0 +1,1449 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-oddsizes/s37i3p04.png b/image/test/reftest/pngsuite-oddsizes/s37i3p04.png new file mode 100644 index 0000000000..6e2b1e9b79 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s37i3p04.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s37n3p04.png b/image/test/reftest/pngsuite-oddsizes/s37n3p04.png new file mode 100644 index 0000000000..4d3054da51 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s37n3p04.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s38_3p04.html b/image/test/reftest/pngsuite-oddsizes/s38_3p04.html new file mode 100644 index 0000000000..38a8692988 --- /dev/null +++ b/image/test/reftest/pngsuite-oddsizes/s38_3p04.html @@ -0,0 +1,1526 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-oddsizes/s38i3p04.png b/image/test/reftest/pngsuite-oddsizes/s38i3p04.png new file mode 100644 index 0000000000..a0a8a140ad Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s38i3p04.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s38n3p04.png b/image/test/reftest/pngsuite-oddsizes/s38n3p04.png new file mode 100644 index 0000000000..1233ed048e Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s38n3p04.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s39_3p04.html b/image/test/reftest/pngsuite-oddsizes/s39_3p04.html new file mode 100644 index 0000000000..6a00026dc0 --- /dev/null +++ b/image/test/reftest/pngsuite-oddsizes/s39_3p04.html @@ -0,0 +1,1605 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-oddsizes/s39i3p04.png b/image/test/reftest/pngsuite-oddsizes/s39i3p04.png new file mode 100644 index 0000000000..04fee93eae Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s39i3p04.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s39n3p04.png b/image/test/reftest/pngsuite-oddsizes/s39n3p04.png new file mode 100644 index 0000000000..c750100d55 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s39n3p04.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s40_3p04.html b/image/test/reftest/pngsuite-oddsizes/s40_3p04.html new file mode 100644 index 0000000000..59b18da4d7 --- /dev/null +++ b/image/test/reftest/pngsuite-oddsizes/s40_3p04.html @@ -0,0 +1,1686 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-oddsizes/s40i3p04.png b/image/test/reftest/pngsuite-oddsizes/s40i3p04.png new file mode 100644 index 0000000000..68f358b822 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s40i3p04.png differ diff --git a/image/test/reftest/pngsuite-oddsizes/s40n3p04.png b/image/test/reftest/pngsuite-oddsizes/s40n3p04.png new file mode 100644 index 0000000000..864b6b9673 Binary files /dev/null and b/image/test/reftest/pngsuite-oddsizes/s40n3p04.png differ diff --git a/image/test/reftest/pngsuite-palettes/pp0n2c16.html b/image/test/reftest/pngsuite-palettes/pp0n2c16.html new file mode 100644 index 0000000000..dd08f0e3d0 --- /dev/null +++ b/image/test/reftest/pngsuite-palettes/pp0n2c16.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-palettes/pp0n2c16.png b/image/test/reftest/pngsuite-palettes/pp0n2c16.png new file mode 100644 index 0000000000..8f2aad7335 Binary files /dev/null and b/image/test/reftest/pngsuite-palettes/pp0n2c16.png differ diff --git a/image/test/reftest/pngsuite-palettes/pp0n6a08.png b/image/test/reftest/pngsuite-palettes/pp0n6a08.png new file mode 100644 index 0000000000..4ed7a30e4d Binary files /dev/null and b/image/test/reftest/pngsuite-palettes/pp0n6a08.png differ diff --git a/image/test/reftest/pngsuite-palettes/ps1n0g08.html b/image/test/reftest/pngsuite-palettes/ps1n0g08.html new file mode 100644 index 0000000000..5aaf11cabb --- /dev/null +++ b/image/test/reftest/pngsuite-palettes/ps1n0g08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-palettes/ps1n0g08.png b/image/test/reftest/pngsuite-palettes/ps1n0g08.png new file mode 100644 index 0000000000..2053df2ba3 Binary files /dev/null and b/image/test/reftest/pngsuite-palettes/ps1n0g08.png differ diff --git a/image/test/reftest/pngsuite-palettes/ps1n2c16.html b/image/test/reftest/pngsuite-palettes/ps1n2c16.html new file mode 100644 index 0000000000..dd08f0e3d0 --- /dev/null +++ b/image/test/reftest/pngsuite-palettes/ps1n2c16.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-palettes/ps1n2c16.png b/image/test/reftest/pngsuite-palettes/ps1n2c16.png new file mode 100644 index 0000000000..b03ecfc669 Binary files /dev/null and b/image/test/reftest/pngsuite-palettes/ps1n2c16.png differ diff --git a/image/test/reftest/pngsuite-palettes/ps2n0g08.html b/image/test/reftest/pngsuite-palettes/ps2n0g08.html new file mode 100644 index 0000000000..5aaf11cabb --- /dev/null +++ b/image/test/reftest/pngsuite-palettes/ps2n0g08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-palettes/ps2n0g08.png b/image/test/reftest/pngsuite-palettes/ps2n0g08.png new file mode 100644 index 0000000000..beeab8ff3d Binary files /dev/null and b/image/test/reftest/pngsuite-palettes/ps2n0g08.png differ diff --git a/image/test/reftest/pngsuite-palettes/ps2n2c16.html b/image/test/reftest/pngsuite-palettes/ps2n2c16.html new file mode 100644 index 0000000000..dd08f0e3d0 --- /dev/null +++ b/image/test/reftest/pngsuite-palettes/ps2n2c16.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-palettes/ps2n2c16.png b/image/test/reftest/pngsuite-palettes/ps2n2c16.png new file mode 100644 index 0000000000..c256f9091b Binary files /dev/null and b/image/test/reftest/pngsuite-palettes/ps2n2c16.png differ diff --git a/image/test/reftest/pngsuite-palettes/reftest.list b/image/test/reftest/pngsuite-palettes/reftest.list new file mode 100644 index 0000000000..56eb56e0a2 --- /dev/null +++ b/image/test/reftest/pngsuite-palettes/reftest.list @@ -0,0 +1,14 @@ +# PngSuite - Additional palettes + +# pp0n2c16 - six-cube palette-chunk in true-color image +== pp0n2c16.png pp0n2c16.html +# pp0n6a08 - six-cube palette-chunk in true-color+alpha image +#== pp0n6a08.png pp0n6a08.html +# ps1n0g08 - six-cube suggested palette (1 byte) in grayscale image +== ps1n0g08.png ps1n0g08.html +# ps1n2c16 - six-cube suggested palette (1 byte) in true-color image +== ps1n2c16.png ps1n2c16.html +# ps2n0g08 - six-cube suggested palette (2 bytes) in grayscale image +== ps2n0g08.png ps2n0g08.html +# ps2n2c16 - six-cube suggested palette (2 bytes) in true-color image +== ps2n2c16.png ps2n2c16.html diff --git a/image/test/reftest/pngsuite-zlib/reftest.list b/image/test/reftest/pngsuite-zlib/reftest.list new file mode 100644 index 0000000000..ec153449fb --- /dev/null +++ b/image/test/reftest/pngsuite-zlib/reftest.list @@ -0,0 +1,8 @@ +# z00n2c08 - color, no interlacing, compression level 0 (none) +== z00n2c08.png z00n2c08.html +# z03n2c08 - color, no interlacing, compression level 3 +== z03n2c08.png z03n2c08.html +# z06n2c08 - color, no interlacing, compression level 6 (default) +== z06n2c08.png z06n2c08.html +# z09n2c08 - color, no interlacing, compression level 9 (maximum) +== z09n2c08.png z09n2c08.html diff --git a/image/test/reftest/pngsuite-zlib/z00n2c08.html b/image/test/reftest/pngsuite-zlib/z00n2c08.html new file mode 100644 index 0000000000..c878a03ff6 --- /dev/null +++ b/image/test/reftest/pngsuite-zlib/z00n2c08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-zlib/z00n2c08.png b/image/test/reftest/pngsuite-zlib/z00n2c08.png new file mode 100644 index 0000000000..7669eb8385 Binary files /dev/null and b/image/test/reftest/pngsuite-zlib/z00n2c08.png differ diff --git a/image/test/reftest/pngsuite-zlib/z03n2c08.html b/image/test/reftest/pngsuite-zlib/z03n2c08.html new file mode 100644 index 0000000000..c878a03ff6 --- /dev/null +++ b/image/test/reftest/pngsuite-zlib/z03n2c08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-zlib/z03n2c08.png b/image/test/reftest/pngsuite-zlib/z03n2c08.png new file mode 100644 index 0000000000..bfb10de8de Binary files /dev/null and b/image/test/reftest/pngsuite-zlib/z03n2c08.png differ diff --git a/image/test/reftest/pngsuite-zlib/z06n2c08.html b/image/test/reftest/pngsuite-zlib/z06n2c08.html new file mode 100644 index 0000000000..c878a03ff6 --- /dev/null +++ b/image/test/reftest/pngsuite-zlib/z06n2c08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-zlib/z06n2c08.png b/image/test/reftest/pngsuite-zlib/z06n2c08.png new file mode 100644 index 0000000000..b90ebc10f5 Binary files /dev/null and b/image/test/reftest/pngsuite-zlib/z06n2c08.png differ diff --git a/image/test/reftest/pngsuite-zlib/z09n2c08.html b/image/test/reftest/pngsuite-zlib/z09n2c08.html new file mode 100644 index 0000000000..c878a03ff6 --- /dev/null +++ b/image/test/reftest/pngsuite-zlib/z09n2c08.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/image/test/reftest/pngsuite-zlib/z09n2c08.png b/image/test/reftest/pngsuite-zlib/z09n2c08.png new file mode 100644 index 0000000000..5f191a78ee Binary files /dev/null and b/image/test/reftest/pngsuite-zlib/z09n2c08.png differ diff --git a/image/test/reftest/reftest.list b/image/test/reftest/reftest.list new file mode 100644 index 0000000000..109a0676e1 --- /dev/null +++ b/image/test/reftest/reftest.list @@ -0,0 +1,55 @@ +# Check for 24-bit color mode (test for bug 414720) +== colordepth.html about:blank + +# "PngSuite, the official set of PNG test images" +# Images by Willem van Schaik +# +# http://www.schaik.com/pngsuite/pngsuite.html +# http://www.libpng.org/pub/png/pngsuite.html +include pngsuite-basic-n/reftest.list +include pngsuite-basic-i/reftest.list +include pngsuite-ancillary/reftest.list +include pngsuite-background/reftest.list +include pngsuite-chunkorder/reftest.list +include pngsuite-corrupted/reftest.list +include pngsuite-filtering/reftest.list +include pngsuite-gamma/reftest.list +include pngsuite-oddsizes/reftest.list +include pngsuite-palettes/reftest.list +include pngsuite-zlib/reftest.list + +# BMP tests +skip-if(Android) include bmp/reftest.list + +# ICO tests +skip-if(Android) include ico/reftest.list + +# JPEG tests +include jpeg/reftest.list + +# JXL tests +skip-if(Android||!jxl) include jxl/reftest.list + +# GIF tests +include gif/reftest.list + +# APNG tests +include apng/reftest.list + +# AVIF tests +include avif/reftest.list + +# Generic image tests +include generic/reftest.list + +# Color management test +include color-management/reftest.list + +# Downscaling tests +skip-if(useDrawSnapshot) include downscaling/reftest.list + +# Lossless encoders +include encoders-lossless/reftest.list + +# webp tests +include webp/reftest.list diff --git a/image/test/reftest/webp/blue.png b/image/test/reftest/webp/blue.png new file mode 100644 index 0000000000..7b62530006 Binary files /dev/null and b/image/test/reftest/webp/blue.png differ diff --git a/image/test/reftest/webp/icc-bit-no-icc-chunk.webp b/image/test/reftest/webp/icc-bit-no-icc-chunk.webp new file mode 100644 index 0000000000..66d38f46fe Binary files /dev/null and b/image/test/reftest/webp/icc-bit-no-icc-chunk.webp differ diff --git a/image/test/reftest/webp/reftest.list b/image/test/reftest/webp/reftest.list new file mode 100644 index 0000000000..971d895a4d --- /dev/null +++ b/image/test/reftest/webp/reftest.list @@ -0,0 +1 @@ +== icc-bit-no-icc-chunk.webp blue.png diff --git a/image/test/unit/async_load_tests.js b/image/test/unit/async_load_tests.js new file mode 100644 index 0000000000..f19e146314 --- /dev/null +++ b/image/test/unit/async_load_tests.js @@ -0,0 +1,302 @@ +/* + * Test to ensure that image loading/decoding notifications are always + * delivered async, and in the order we expect. + * + * Must be included from a file that has a uri of the image to test defined in + * var uri. + */ +/* import-globals-from image_load_helpers.js */ + +const { HttpServer } = ChromeUtils.importESModule( + "resource://testing-common/httpd.sys.mjs" +); +const { NetUtil } = ChromeUtils.importESModule( + "resource://gre/modules/NetUtil.sys.mjs" +); +const ReferrerInfo = Components.Constructor( + "@mozilla.org/referrer-info;1", + "nsIReferrerInfo", + "init" +); + +var server = new HttpServer(); +server.registerDirectory("/", do_get_file("")); +server.registerContentType("sjs", "sjs"); +server.start(-1); + +load("image_load_helpers.js"); + +var requests = []; +/* global uri */ + +// Return a closure that holds on to the listener from the original +// imgIRequest, and compares its results to the cloned one. +function getCloneStopCallback(original_listener) { + return function cloneStop(listener) { + Assert.equal(original_listener.state, listener.state); + + // Sanity check to make sure we didn't accidentally use the same listener + // twice. + Assert.notEqual(original_listener, listener); + do_test_finished(); + }; +} + +// Make sure that cloned requests get all the same callbacks as the original, +// but they aren't synchronous right now. +function checkClone(other_listener, aRequest) { + do_test_pending(); + + // For as long as clone notification is synchronous, we can't test the clone state reliably. + var listener = new ImageListener( + null, + function (foo, bar) { + do_test_finished(); + } /* getCloneStopCallback(other_listener)*/ + ); + listener.synchronous = false; + var outer = Cc["@mozilla.org/image/tools;1"] + .getService(Ci.imgITools) + .createScriptedObserver(listener); + var clone = aRequest.clone(outer); + requests.push({ request: clone, locked: false }); +} + +// Ensure that all the callbacks were called on aRequest. +function checkSizeAndLoad(listener, aRequest) { + Assert.notEqual(listener.state & SIZE_AVAILABLE, 0); + Assert.notEqual(listener.state & LOAD_COMPLETE, 0); + + do_test_finished(); +} + +function secondLoadDone(oldlistener, aRequest) { + do_test_pending(); + + try { + var staticrequest = aRequest.getStaticRequest(); + + // For as long as clone notification is synchronous, we can't test the + // clone state reliably. + var listener = new ImageListener(null, checkSizeAndLoad); + listener.synchronous = false; + var outer = Cc["@mozilla.org/image/tools;1"] + .getService(Ci.imgITools) + .createScriptedObserver(listener); + var staticrequestclone = staticrequest.clone(outer); + requests.push({ request: staticrequestclone, locked: false }); + } catch (e) { + // We can't create a static request. Most likely the request we started + // with didn't load successfully. + do_test_finished(); + } + + run_loadImageWithChannel_tests(); + + do_test_finished(); +} + +// Load the request a second time. This should come from the image cache, and +// therefore would be at most risk of being served synchronously. +function checkSecondLoad() { + do_test_pending(); + + var listener = new ImageListener(checkClone, secondLoadDone); + var outer = Cc["@mozilla.org/image/tools;1"] + .getService(Ci.imgITools) + .createScriptedObserver(listener); + var referrerInfo = new ReferrerInfo( + Ci.nsIReferrerInfo.NO_REFERRER_WHEN_DOWNGRADE, + true, + null + ); + requests.push({ + request: gCurrentLoader.loadImageXPCOM( + uri, + null, + referrerInfo, + null, + null, + outer, + null, + 0, + null + ), + locked: false, + }); + listener.synchronous = false; +} + +function firstLoadDone(oldlistener, aRequest) { + checkSecondLoad(uri); + + do_test_finished(); +} + +// Return a closure that allows us to check the stream listener's status when the +// image finishes loading. +function getChannelLoadImageStopCallback(streamlistener, next) { + return function channelLoadStop(imglistener, aRequest) { + next(); + + do_test_finished(); + }; +} + +// Load the request a second time. This should come from the image cache, and +// therefore would be at most risk of being served synchronously. +function checkSecondChannelLoad() { + do_test_pending(); + var channel = NetUtil.newChannel({ uri, loadUsingSystemPrincipal: true }); + var channellistener = new ChannelListener(); + channel.asyncOpen(channellistener); + + var listener = new ImageListener( + null, + getChannelLoadImageStopCallback(channellistener, all_done_callback) + ); + var outer = Cc["@mozilla.org/image/tools;1"] + .getService(Ci.imgITools) + .createScriptedObserver(listener); + var outlistener = {}; + requests.push({ + request: gCurrentLoader.loadImageWithChannelXPCOM( + channel, + outer, + null, + outlistener + ), + locked: false, + }); + channellistener.outputListener = outlistener.value; + + listener.synchronous = false; +} + +function run_loadImageWithChannel_tests() { + // To ensure we're testing what we expect to, create a new loader and cache. + gCurrentLoader = Cc["@mozilla.org/image/loader;1"].createInstance( + Ci.imgILoader + ); + + do_test_pending(); + var channel = NetUtil.newChannel({ uri, loadUsingSystemPrincipal: true }); + var channellistener = new ChannelListener(); + channel.asyncOpen(channellistener); + + var listener = new ImageListener( + null, + getChannelLoadImageStopCallback(channellistener, checkSecondChannelLoad) + ); + var outer = Cc["@mozilla.org/image/tools;1"] + .getService(Ci.imgITools) + .createScriptedObserver(listener); + var outlistener = {}; + requests.push({ + request: gCurrentLoader.loadImageWithChannelXPCOM( + channel, + outer, + null, + outlistener + ), + locked: false, + }); + channellistener.outputListener = outlistener.value; + + listener.synchronous = false; +} + +function all_done_callback() { + server.stop(function () { + do_test_finished(); + }); +} + +function startImageCallback(otherCb) { + return function (listener, request) { + // Make sure we can load the same image immediately out of the cache. + do_test_pending(); + var listener2 = new ImageListener(null, function (foo, bar) { + do_test_finished(); + }); + var outer = Cc["@mozilla.org/image/tools;1"] + .getService(Ci.imgITools) + .createScriptedObserver(listener2); + var referrerInfo = new ReferrerInfo( + Ci.nsIReferrerInfo.NO_REFERRER_WHEN_DOWNGRADE, + true, + null + ); + requests.push({ + request: gCurrentLoader.loadImageXPCOM( + uri, + null, + referrerInfo, + null, + null, + outer, + null, + 0, + null + ), + locked: false, + }); + listener2.synchronous = false; + + // Now that we've started another load, chain to the callback. + otherCb(listener, request); + }; +} + +var gCurrentLoader; + +function cleanup() { + for (let { request, locked } of requests) { + if (locked) { + try { + request.unlockImage(); + } catch (e) {} + } + request.cancelAndForgetObserver(0); + } +} + +function run_test() { + registerCleanupFunction(cleanup); + + gCurrentLoader = Cc["@mozilla.org/image/loader;1"].createInstance( + Ci.imgILoader + ); + + do_test_pending(); + var listener = new ImageListener( + startImageCallback(checkClone), + firstLoadDone + ); + var outer = Cc["@mozilla.org/image/tools;1"] + .getService(Ci.imgITools) + .createScriptedObserver(listener); + var referrerInfo = new ReferrerInfo( + Ci.nsIReferrerInfo.NO_REFERRER_WHEN_DOWNGRADE, + true, + null + ); + var req = gCurrentLoader.loadImageXPCOM( + uri, + null, + referrerInfo, + null, + null, + outer, + null, + 0, + null + ); + + // Ensure that we don't cause any mayhem when we lock an image. + req.lockImage(); + + requests.push({ request: req, locked: true }); + + listener.synchronous = false; +} diff --git a/image/test/unit/bug413512.ico b/image/test/unit/bug413512.ico new file mode 100644 index 0000000000..b2db0429f6 Binary files /dev/null and b/image/test/unit/bug413512.ico differ diff --git a/image/test/unit/bug815359.ico b/image/test/unit/bug815359.ico new file mode 100644 index 0000000000..a24b8fb6bb Binary files /dev/null and b/image/test/unit/bug815359.ico differ diff --git a/image/test/unit/image1.png b/image/test/unit/image1.png new file mode 100644 index 0000000000..2fb37aeec4 Binary files /dev/null and b/image/test/unit/image1.png differ diff --git a/image/test/unit/image1.webp b/image/test/unit/image1.webp new file mode 100644 index 0000000000..b2a6f92aaa Binary files /dev/null and b/image/test/unit/image1.webp differ diff --git a/image/test/unit/image1png16x16.jpg b/image/test/unit/image1png16x16.jpg new file mode 100644 index 0000000000..488b563c90 Binary files /dev/null and b/image/test/unit/image1png16x16.jpg differ diff --git a/image/test/unit/image1png64x64.jpg b/image/test/unit/image1png64x64.jpg new file mode 100644 index 0000000000..679dad2b95 Binary files /dev/null and b/image/test/unit/image1png64x64.jpg differ diff --git a/image/test/unit/image1quality50.webp b/image/test/unit/image1quality50.webp new file mode 100644 index 0000000000..f73d615657 Binary files /dev/null and b/image/test/unit/image1quality50.webp differ diff --git a/image/test/unit/image2.jpg b/image/test/unit/image2.jpg new file mode 100644 index 0000000000..b2131bf0c1 Binary files /dev/null and b/image/test/unit/image2.jpg differ diff --git a/image/test/unit/image2jpg16x16-win.png b/image/test/unit/image2jpg16x16-win.png new file mode 100644 index 0000000000..a821626c07 Binary files /dev/null and b/image/test/unit/image2jpg16x16-win.png differ diff --git a/image/test/unit/image2jpg16x16.png b/image/test/unit/image2jpg16x16.png new file mode 100644 index 0000000000..b5b9a720a8 Binary files /dev/null and b/image/test/unit/image2jpg16x16.png differ diff --git a/image/test/unit/image2jpg16x16cropped.jpg b/image/test/unit/image2jpg16x16cropped.jpg new file mode 100644 index 0000000000..fca22cb30a Binary files /dev/null and b/image/test/unit/image2jpg16x16cropped.jpg differ diff --git a/image/test/unit/image2jpg16x16cropped2.jpg b/image/test/unit/image2jpg16x16cropped2.jpg new file mode 100644 index 0000000000..e51d3530d3 Binary files /dev/null and b/image/test/unit/image2jpg16x16cropped2.jpg differ diff --git a/image/test/unit/image2jpg16x32cropped3.jpg b/image/test/unit/image2jpg16x32cropped3.jpg new file mode 100644 index 0000000000..13a3d26e54 Binary files /dev/null and b/image/test/unit/image2jpg16x32cropped3.jpg differ diff --git a/image/test/unit/image2jpg16x32scaled.jpg b/image/test/unit/image2jpg16x32scaled.jpg new file mode 100644 index 0000000000..6abef0f99b Binary files /dev/null and b/image/test/unit/image2jpg16x32scaled.jpg differ diff --git a/image/test/unit/image2jpg32x16cropped4.jpg b/image/test/unit/image2jpg32x16cropped4.jpg new file mode 100644 index 0000000000..46f34918c8 Binary files /dev/null and b/image/test/unit/image2jpg32x16cropped4.jpg differ diff --git a/image/test/unit/image2jpg32x16scaled.jpg b/image/test/unit/image2jpg32x16scaled.jpg new file mode 100644 index 0000000000..e302fbafd0 Binary files /dev/null and b/image/test/unit/image2jpg32x16scaled.jpg differ diff --git a/image/test/unit/image2jpg32x32-win.png b/image/test/unit/image2jpg32x32-win.png new file mode 100644 index 0000000000..4d84df26a0 Binary files /dev/null and b/image/test/unit/image2jpg32x32-win.png differ diff --git a/image/test/unit/image2jpg32x32.jpg b/image/test/unit/image2jpg32x32.jpg new file mode 100644 index 0000000000..cf9a10a37f Binary files /dev/null and b/image/test/unit/image2jpg32x32.jpg differ diff --git a/image/test/unit/image2jpg32x32.png b/image/test/unit/image2jpg32x32.png new file mode 100644 index 0000000000..42640cbb53 Binary files /dev/null and b/image/test/unit/image2jpg32x32.png differ diff --git a/image/test/unit/image3.ico b/image/test/unit/image3.ico new file mode 100644 index 0000000000..d44438903b Binary files /dev/null and b/image/test/unit/image3.ico differ diff --git a/image/test/unit/image3ico16x16.png b/image/test/unit/image3ico16x16.png new file mode 100644 index 0000000000..fa61cc5046 Binary files /dev/null and b/image/test/unit/image3ico16x16.png differ diff --git a/image/test/unit/image3ico32x32.png b/image/test/unit/image3ico32x32.png new file mode 100644 index 0000000000..58a72e5c9d Binary files /dev/null and b/image/test/unit/image3ico32x32.png differ diff --git a/image/test/unit/image4.gif b/image/test/unit/image4.gif new file mode 100644 index 0000000000..b1530bc81e Binary files /dev/null and b/image/test/unit/image4.gif differ diff --git a/image/test/unit/image4gif16x16bmp24bpp.ico b/image/test/unit/image4gif16x16bmp24bpp.ico new file mode 100644 index 0000000000..890c81c272 Binary files /dev/null and b/image/test/unit/image4gif16x16bmp24bpp.ico differ diff --git a/image/test/unit/image4gif16x16bmp32bpp.ico b/image/test/unit/image4gif16x16bmp32bpp.ico new file mode 100644 index 0000000000..f8a9eb8adc Binary files /dev/null and b/image/test/unit/image4gif16x16bmp32bpp.ico differ diff --git a/image/test/unit/image4gif32x32bmp24bpp.ico b/image/test/unit/image4gif32x32bmp24bpp.ico new file mode 100644 index 0000000000..28092818dc Binary files /dev/null and b/image/test/unit/image4gif32x32bmp24bpp.ico differ diff --git a/image/test/unit/image4gif32x32bmp32bpp.ico b/image/test/unit/image4gif32x32bmp32bpp.ico new file mode 100644 index 0000000000..0e2d28c82a Binary files /dev/null and b/image/test/unit/image4gif32x32bmp32bpp.ico differ diff --git a/image/test/unit/image_load_helpers.js b/image/test/unit/image_load_helpers.js new file mode 100644 index 0000000000..6d1e605bf5 --- /dev/null +++ b/image/test/unit/image_load_helpers.js @@ -0,0 +1,124 @@ +/* + * Helper structures to track callbacks from image and channel loads. + */ + +// START_REQUEST and STOP_REQUEST are used by ChannelListener, and +// stored in ChannelListener.requestStatus. +const START_REQUEST = 0x01; +const STOP_REQUEST = 0x02; +const DATA_AVAILABLE = 0x04; + +// One bit per callback that imageListener below implements. Stored in +// ImageListener.state. +const SIZE_AVAILABLE = 0x01; +const FRAME_UPDATE = 0x02; +const FRAME_COMPLETE = 0x04; +const LOAD_COMPLETE = 0x08; +const DECODE_COMPLETE = 0x10; + +// Safebrowsing requires that the profile dir is set. +do_get_profile(); + +// An implementation of imgIScriptedNotificationObserver with the ability to +// call specified functions on onStartRequest and onStopRequest. +function ImageListener(start_callback, stop_callback) { + this.sizeAvailable = function onSizeAvailable(aRequest) { + Assert.ok(!this.synchronous); + + this.state |= SIZE_AVAILABLE; + + if (this.start_callback) { + this.start_callback(this, aRequest); + } + }; + this.frameComplete = function onFrameComplete(aRequest) { + Assert.ok(!this.synchronous); + + this.state |= FRAME_COMPLETE; + }; + this.decodeComplete = function onDecodeComplete(aRequest) { + Assert.ok(!this.synchronous); + + this.state |= DECODE_COMPLETE; + }; + this.loadComplete = function onLoadcomplete(aRequest) { + Assert.ok(!this.synchronous); + + this.state |= LOAD_COMPLETE; + + if (this.stop_callback) { + this.stop_callback(this, aRequest); + } + }; + this.frameUpdate = function onFrameUpdate(aRequest) {}; + this.isAnimated = function onIsAnimated() {}; + + // Initialize the synchronous flag to true to start. This must be set to + // false before exiting to the event loop! + this.synchronous = true; + + // A function to call when onStartRequest is called. + this.start_callback = start_callback; + + // A function to call when onStopRequest is called. + this.stop_callback = stop_callback; + + // The image load/decode state. + // A bitfield that tracks which callbacks have been called. Takes the bits + // defined above. + this.state = 0; +} + +function NS_FAILED(val) { + return !!(val & 0x80000000); +} + +function ChannelListener() { + this.onStartRequest = function onStartRequest(aRequest) { + if (this.outputListener) { + this.outputListener.onStartRequest(aRequest); + } + + this.requestStatus |= START_REQUEST; + }; + + this.onDataAvailable = function onDataAvailable( + aRequest, + aInputStream, + aOffset, + aCount + ) { + if (this.outputListener) { + this.outputListener.onDataAvailable( + aRequest, + aInputStream, + aOffset, + aCount + ); + } + + this.requestStatus |= DATA_AVAILABLE; + }; + + this.onStopRequest = function onStopRequest(aRequest, aStatusCode) { + if (this.outputListener) { + this.outputListener.onStopRequest(aRequest, aStatusCode); + } + + // If we failed (or were canceled - failure is implied if canceled), + // there's no use tracking our state, since it's meaningless. + if (NS_FAILED(aStatusCode)) { + this.requestStatus = 0; + } else { + this.requestStatus |= STOP_REQUEST; + } + }; + + // A listener to pass the notifications we get to. + this.outputListener = null; + + // The request's status. A bitfield that holds one or both of START_REQUEST + // and STOP_REQUEST, according to which callbacks have been called on the + // associated request. + this.requestStatus = 0; +} diff --git a/image/test/unit/test_async_notification.js b/image/test/unit/test_async_notification.js new file mode 100644 index 0000000000..3f5f47c271 --- /dev/null +++ b/image/test/unit/test_async_notification.js @@ -0,0 +1,15 @@ +/* + * Test for asynchronous image load/decode notifications in the case that the image load works. + */ + +// A simple 3x3 png; rows go red, green, blue. Stolen from the PNG encoder test. + +var pngspec = + "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAADCAIAAADZSiLoAAAAEUlEQVQImWP4z8AAQTAamQkAhpcI+DeMzFcAAAAASUVORK5CYII="; +var ioService = Services.io; + +// This is used in async_load_tests.js +/* exported uri */ +var uri = ioService.newURI(pngspec); + +load("async_load_tests.js"); diff --git a/image/test/unit/test_async_notification_404.js b/image/test/unit/test_async_notification_404.js new file mode 100644 index 0000000000..c4f836750c --- /dev/null +++ b/image/test/unit/test_async_notification_404.js @@ -0,0 +1,19 @@ +/* + * Test to ensure that load/decode notifications are delivered completely and + * asynchronously when dealing with a file that's a 404. + */ +/* import-globals-from async_load_tests.js */ + +var ioService = Services.io; + +// This is used in async_load_tests.js +// eslint-disable-next-line no-unused-vars +ChromeUtils.defineLazyGetter(this, "uri", function () { + return ioService.newURI( + "http://localhost:" + + server.identity.primaryPort + + "/async-notification-never-here.jpg" + ); +}); + +load("async_load_tests.js"); diff --git a/image/test/unit/test_async_notification_animated.js b/image/test/unit/test_async_notification_animated.js new file mode 100644 index 0000000000..f201f90f60 --- /dev/null +++ b/image/test/unit/test_async_notification_animated.js @@ -0,0 +1,19 @@ +/* + * Test for asynchronous image load/decode notifications in the case that the + * image load works, but for an animated image. + * + * If this fails because a request wasn't cancelled, it's possible that + * imgContainer::ExtractFrame didn't set the new image's status correctly. + */ + +// transparent-animation.gif from the gif reftests. + +var spec = + "data:image/gif;base64,R0lGODlhZABkAIABAP8AAP///yH5BAkBAAEALAAAAABLAGQAAAK8jI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8YhMKpchgPMJjUqnVOipis1ir9qul+sNV8HistVkTj/JajG7/UXDy+95tm4fy/NdPF/q93dWIqgVWAhwWKgoyPjnyAeZJ2lHOWcJh9mmqcaZ5mkGSreHOCXqRloadRrGGkeoapoa6+TaN0tra4gbq3vHq+q7BVwqrMeEnKy8zNzs/AwdLT1NXW19jZ1tUgAAIfkECQEAAQAsAAAAADQAZAAAArCMj6nL7Q+jnLTai7PevPsPhuJIluaJpurKtu4Lx/JM1/aN5/rO9/7vAAiHxKLxiCRCkswmc+mMSqHSapJqzSof2u4Q67WCw1MuOTs+N9Pqq7kdZcON8vk2aF+/88g6358HaCc4Rwhn2IaopnjGSOYYBukl2UWpZYm2x0enuXnX4NnXGQqAKTYaalqlWoZH+snwWsQah+pJ64Sr5ypbCvQLHCw8TFxsfIycrLzM3PxQAAAh+QQJAQABACwAAAAAGwBkAAACUIyPqcvtD6OctNqLs968+w+G4kiW5omm6sq27gTE8kzX9o3n+s73/g8MCofEovGITCqXzKbzCY1Kp9Sq9YrNarfcrvdrfYnH5LL5jE6r16sCADs="; +var ioService = Services.io; + +// This is used in async_load_tests.js +/* exported uri */ +var uri = ioService.newURI(spec); + +load("async_load_tests.js"); diff --git a/image/test/unit/test_encoder_apng.js b/image/test/unit/test_encoder_apng.js new file mode 100644 index 0000000000..f055a0335f --- /dev/null +++ b/image/test/unit/test_encoder_apng.js @@ -0,0 +1,582 @@ +/* + * Test for APNG encoding in ImageLib + * + */ + +// dispose=[none|background|previous] +// blend=[source|over] + +var apng1A = { + // A 3x3 image with 3 frames, alternating red, green, blue. RGB format. + width: 3, + height: 3, + skipFirstFrame: false, + format: Ci.imgIEncoder.INPUT_FORMAT_RGB, + transparency: null, + plays: 0, + + frames: [ + { + // frame #1 + width: 3, + height: 3, + x_offset: 0, + y_offset: 0, + dispose: "none", + blend: "source", + delay: 500, + + format: Ci.imgIEncoder.INPUT_FORMAT_RGB, + stride: 9, + transparency: null, + + pixels: [ + 255, 0, 0, 255, 0, 0, 255, 0, 0, 255, 0, 0, 255, 0, 0, 255, 0, 0, 255, + 0, 0, 255, 0, 0, 255, 0, 0, + ], + }, + + { + // frame #2 + width: 3, + height: 3, + x_offset: 0, + y_offset: 0, + dispose: "none", + blend: "source", + delay: 500, + + format: Ci.imgIEncoder.INPUT_FORMAT_RGB, + stride: 9, + transparency: null, + + pixels: [ + 0, 255, 0, 0, 255, 0, 0, 255, 0, 0, 255, 0, 0, 255, 0, 0, 255, 0, 0, + 255, 0, 0, 255, 0, 0, 255, 0, + ], + }, + + { + // frame #3 + width: 3, + height: 3, + x_offset: 0, + y_offset: 0, + dispose: "none", + blend: "source", + delay: 500, + + format: Ci.imgIEncoder.INPUT_FORMAT_RGB, + stride: 9, + transparency: null, + + pixels: [ + 0, 0, 255, 0, 0, 255, 0, 0, 255, 0, 0, 255, 0, 0, 255, 0, 0, 255, 0, 0, + 255, 0, 0, 255, 0, 0, 255, + ], + }, + ], + expected: + "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAADCAIAAADZSiLoAAAACGFjVEwAAAADAAAAAM7tusAAAAAaZmNUTAAAAAAAAAADAAAAAwAAAAAAAAAAAfQD6AAAdRYgGAAAAA9JREFUCFtj/M8ABYxYWAA5IQMBD9nE1QAAABpmY1RMAAAAAQAAAAMAAAADAAAAAAAAAAAB9APoAADuZcrMAAAAFGZkQVQAAAACCFtjZPjPAAGMWFgANiQDAVBdoI8AAAAaZmNUTAAAAAMAAAADAAAAAwAAAAAAAAAAAfQD6AAAA/MZJQAAABVmZEFUAAAABAhbY2Rg+M8ABoxYWAAzJwMBWk5KPwAAAABJRU5ErkJggg==", +}; + +var apng1B = { + // A 3x3 image with 3 frames, alternating red, green, blue. RGBA format. + width: 3, + height: 3, + skipFirstFrame: false, + format: Ci.imgIEncoder.INPUT_FORMAT_RGBA, + transparency: null, + plays: 0, + + frames: [ + { + // frame #1 + width: 3, + height: 3, + x_offset: 0, + y_offset: 0, + dispose: "none", + blend: "source", + delay: 500, + + format: Ci.imgIEncoder.INPUT_FORMAT_RGBA, + stride: 12, + + pixels: [ + 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, + 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, + ], + }, + + { + // frame #2 + width: 3, + height: 3, + x_offset: 0, + y_offset: 0, + dispose: "none", + blend: "source", + delay: 500, + + format: Ci.imgIEncoder.INPUT_FORMAT_RGBA, + stride: 12, + + pixels: [ + 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, + 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, + ], + }, + + { + // frame #3 + width: 3, + height: 3, + x_offset: 0, + y_offset: 0, + dispose: "none", + blend: "source", + delay: 500, + + format: Ci.imgIEncoder.INPUT_FORMAT_RGBA, + stride: 12, + + pixels: [ + 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, + 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, + 255, + ], + }, + ], + expected: + "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAADCAYAAABWKLW/AAAACGFjVEwAAAADAAAAAM7tusAAAAAaZmNUTAAAAAAAAAADAAAAAwAAAAAAAAAAAfQD6AAAdRYgGAAAABJJREFUCFtj/M/AAEQQwIiTAwCM6AX+t+X3FQAAABpmY1RMAAAAAQAAAAMAAAADAAAAAAAAAAAB9APoAADuZcrMAAAAFWZkQVQAAAACCFtjZPgPhFDAiJMDAInrBf4Q0nfOAAAAGmZjVEwAAAADAAAAAwAAAAMAAAAAAAAAAAH0A+gAAAPzGSUAAAAWZmRBVAAAAAQIW2NkYPj/nwEKGHFyAIbuBf50PCpiAAAAAElFTkSuQmCC", +}; + +var apng1C = { + // A 3x3 image with 3 frames, alternating red, green, blue. RGBA format. + // The first frame is skipped, so it will only flash green/blue (or static red in an APNG-unaware viewer) + width: 3, + height: 3, + skipFirstFrame: true, + format: Ci.imgIEncoder.INPUT_FORMAT_RGBA, + transparency: null, + plays: 0, + + frames: [ + { + // frame #1 + width: 3, + height: 3, + x_offset: 0, + y_offset: 0, + dispose: "none", + blend: "source", + delay: 500, + + format: Ci.imgIEncoder.INPUT_FORMAT_RGBA, + stride: 12, + + pixels: [ + 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, + 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, + ], + }, + + { + // frame #2 + width: 3, + height: 3, + x_offset: 0, + y_offset: 0, + dispose: "none", + blend: "source", + delay: 500, + + format: Ci.imgIEncoder.INPUT_FORMAT_RGBA, + stride: 12, + + pixels: [ + 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, + 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, + ], + }, + + { + // frame #3 + width: 3, + height: 3, + x_offset: 0, + y_offset: 0, + dispose: "none", + blend: "source", + delay: 500, + + format: Ci.imgIEncoder.INPUT_FORMAT_RGBA, + stride: 12, + + pixels: [ + 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, + 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, + 255, + ], + }, + ], + expected: + "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAADCAYAAABWKLW/AAAACGFjVEwAAAACAAAAAPONk3AAAAASSURBVAhbY/zPwABEEMCIkwMAjOgF/rfl9xUAAAAaZmNUTAAAAAAAAAADAAAAAwAAAAAAAAAAAfQD6AAAdRYgGAAAABVmZEFUAAAAAQhbY2T4D4RQwIiTAwCJ6wX++lSqrAAAABpmY1RMAAAAAgAAAAMAAAADAAAAAAAAAAAB9APoAACYgPPxAAAAFmZkQVQAAAADCFtjZGD4/58BChhxcgCG7gX+PgKhKQAAAABJRU5ErkJggg==", +}; + +var apng2A = { + // A 3x3 image with 3 frames, alternating red, green, blue. RGBA format. + // blend = over mode + // (The green frame is a horizontal gradient, and the blue frame is a + // vertical gradient. They stack as they animate.) + width: 3, + height: 3, + skipFirstFrame: false, + format: Ci.imgIEncoder.INPUT_FORMAT_RGBA, + transparency: null, + plays: 0, + + frames: [ + { + // frame #1 + width: 3, + height: 3, + x_offset: 0, + y_offset: 0, + dispose: "none", + blend: "source", + delay: 500, + + format: Ci.imgIEncoder.INPUT_FORMAT_RGBA, + stride: 12, + + pixels: [ + 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, + 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, + ], + }, + + { + // frame #2 + width: 3, + height: 3, + x_offset: 0, + y_offset: 0, + dispose: "none", + blend: "over", + delay: 500, + + format: Ci.imgIEncoder.INPUT_FORMAT_RGBA, + stride: 12, + + pixels: [ + 0, 255, 0, 255, 0, 255, 0, 180, 0, 255, 0, 75, 0, 255, 0, 255, 0, 255, + 0, 180, 0, 255, 0, 75, 0, 255, 0, 255, 0, 255, 0, 180, 0, 255, 0, 75, + ], + }, + + { + // frame #3 + width: 3, + height: 3, + x_offset: 0, + y_offset: 0, + dispose: "none", + blend: "over", + delay: 500, + + format: Ci.imgIEncoder.INPUT_FORMAT_RGBA, + stride: 12, + + pixels: [ + 0, 0, 255, 75, 0, 0, 255, 75, 0, 0, 255, 75, 0, 0, 255, 180, 0, 0, 255, + 180, 0, 0, 255, 180, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, + ], + }, + ], + expected: + "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAADCAYAAABWKLW/AAAACGFjVEwAAAADAAAAAM7tusAAAAAaZmNUTAAAAAAAAAADAAAAAwAAAAAAAAAAAfQD6AAAdRYgGAAAABJJREFUCFtj/M/AAEQQwIiTAwCM6AX+t+X3FQAAABpmY1RMAAAAAQAAAAMAAAADAAAAAAAAAAAB9APoAAGZYvpaAAAAGWZkQVQAAAACCFtjZPgPhAwMW4F4OiNODgDI3wnis0vjTAAAABpmY1RMAAAAAwAAAAMAAAADAAAAAAAAAAAB9APoAAF09CmzAAAAHGZkQVQAAAAECFtjZGD4780ABYxAzhZkzn8YBwBn4AT/ernr+wAAAABJRU5ErkJggg==", +}; + +var apng2B = { + // A 3x3 image with 3 frames, alternating red, green, blue. RGBA format. + // blend = over, dispose = background + // (The green frame is a horizontal gradient, and the blue frame is a + // vertical gradient. Each frame is displayed individually, blended to + // whatever the background is.) + width: 3, + height: 3, + skipFirstFrame: false, + format: Ci.imgIEncoder.INPUT_FORMAT_RGBA, + transparency: null, + plays: 0, + + frames: [ + { + // frame #1 + width: 3, + height: 3, + x_offset: 0, + y_offset: 0, + dispose: "background", + blend: "source", + delay: 500, + + format: Ci.imgIEncoder.INPUT_FORMAT_RGBA, + stride: 12, + + pixels: [ + 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, + 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, + ], + }, + + { + // frame #2 + width: 3, + height: 3, + x_offset: 0, + y_offset: 0, + dispose: "background", + blend: "over", + delay: 500, + + format: Ci.imgIEncoder.INPUT_FORMAT_RGBA, + stride: 12, + + pixels: [ + 0, 255, 0, 255, 0, 255, 0, 180, 0, 255, 0, 75, 0, 255, 0, 255, 0, 255, + 0, 180, 0, 255, 0, 75, 0, 255, 0, 255, 0, 255, 0, 180, 0, 255, 0, 75, + ], + }, + + { + // frame #3 + width: 3, + height: 3, + x_offset: 0, + y_offset: 0, + dispose: "background", + blend: "over", + delay: 500, + + format: Ci.imgIEncoder.INPUT_FORMAT_RGBA, + stride: 12, + + pixels: [ + 0, 0, 255, 75, 0, 0, 255, 75, 0, 0, 255, 75, 0, 0, 255, 180, 0, 0, 255, + 180, 0, 0, 255, 180, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, + ], + }, + ], + expected: + "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAADCAYAAABWKLW/AAAACGFjVEwAAAADAAAAAM7tusAAAAAaZmNUTAAAAAAAAAADAAAAAwAAAAAAAAAAAfQD6AEAbA0RWQAAABJJREFUCFtj/M/AAEQQwIiTAwCM6AX+t+X3FQAAABpmY1RMAAAAAQAAAAMAAAADAAAAAAAAAAAB9APoAQGAecsbAAAAGWZkQVQAAAACCFtjZPgPhAwMW4F4OiNODgDI3wnis0vjTAAAABpmY1RMAAAAAwAAAAMAAAADAAAAAAAAAAAB9APoAQFt7xjyAAAAHGZkQVQAAAAECFtjZGD4780ABYxAzhZkzn8YBwBn4AT/ernr+wAAAABJRU5ErkJggg==", +}; + +var apng3 = { + // A 3x3 image with 4 frames. First frame is white, then 1x1 frames draw a diagonal line + width: 3, + height: 3, + skipFirstFrame: false, + format: Ci.imgIEncoder.INPUT_FORMAT_RGBA, + transparency: null, + plays: 0, + + frames: [ + { + // frame #1 + width: 3, + height: 3, + x_offset: 0, + y_offset: 0, + dispose: "none", + blend: "source", + delay: 500, + + format: Ci.imgIEncoder.INPUT_FORMAT_RGBA, + stride: 12, + + pixels: [ + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + ], + }, + + { + // frame #2 + width: 1, + height: 1, + x_offset: 0, + y_offset: 0, + dispose: "none", + blend: "source", + delay: 500, + + format: Ci.imgIEncoder.INPUT_FORMAT_RGBA, + stride: 12, + + pixels: [0, 0, 0, 255], + }, + + { + // frame #3 + width: 1, + height: 1, + x_offset: 1, + y_offset: 1, + dispose: "none", + blend: "source", + delay: 500, + + format: Ci.imgIEncoder.INPUT_FORMAT_RGBA, + stride: 12, + + pixels: [0, 0, 0, 255], + }, + + { + // frame #4 + width: 1, + height: 1, + x_offset: 2, + y_offset: 2, + dispose: "none", + blend: "source", + delay: 500, + + format: Ci.imgIEncoder.INPUT_FORMAT_RGBA, + stride: 12, + + pixels: [0, 0, 0, 255], + }, + ], + + expected: + "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAADCAYAAABWKLW/AAAACGFjVEwAAAAEAAAAAHzNZtAAAAAaZmNUTAAAAAAAAAADAAAAAwAAAAAAAAAAAfQD6AAAdRYgGAAAABFJREFUCFtj/A8EDFDAiJMDABlqC/jamhxvAAAAGmZjVEwAAAABAAAAAQAAAAEAAAAAAAAAAAH0A+gAADJXfawAAAARZmRBVAAAAAIIW2NgYGD4DwABBAEA0iEgKQAAABpmY1RMAAAAAwAAAAEAAAABAAAAAQAAAAEB9APoAAC4OHoxAAAAEWZkQVQAAAAECFtjYGBg+A8AAQQBACrja58AAAAaZmNUTAAAAAUAAAABAAAAAQAAAAIAAAACAfQD6AAA/fh01wAAABFmZEFUAAAABghbY2BgYPgPAAEEAQDLja8yAAAAAElFTkSuQmCC", +}; + +// Main test entry point. +function run_test() { + dump("Checking apng1A...\n"); + run_test_for(apng1A); + dump("Checking apng1B...\n"); + run_test_for(apng1B); + dump("Checking apng1C...\n"); + run_test_for(apng1C); + + dump("Checking apng2A...\n"); + run_test_for(apng2A); + dump("Checking apng2B...\n"); + run_test_for(apng2B); + + dump("Checking apng3...\n"); + run_test_for(apng3); +} + +function run_test_for(input) { + var encoder, dataURL; + + encoder = encodeImage(input); + dataURL = makeDataURL(encoder, "image/png"); + Assert.equal(dataURL, input.expected); +} + +function encodeImage(input) { + var encoder = + Cc["@mozilla.org/image/encoder;2?type=image/png"].createInstance(); + encoder.QueryInterface(Ci.imgIEncoder); + + var options = ""; + if (input.transparency) { + options += "transparency=" + input.transparency; + } + options += ";frames=" + input.frames.length; + options += ";skipfirstframe=" + (input.skipFirstFrame ? "yes" : "no"); + options += ";plays=" + input.plays; + encoder.startImageEncode(input.width, input.height, input.format, options); + + for (var i = 0; i < input.frames.length; i++) { + var frame = input.frames[i]; + + options = ""; + if (frame.transparency) { + options += "transparency=" + input.transparency; + } + options += ";delay=" + frame.delay; + options += ";dispose=" + frame.dispose; + options += ";blend=" + frame.blend; + if (frame.x_offset > 0) { + options += ";xoffset=" + frame.x_offset; + } + if (frame.y_offset > 0) { + options += ";yoffset=" + frame.y_offset; + } + + encoder.addImageFrame( + frame.pixels, + frame.pixels.length, + frame.width, + frame.height, + frame.stride, + frame.format, + options + ); + } + + encoder.endImageEncode(); + + return encoder; +} + +function makeDataURL(encoder, mimetype) { + var rawStream = encoder.QueryInterface(Ci.nsIInputStream); + + var stream = Cc["@mozilla.org/binaryinputstream;1"].createInstance(); + stream.QueryInterface(Ci.nsIBinaryInputStream); + + stream.setInputStream(rawStream); + + var bytes = stream.readByteArray(stream.available()); // returns int[] + + var base64String = toBase64(bytes); + + return "data:" + mimetype + ";base64," + base64String; +} + +/* toBase64 copied from extensions/xml-rpc/src/nsXmlRpcClient.js */ + +/* Convert data (an array of integers) to a Base64 string. */ +const toBase64Table = + // eslint-disable-next-line no-useless-concat + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" + "0123456789+/"; +const base64Pad = "="; +function toBase64(data) { + var result = ""; + var length = data.length; + var i; + // Convert every three bytes to 4 ascii characters. + for (i = 0; i < length - 2; i += 3) { + result += toBase64Table[data[i] >> 2]; + result += toBase64Table[((data[i] & 0x03) << 4) + (data[i + 1] >> 4)]; + result += toBase64Table[((data[i + 1] & 0x0f) << 2) + (data[i + 2] >> 6)]; + result += toBase64Table[data[i + 2] & 0x3f]; + } + + // Convert the remaining 1 or 2 bytes, pad out to 4 characters. + if (length % 3) { + i = length - (length % 3); + result += toBase64Table[data[i] >> 2]; + if (length % 3 == 2) { + result += toBase64Table[((data[i] & 0x03) << 4) + (data[i + 1] >> 4)]; + result += toBase64Table[(data[i + 1] & 0x0f) << 2]; + result += base64Pad; + } else { + result += toBase64Table[(data[i] & 0x03) << 4]; + result += base64Pad + base64Pad; + } + } + + return result; +} diff --git a/image/test/unit/test_encoder_png.js b/image/test/unit/test_encoder_png.js new file mode 100644 index 0000000000..73e91f573f --- /dev/null +++ b/image/test/unit/test_encoder_png.js @@ -0,0 +1,263 @@ +/* + * Test for PNG encoding in ImageLib + * + */ + +var png1A = { + // A 3x3 image, rows are red, green, blue. + // RGB format, transparency defaults. + + transparency: null, + + frames: [ + { + width: 3, + height: 3, + + format: Ci.imgIEncoder.INPUT_FORMAT_RGB, + stride: 9, + + pixels: [ + 255, 0, 0, 255, 0, 0, 255, 0, 0, 0, 255, 0, 0, 255, 0, 0, 255, 0, 0, 0, + 255, 0, 0, 255, 0, 0, 255, + ], + }, + ], + expected: + "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAADCAIAAADZSiLoAAAAFElEQVQIW2P8zwAFjAwwJiMDjAkANiQDAUpvlioAAAAASUVORK5CYII=", +}; + +var png1B = { + // A 3x3 image, rows are red, green, blue. + // RGB format, transparency=none. + + transparency: "none", + + frames: [ + { + width: 3, + height: 3, + + format: Ci.imgIEncoder.INPUT_FORMAT_RGB, + stride: 9, + + pixels: [ + 255, 0, 0, 255, 0, 0, 255, 0, 0, 0, 255, 0, 0, 255, 0, 0, 255, 0, 0, 0, + 255, 0, 0, 255, 0, 0, 255, + ], + }, + ], + expected: + "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAADCAIAAADZSiLoAAAAFElEQVQIW2P8zwAFjAwwJiMDjAkANiQDAUpvlioAAAAASUVORK5CYII=", +}; + +var png2A = { + // A 3x3 image, rows are: red, green, blue. Columns are: 0%, 33%, 66% transparent. + + transparency: null, + + frames: [ + { + width: 3, + height: 3, + + format: Ci.imgIEncoder.INPUT_FORMAT_RGBA, + stride: 12, + + pixels: [ + 255, 0, 0, 255, 255, 0, 0, 170, 255, 0, 0, 85, 0, 255, 0, 255, 0, 255, + 0, 170, 0, 255, 0, 85, 0, 0, 255, 255, 0, 0, 255, 170, 0, 0, 255, 85, + ], + }, + ], + expected: + "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAADCAYAAABWKLW/AAAAGUlEQVQIW2P8z8AARAyrQZgRyETiMPyHcwDKCwoAGxxLEQAAAABJRU5ErkJggg==", +}; + +var png2B = { + // A 3x3 image, rows are: red, green, blue. Columns are: 0%, 33%, 66% transparent, + // but transparency will be ignored. + + transparency: "none", + + frames: [ + { + width: 3, + height: 3, + + format: Ci.imgIEncoder.INPUT_FORMAT_RGBA, + stride: 12, + + pixels: [ + 255, 0, 0, 255, 255, 0, 0, 170, 255, 0, 0, 85, 0, 255, 0, 255, 0, 255, + 0, 170, 0, 255, 0, 85, 0, 0, 255, 255, 0, 0, 255, 170, 0, 0, 255, 85, + ], + }, + ], + expected: + "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAADCAIAAADZSiLoAAAAFElEQVQIW2P8zwAFjAwwJiMDjAkANiQDAUpvlioAAAAASUVORK5CYII=", +}; + +// Main test entry point. +function run_test() { + dump("Checking png1A...\n"); + run_test_for(png1A); + dump("Checking png1B...\n"); + run_test_for(png1B); + dump("Checking png2A...\n"); + run_test_for(png2A); + dump("Checking png2B...\n"); + run_test_for(png2B); +} + +function run_test_for(input) { + var encoder, dataURL; + + encoder = encodeImage(input); + dataURL = makeDataURL(encoder, "image/png"); + Assert.equal(dataURL, input.expected); + + encoder = encodeImageAsync(input); + dataURL = makeDataURLFromAsync(encoder, "image/png", input.expected); +} + +function encodeImage(input) { + var encoder = + Cc["@mozilla.org/image/encoder;2?type=image/png"].createInstance(); + encoder.QueryInterface(Ci.imgIEncoder); + + var options = ""; + if (input.transparency) { + options += "transparency=" + input.transparency; + } + + var frame = input.frames[0]; + encoder.initFromData( + frame.pixels, + frame.pixels.length, + frame.width, + frame.height, + frame.stride, + frame.format, + options + ); + return encoder; +} + +function _encodeImageAsyncFactory(frame, options, encoder) { + function finishEncode() { + encoder.addImageFrame( + frame.pixels, + frame.pixels.length, + frame.width, + frame.height, + frame.stride, + frame.format, + options + ); + encoder.endImageEncode(); + } + return finishEncode; +} + +function encodeImageAsync(input) { + var encoder = + Cc["@mozilla.org/image/encoder;2?type=image/png"].createInstance(); + encoder.QueryInterface(Ci.imgIEncoder); + + var options = ""; + if (input.transparency) { + options += "transparency=" + input.transparency; + } + + var frame = input.frames[0]; + encoder.startImageEncode(frame.width, frame.height, frame.format, options); + + do_timeout(50, _encodeImageAsyncFactory(frame, options, encoder)); + return encoder; +} + +function makeDataURL(encoder, mimetype) { + var rawStream = encoder.QueryInterface(Ci.nsIInputStream); + + var stream = Cc["@mozilla.org/binaryinputstream;1"].createInstance(); + stream.QueryInterface(Ci.nsIBinaryInputStream); + + stream.setInputStream(rawStream); + + var bytes = stream.readByteArray(stream.available()); // returns int[] + + var base64String = toBase64(bytes); + + return "data:" + mimetype + ";base64," + base64String; +} + +function makeDataURLFromAsync(encoder, mimetype, expected) { + do_test_pending(); + var rawStream = encoder.QueryInterface(Ci.nsIAsyncInputStream); + + var currentThread = + Cc["@mozilla.org/thread-manager;1"].getService().currentThread; + + var bytes = []; + + var binarystream = Cc["@mozilla.org/binaryinputstream;1"].createInstance(); + binarystream.QueryInterface(Ci.nsIBinaryInputStream); + + var asyncReader = { + onInputStreamReady(stream) { + binarystream.setInputStream(stream); + var available = 0; + try { + available = stream.available(); + } catch (e) {} + + if (available > 0) { + bytes = bytes.concat(binarystream.readByteArray(available)); + stream.asyncWait(this, 0, 0, currentThread); + } else { + var base64String = toBase64(bytes); + var dataURL = "data:" + mimetype + ";base64," + base64String; + Assert.equal(dataURL, expected); + do_test_finished(); + } + }, + }; + rawStream.asyncWait(asyncReader, 0, 0, currentThread); +} + +/* toBase64 copied from extensions/xml-rpc/src/nsXmlRpcClient.js */ + +/* Convert data (an array of integers) to a Base64 string. */ +const toBase64Table = + // eslint-disable-next-line no-useless-concat + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" + "0123456789+/"; +const base64Pad = "="; +function toBase64(data) { + var result = ""; + var length = data.length; + var i; + // Convert every three bytes to 4 ascii characters. + for (i = 0; i < length - 2; i += 3) { + result += toBase64Table[data[i] >> 2]; + result += toBase64Table[((data[i] & 0x03) << 4) + (data[i + 1] >> 4)]; + result += toBase64Table[((data[i + 1] & 0x0f) << 2) + (data[i + 2] >> 6)]; + result += toBase64Table[data[i + 2] & 0x3f]; + } + + // Convert the remaining 1 or 2 bytes, pad out to 4 characters. + if (length % 3) { + i = length - (length % 3); + result += toBase64Table[data[i] >> 2]; + if (length % 3 == 2) { + result += toBase64Table[((data[i] & 0x03) << 4) + (data[i + 1] >> 4)]; + result += toBase64Table[(data[i + 1] & 0x0f) << 2]; + result += base64Pad; + } else { + result += toBase64Table[(data[i] & 0x03) << 4]; + result += base64Pad + base64Pad; + } + } + + return result; +} diff --git a/image/test/unit/test_imgtools.js b/image/test/unit/test_imgtools.js new file mode 100644 index 0000000000..689a4ed56f --- /dev/null +++ b/image/test/unit/test_imgtools.js @@ -0,0 +1,871 @@ +/* + * Tests for imgITools + */ + +const { NetUtil } = ChromeUtils.importESModule( + "resource://gre/modules/NetUtil.sys.mjs" +); + +/* + * dumpToFile() + * + * For test development, dumps the specified array to a file. + * Call |dumpToFile(outData);| in a test to file to a file. + */ +// eslint-disable-next-line no-unused-vars +function dumpToFile(aData) { + var outputFile = do_get_cwd(); + outputFile.append("testdump.webp"); + + var outputStream = Cc[ + "@mozilla.org/network/file-output-stream;1" + ].createInstance(Ci.nsIFileOutputStream); + // WR_ONLY|CREATE|TRUNC + outputStream.init(outputFile, 0x02 | 0x08 | 0x20, 0o644, null); + + var bos = Cc["@mozilla.org/binaryoutputstream;1"].createInstance( + Ci.nsIBinaryOutputStream + ); + bos.setOutputStream(outputStream); + + bos.writeByteArray(aData); + + outputStream.close(); +} + +/* + * getFileInputStream() + * + * Returns an input stream for the specified file. + */ +function getFileInputStream(aFile) { + var inputStream = Cc[ + "@mozilla.org/network/file-input-stream;1" + ].createInstance(Ci.nsIFileInputStream); + // init the stream as RD_ONLY, -1 == default permissions. + inputStream.init(aFile, 0x01, -1, null); + + // Blah. The image decoders use ReadSegments, which isn't implemented on + // file input streams. Use a buffered stream to make it work. + var bis = Cc["@mozilla.org/network/buffered-input-stream;1"].createInstance( + Ci.nsIBufferedInputStream + ); + bis.init(inputStream, 1024); + + return bis; +} + +/* + * streamToArray() + * + * Consumes an input stream, and returns its bytes as an array. + */ +function streamToArray(aStream) { + var size = aStream.available(); + + // use a binary input stream to grab the bytes. + var bis = Cc["@mozilla.org/binaryinputstream;1"].createInstance( + Ci.nsIBinaryInputStream + ); + bis.setInputStream(aStream); + + var bytes = bis.readByteArray(size); + if (size != bytes.length) { + throw new Error("Didn't read expected number of bytes"); + } + + return bytes; +} + +/* + * compareArrays + * + * Compares two arrays, and throws if there's a difference. + */ +function compareArrays(aArray1, aArray2) { + Assert.equal(aArray1.length, aArray2.length); + + for (var i = 0; i < aArray1.length; i++) { + if (aArray1[i] != aArray2[i]) { + throw new Error("arrays differ at index " + i); + } + } +} + +/* + * checkExpectedError + * + * Checks to see if a thrown error was expected or not, and if it + * matches the expected value. + */ +function checkExpectedError(aExpectedError, aActualError) { + if (aExpectedError) { + if (!aActualError) { + throw new Error("Didn't throw as expected (" + aExpectedError + ")"); + } + + if (!aExpectedError.test(aActualError)) { + throw new Error("Threw (" + aActualError + "), not (" + aExpectedError); + } + + // We got the expected error, so make a note in the test log. + dump("...that error was expected.\n\n"); + } else if (aActualError) { + throw new Error("Threw unexpected error: " + aActualError); + } +} + +function run_test() { + try { + /* ========== 0 ========== */ + var testnum = 0; + var testdesc = "imgITools setup"; + var err = null; + + var imgTools = Cc["@mozilla.org/image/tools;1"].getService(Ci.imgITools); + + if (!imgTools) { + throw new Error("Couldn't get imgITools service"); + } + + // Ugh, this is an ugly hack. The pixel values we get in Windows are sometimes + // +/- 1 value compared to other platforms, so we need to compare against a + // different set of reference images. nsIXULRuntime.OS doesn't seem to be + // available in xpcshell, so we'll use this as a kludgy way to figure out if + // we're running on Windows. + var isWindows = mozinfo.os == "win"; + + /* ========== 1 ========== */ + testnum++; + testdesc = "test decoding a PNG"; + + // 64x64 png, 8415 bytes. + var imgName = "image1.png"; + var inMimeType = "image/png"; + var imgFile = do_get_file(imgName); + + var istream = getFileInputStream(imgFile); + Assert.equal(istream.available(), 8415); + + var buffer = NetUtil.readInputStreamToString(istream, istream.available()); + var container = imgTools.decodeImageFromBuffer( + buffer, + buffer.length, + inMimeType + ); + + // It's not easy to look at the pixel values from JS, so just + // check the container's size. + Assert.equal(container.width, 64); + Assert.equal(container.height, 64); + + /* ========== 2 ========== */ + testnum++; + testdesc = "test encoding a scaled JPEG"; + + // we'll reuse the container from the previous test + istream = imgTools.encodeScaledImage(container, "image/jpeg", 16, 16); + + var encodedBytes = streamToArray(istream); + // Get bytes for expected result + var refName = "image1png16x16.jpg"; + var refFile = do_get_file(refName); + istream = getFileInputStream(refFile); + Assert.equal(istream.available(), 1050); + var referenceBytes = streamToArray(istream); + + // compare the encoder's output to the reference file. + compareArrays(encodedBytes, referenceBytes); + + /* ========== 3 ========== */ + testnum++; + testdesc = "test encoding an unscaled JPEG"; + + // we'll reuse the container from the previous test + istream = imgTools.encodeImage(container, "image/jpeg"); + encodedBytes = streamToArray(istream); + + // Get bytes for expected result + refName = "image1png64x64.jpg"; + refFile = do_get_file(refName); + istream = getFileInputStream(refFile); + Assert.equal(istream.available(), 4507); + referenceBytes = streamToArray(istream); + + // compare the encoder's output to the reference file. + compareArrays(encodedBytes, referenceBytes); + + /* ========== 4 ========== */ + testnum++; + testdesc = "test decoding a JPEG"; + + // 32x32 jpeg, 3494 bytes. + imgName = "image2.jpg"; + inMimeType = "image/jpeg"; + imgFile = do_get_file(imgName); + + istream = getFileInputStream(imgFile); + Assert.equal(istream.available(), 3494); + + buffer = NetUtil.readInputStreamToString(istream, istream.available()); + container = imgTools.decodeImageFromBuffer( + buffer, + buffer.length, + inMimeType + ); + + // It's not easy to look at the pixel values from JS, so just + // check the container's size. + Assert.equal(container.width, 32); + Assert.equal(container.height, 32); + + /* ========== 5 ========== */ + testnum++; + testdesc = "test encoding a scaled PNG"; + + if (!isWindows) { + // we'll reuse the container from the previous test + istream = imgTools.encodeScaledImage(container, "image/png", 16, 16); + + encodedBytes = streamToArray(istream); + // Get bytes for expected result + refName = isWindows ? "image2jpg16x16-win.png" : "image2jpg16x16.png"; + refFile = do_get_file(refName); + istream = getFileInputStream(refFile); + Assert.equal(istream.available(), 955); + referenceBytes = streamToArray(istream); + + // compare the encoder's output to the reference file. + compareArrays(encodedBytes, referenceBytes); + } + + /* ========== 6 ========== */ + testnum++; + testdesc = "test encoding an unscaled PNG"; + + if (!isWindows) { + // we'll reuse the container from the previous test + istream = imgTools.encodeImage(container, "image/png"); + encodedBytes = streamToArray(istream); + + // Get bytes for expected result + refName = isWindows ? "image2jpg32x32-win.png" : "image2jpg32x32.png"; + refFile = do_get_file(refName); + istream = getFileInputStream(refFile); + Assert.equal(istream.available(), 3026); + referenceBytes = streamToArray(istream); + + // compare the encoder's output to the reference file. + compareArrays(encodedBytes, referenceBytes); + } + + /* ========== 7 ========== */ + testnum++; + testdesc = "test decoding a ICO"; + + // 16x16 ico, 1406 bytes. + imgName = "image3.ico"; + inMimeType = "image/x-icon"; + imgFile = do_get_file(imgName); + + istream = getFileInputStream(imgFile); + Assert.equal(istream.available(), 1406); + + buffer = NetUtil.readInputStreamToString(istream, istream.available()); + container = imgTools.decodeImageFromBuffer( + buffer, + buffer.length, + inMimeType + ); + + // It's not easy to look at the pixel values from JS, so just + // check the container's size. + Assert.equal(container.width, 16); + Assert.equal(container.height, 16); + + /* ========== 8 ========== */ + testnum++; + testdesc = "test encoding a scaled PNG"; // note that we're scaling UP + + // we'll reuse the container from the previous test + istream = imgTools.encodeScaledImage(container, "image/png", 32, 32); + encodedBytes = streamToArray(istream); + + // Get bytes for expected result + refName = "image3ico32x32.png"; + refFile = do_get_file(refName); + istream = getFileInputStream(refFile); + Assert.equal(istream.available(), 2280); + referenceBytes = streamToArray(istream); + + // compare the encoder's output to the reference file. + compareArrays(encodedBytes, referenceBytes); + + /* ========== 9 ========== */ + testnum++; + testdesc = "test encoding an unscaled PNG"; + + // we'll reuse the container from the previous test + istream = imgTools.encodeImage(container, "image/png"); + encodedBytes = streamToArray(istream); + + // Get bytes for expected result + refName = "image3ico16x16.png"; + refFile = do_get_file(refName); + istream = getFileInputStream(refFile); + Assert.equal(istream.available(), 520); + referenceBytes = streamToArray(istream); + + // compare the encoder's output to the reference file. + compareArrays(encodedBytes, referenceBytes); + + /* ========== 10 ========== */ + testnum++; + testdesc = "test decoding a GIF"; + + // 32x32 gif, 1809 bytes. + imgName = "image4.gif"; + inMimeType = "image/gif"; + imgFile = do_get_file(imgName); + + istream = getFileInputStream(imgFile); + Assert.equal(istream.available(), 1809); + + buffer = NetUtil.readInputStreamToString(istream, istream.available()); + container = imgTools.decodeImageFromBuffer( + buffer, + buffer.length, + inMimeType + ); + + // It's not easy to look at the pixel values from JS, so just + // check the container's size. + Assert.equal(container.width, 32); + Assert.equal(container.height, 32); + + /* ========== 11 ========== */ + testnum++; + testdesc = + "test encoding an unscaled ICO with format options " + + "(format=bmp;bpp=32)"; + + // we'll reuse the container from the previous test + istream = imgTools.encodeImage( + container, + "image/vnd.microsoft.icon", + "format=bmp;bpp=32" + ); + encodedBytes = streamToArray(istream); + + // Get bytes for expected result + refName = "image4gif32x32bmp32bpp.ico"; + refFile = do_get_file(refName); + istream = getFileInputStream(refFile); + Assert.equal(istream.available(), 4286); + referenceBytes = streamToArray(istream); + + // compare the encoder's output to the reference file. + compareArrays(encodedBytes, referenceBytes); + + /* ========== 12 ========== */ + testnum++; + testdesc = + // eslint-disable-next-line no-useless-concat + "test encoding a scaled ICO with format options " + "(format=bmp;bpp=32)"; + + // we'll reuse the container from the previous test + istream = imgTools.encodeScaledImage( + container, + "image/vnd.microsoft.icon", + 16, + 16, + "format=bmp;bpp=32" + ); + encodedBytes = streamToArray(istream); + + // Get bytes for expected result + refName = "image4gif16x16bmp32bpp.ico"; + refFile = do_get_file(refName); + istream = getFileInputStream(refFile); + Assert.equal(istream.available(), 1150); + referenceBytes = streamToArray(istream); + + // compare the encoder's output to the reference file. + compareArrays(encodedBytes, referenceBytes); + + /* ========== 13 ========== */ + testnum++; + testdesc = + "test encoding an unscaled ICO with format options " + + "(format=bmp;bpp=24)"; + + // we'll reuse the container from the previous test + istream = imgTools.encodeImage( + container, + "image/vnd.microsoft.icon", + "format=bmp;bpp=24" + ); + encodedBytes = streamToArray(istream); + + // Get bytes for expected result + refName = "image4gif32x32bmp24bpp.ico"; + refFile = do_get_file(refName); + istream = getFileInputStream(refFile); + Assert.equal(istream.available(), 3262); + referenceBytes = streamToArray(istream); + + // compare the encoder's output to the reference file. + compareArrays(encodedBytes, referenceBytes); + + /* ========== 14 ========== */ + testnum++; + testdesc = + // eslint-disable-next-line no-useless-concat + "test encoding a scaled ICO with format options " + "(format=bmp;bpp=24)"; + + // we'll reuse the container from the previous test + istream = imgTools.encodeScaledImage( + container, + "image/vnd.microsoft.icon", + 16, + 16, + "format=bmp;bpp=24" + ); + encodedBytes = streamToArray(istream); + + // Get bytes for expected result + refName = "image4gif16x16bmp24bpp.ico"; + refFile = do_get_file(refName); + istream = getFileInputStream(refFile); + Assert.equal(istream.available(), 894); + referenceBytes = streamToArray(istream); + + // compare the encoder's output to the reference file. + compareArrays(encodedBytes, referenceBytes); + + /* ========== 15 ========== */ + testnum++; + testdesc = "test cropping a JPG"; + + // 32x32 jpeg, 3494 bytes. + imgName = "image2.jpg"; + inMimeType = "image/jpeg"; + imgFile = do_get_file(imgName); + + istream = getFileInputStream(imgFile); + Assert.equal(istream.available(), 3494); + + buffer = NetUtil.readInputStreamToString(istream, istream.available()); + container = imgTools.decodeImageFromBuffer( + buffer, + buffer.length, + inMimeType + ); + + // It's not easy to look at the pixel values from JS, so just + // check the container's size. + Assert.equal(container.width, 32); + Assert.equal(container.height, 32); + + // encode a cropped image + istream = imgTools.encodeCroppedImage( + container, + "image/jpeg", + 0, + 0, + 16, + 16 + ); + encodedBytes = streamToArray(istream); + + // Get bytes for expected result + refName = "image2jpg16x16cropped.jpg"; + refFile = do_get_file(refName); + istream = getFileInputStream(refFile); + Assert.equal(istream.available(), 879); + referenceBytes = streamToArray(istream); + + // compare the encoder's output to the reference file. + compareArrays(encodedBytes, referenceBytes); + + /* ========== 16 ========== */ + testnum++; + testdesc = "test cropping a JPG with an offset"; + + // we'll reuse the container from the previous test + istream = imgTools.encodeCroppedImage( + container, + "image/jpeg", + 16, + 16, + 16, + 16 + ); + encodedBytes = streamToArray(istream); + + // Get bytes for expected result + refName = "image2jpg16x16cropped2.jpg"; + refFile = do_get_file(refName); + istream = getFileInputStream(refFile); + Assert.equal(istream.available(), 878); + referenceBytes = streamToArray(istream); + + // compare the encoder's output to the reference file. + compareArrays(encodedBytes, referenceBytes); + + /* ========== 17 ========== */ + testnum++; + testdesc = "test cropping a JPG without a given height"; + + // we'll reuse the container from the previous test + istream = imgTools.encodeCroppedImage(container, "image/jpeg", 0, 0, 16, 0); + encodedBytes = streamToArray(istream); + + // Get bytes for expected result + refName = "image2jpg16x32cropped3.jpg"; + refFile = do_get_file(refName); + istream = getFileInputStream(refFile); + Assert.equal(istream.available(), 1127); + referenceBytes = streamToArray(istream); + + // compare the encoder's output to the reference file. + compareArrays(encodedBytes, referenceBytes); + + /* ========== 18 ========== */ + testnum++; + testdesc = "test cropping a JPG without a given width"; + + // we'll reuse the container from the previous test + istream = imgTools.encodeCroppedImage(container, "image/jpeg", 0, 0, 0, 16); + encodedBytes = streamToArray(istream); + + // Get bytes for expected result + refName = "image2jpg32x16cropped4.jpg"; + refFile = do_get_file(refName); + istream = getFileInputStream(refFile); + Assert.equal(istream.available(), 1135); + referenceBytes = streamToArray(istream); + + // compare the encoder's output to the reference file. + compareArrays(encodedBytes, referenceBytes); + + /* ========== 19 ========== */ + testnum++; + testdesc = "test cropping a JPG without a given width and height"; + + // we'll reuse the container from the previous test + istream = imgTools.encodeCroppedImage(container, "image/jpeg", 0, 0, 0, 0); + encodedBytes = streamToArray(istream); + + // Get bytes for expected result + refName = "image2jpg32x32.jpg"; + refFile = do_get_file(refName); + istream = getFileInputStream(refFile); + Assert.equal(istream.available(), 1634); + referenceBytes = streamToArray(istream); + + // compare the encoder's output to the reference file. + compareArrays(encodedBytes, referenceBytes); + + /* ========== 20 ========== */ + testnum++; + testdesc = "test scaling a JPG without a given width"; + + // we'll reuse the container from the previous test + istream = imgTools.encodeScaledImage(container, "image/jpeg", 0, 16); + encodedBytes = streamToArray(istream); + + // Get bytes for expected result + refName = "image2jpg32x16scaled.jpg"; + refFile = do_get_file(refName); + istream = getFileInputStream(refFile); + Assert.equal(istream.available(), 1227); + referenceBytes = streamToArray(istream); + + // compare the encoder's output to the reference file. + compareArrays(encodedBytes, referenceBytes); + + /* ========== 21 ========== */ + testnum++; + testdesc = "test scaling a JPG without a given height"; + + // we'll reuse the container from the previous test + istream = imgTools.encodeScaledImage(container, "image/jpeg", 16, 0); + encodedBytes = streamToArray(istream); + + // Get bytes for expected result + refName = "image2jpg16x32scaled.jpg"; + refFile = do_get_file(refName); + istream = getFileInputStream(refFile); + Assert.equal(istream.available(), 1219); + referenceBytes = streamToArray(istream); + + // compare the encoder's output to the reference file. + compareArrays(encodedBytes, referenceBytes); + + /* ========== 22 ========== */ + testnum++; + testdesc = "test scaling a JPG without a given width and height"; + + // we'll reuse the container from the previous test + istream = imgTools.encodeScaledImage(container, "image/jpeg", 0, 0); + encodedBytes = streamToArray(istream); + + // Get bytes for expected result + refName = "image2jpg32x32.jpg"; + refFile = do_get_file(refName); + istream = getFileInputStream(refFile); + Assert.equal(istream.available(), 1634); + referenceBytes = streamToArray(istream); + + // compare the encoder's output to the reference file. + compareArrays(encodedBytes, referenceBytes); + + /* ========== 23 ========== */ + testnum++; + testdesc = "test invalid arguments for cropping"; + + var numErrors = 0; + + try { + // width/height can't be negative + imgTools.encodeScaledImage(container, "image/jpeg", -1, -1); + } catch (e) { + numErrors++; + } + + try { + // offsets can't be negative + imgTools.encodeCroppedImage(container, "image/jpeg", -1, -1, 16, 16); + } catch (e) { + numErrors++; + } + + try { + // width/height can't be negative + imgTools.encodeCroppedImage(container, "image/jpeg", 0, 0, -1, -1); + } catch (e) { + numErrors++; + } + + try { + // out of bounds + imgTools.encodeCroppedImage(container, "image/jpeg", 17, 17, 16, 16); + } catch (e) { + numErrors++; + } + + try { + // out of bounds + imgTools.encodeCroppedImage(container, "image/jpeg", 0, 0, 33, 33); + } catch (e) { + numErrors++; + } + + try { + // out of bounds + imgTools.encodeCroppedImage(container, "image/jpeg", 1, 1, 0, 0); + } catch (e) { + numErrors++; + } + + Assert.equal(numErrors, 6); + + /* ========== 24 ========== */ + testnum++; + testdesc = "test encoding webp"; + + // Load picture that we want to convert + imgName = "image1.png"; + inMimeType = "image/png"; + imgFile = do_get_file(imgName); + + istream = getFileInputStream(imgFile); + Assert.equal(istream.available(), 8415); + + buffer = NetUtil.readInputStreamToString(istream, istream.available()); + container = imgTools.decodeImageFromBuffer( + buffer, + buffer.length, + inMimeType + ); + + // Convert image to webp + istream = imgTools.encodeImage(container, "image/webp"); + encodedBytes = streamToArray(istream); + + // Get bytes for expected result + refName = "image1.webp"; + refFile = do_get_file(refName); + istream = getFileInputStream(refFile); + Assert.equal(istream.available(), 3206); + referenceBytes = streamToArray(istream); + + // compare the encoder's output to the reference file. + compareArrays(encodedBytes, referenceBytes); + + /* ========== 25 ========== */ + testnum++; + testdesc = "test encoding webp with quality parameter"; + + // Load picture that we want to convert + imgName = "image1.png"; + inMimeType = "image/png"; + imgFile = do_get_file(imgName); + + istream = getFileInputStream(imgFile); + Assert.equal(istream.available(), 8415); + + buffer = NetUtil.readInputStreamToString(istream, istream.available()); + container = imgTools.decodeImageFromBuffer( + buffer, + buffer.length, + inMimeType + ); + + // Convert image to webp + istream = imgTools.encodeImage(container, "image/webp", "quality=50"); + encodedBytes = streamToArray(istream); + + // Get bytes for expected result + refName = "image1quality50.webp"; + refFile = do_get_file(refName); + istream = getFileInputStream(refFile); + Assert.equal(istream.available(), 1944); + referenceBytes = streamToArray(istream); + + // compare the encoder's output to the reference file. + compareArrays(encodedBytes, referenceBytes); + + /* ========== bug 363986 ========== */ + testnum = 363986; + testdesc = "test PNG and JPEG and WEBP encoders' Read/ReadSegments methods"; + + var testData = [ + { + preImage: "image3.ico", + preImageMimeType: "image/x-icon", + refImage: "image3ico16x16.png", + refImageMimeType: "image/png", + }, + { + preImage: "image1.png", + preImageMimeType: "image/png", + refImage: "image1png64x64.jpg", + refImageMimeType: "image/jpeg", + }, + { + preImage: "image1.png", + preImageMimeType: "image/png", + refImage: "image1.webp", + refImageMimeType: "image/webp", + }, + ]; + + for (var i = 0; i < testData.length; ++i) { + var dict = testData[i]; + + imgFile = do_get_file(dict.refImage); + istream = getFileInputStream(imgFile); + var refBytes = streamToArray(istream); + + imgFile = do_get_file(dict.preImage); + istream = getFileInputStream(imgFile); + + buffer = NetUtil.readInputStreamToString(istream, istream.available()); + container = imgTools.decodeImageFromBuffer( + buffer, + buffer.length, + dict.preImageMimeType + ); + + istream = imgTools.encodeImage(container, dict.refImageMimeType); + + var sstream = Cc["@mozilla.org/storagestream;1"].createInstance( + Ci.nsIStorageStream + ); + sstream.init(4096, 4294967295, null); + var ostream = sstream.getOutputStream(0); + var bostream = Cc[ + "@mozilla.org/network/buffered-output-stream;1" + ].createInstance(Ci.nsIBufferedOutputStream); + + // use a tiny buffer to make sure the image data doesn't fully fit in it + bostream.init(ostream, 8); + + bostream.writeFrom(istream, istream.available()); + bostream.flush(); + bostream.close(); + + var encBytes = streamToArray(sstream.newInputStream(0)); + + compareArrays(refBytes, encBytes); + } + + /* ========== bug 413512 ========== */ + testnum = 413512; + testdesc = "test decoding bad favicon (bug 413512)"; + + imgName = "bug413512.ico"; + inMimeType = "image/x-icon"; + imgFile = do_get_file(imgName); + + istream = getFileInputStream(imgFile); + Assert.equal(istream.available(), 17759); + var errsrc = "none"; + + try { + buffer = NetUtil.readInputStreamToString(istream, istream.available()); + container = imgTools.decodeImageFromBuffer( + buffer, + buffer.length, + inMimeType + ); + + // We expect to hit an error during encoding because the ICO header of the + // image is fine, but the actual resources are corrupt. Since + // decodeImageFromBuffer() only performs a metadata decode, it doesn't decode + // far enough to realize this, but we'll find out when we do a full decode + // during encodeImage(). + try { + istream = imgTools.encodeImage(container, "image/png"); + } catch (e) { + err = e; + errsrc = "encode"; + } + } catch (e) { + err = e; + errsrc = "decode"; + } + + Assert.equal(errsrc, "encode"); + checkExpectedError(/NS_ERROR_FAILURE/, err); + + /* ========== bug 815359 ========== */ + testnum = 815359; + testdesc = "test correct ico hotspots (bug 815359)"; + + imgName = "bug815359.ico"; + inMimeType = "image/x-icon"; + imgFile = do_get_file(imgName); + + istream = getFileInputStream(imgFile); + Assert.equal(istream.available(), 4286); + + buffer = NetUtil.readInputStreamToString(istream, istream.available()); + container = imgTools.decodeImageFromBuffer( + buffer, + buffer.length, + inMimeType + ); + + Assert.equal(container.hotspotX, 10); + Assert.equal(container.hotspotY, 9); + + /* ========== end ========== */ + } catch (e) { + throw new Error( + "FAILED in test #" + testnum + " -- " + testdesc + ": " + e + ); + } +} diff --git a/image/test/unit/test_moz_icon_uri.js b/image/test/unit/test_moz_icon_uri.js new file mode 100644 index 0000000000..0111d71d2a --- /dev/null +++ b/image/test/unit/test_moz_icon_uri.js @@ -0,0 +1,157 @@ +/* + * Test icon URI functionality + * + */ + +// There are 3 types of valid icon URIs: +// 1. moz-icon:[valid URL] +// 2. moz-icon://[file name] +// 3. moz-icon://stock/[icon identifier] +// Plus we also support moz-icon://[valid URL] for backwards compatibility. + +// Main test entry point. + +function run_test() { + let ioService = Services.io; + let currentSpec = ""; // the uri spec that we're currently testing + let exception = false; // whether or not an exception was thrown + let uri = null; // the current URI + let iconURI = null; // the current icon URI + + // Note that if the scheme is not correct the ioservice won't even create an icon URI + // so don't bother testing incorrect schemes here. + + // Make sure a valid file name icon URI can be created and that we can obtain + // all arguments, the spec, and the file extension. + currentSpec = "moz-icon://foo.html?contentType=bar&size=button&state=normal"; + try { + uri = ioService.newURI(currentSpec); + } catch (e) { + exception = true; + } + Assert.equal(exception, false); + exception = false; // reset exception value + + iconURI = uri.QueryInterface(Ci.nsIMozIconURI); + Assert.equal(iconURI.iconSize, "button"); + Assert.equal(iconURI.iconState, "normal"); + Assert.equal(iconURI.contentType, "bar"); + Assert.equal(iconURI.fileExtension, ".html"); + + // Make sure a valid file name icon URI can be created with a numeric size, + // and make sure the numeric size is handled properly + currentSpec = "moz-icon://foo.html?size=3"; + try { + uri = ioService.newURI(currentSpec); + } catch (e) { + exception = true; + } + Assert.equal(exception, false); + exception = false; // reset exception value + + iconURI = uri.QueryInterface(Ci.nsIMozIconURI); + Assert.equal(iconURI.iconSize, ""); + Assert.equal(iconURI.imageSize, 3); + + // Make sure a valid stock icon URI can be created and that we can obtain + // the stock icon's name. + currentSpec = "moz-icon://stock/foo"; + try { + uri = ioService.newURI(currentSpec); + } catch (e) { + exception = true; + } + Assert.equal(exception, false); + exception = false; // reset exception value + + iconURI = uri.QueryInterface(Ci.nsIMozIconURI); + Assert.equal(iconURI.stockIcon, "foo"); + + // Make sure an invalid stock icon URI, missing icon identifier, throws. + currentSpec = "moz-icon://stock/?size=3"; + try { + uri = ioService.newURI(currentSpec); + } catch (e) { + exception = true; + } + Assert.ok(exception); + exception = false; // reset exception value + + // Make sure a valid file URL icon URI can be created and that we can obtain + // the URL and QI it to an nsIFileURL. + currentSpec = "moz-icon:file://foo.txt"; + try { + uri = ioService.newURI(currentSpec); + } catch (e) { + exception = true; + } + Assert.equal(exception, false); + exception = false; // reset exception value + + iconURI = uri.QueryInterface(Ci.nsIMozIconURI); + let fileURL = null; + try { + fileURL = iconURI.iconURL.QueryInterface(Ci.nsIFileURL); + } catch (e) { + exception = true; + } + Assert.equal(exception, false); + exception = false; // reset exception value + + Assert.notEqual(fileURL, null); + + // Now test a file URI which has been created with an extra // + currentSpec = "moz-icon://file://foo.txt"; + try { + uri = ioService.newURI(currentSpec); + } catch (e) { + exception = true; + } + Assert.equal(exception, false); + exception = false; // reset exception value + + iconURI = uri.QueryInterface(Ci.nsIMozIconURI); + fileURL = null; + try { + fileURL = iconURI.iconURL.QueryInterface(Ci.nsIFileURL); + } catch (e) { + exception = true; + } + Assert.equal(exception, false); + exception = false; // reset exception value + + Assert.notEqual(fileURL, null); + + // Now test a simple invalid icon URI. This should fail. + currentSpec = "moz-icon:foo"; + try { + uri = ioService.newURI(currentSpec); + } catch (e) { + exception = true; + } + Assert.equal(exception, true); + exception = false; // reset exception value + + // Now test an icon URI that has a URI for a path but that is not a URL. This should fail. + // This is png data for a little red dot that I got from wikipedia. + currentSpec = + "moz-icon:data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9YGARc5KB0XV+IAAAAddEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIFRoZSBHSU1Q72QlbgAAAF1JREFUGNO9zL0NglAAxPEfdLTs4BZM4DIO4C7OwQg2JoQ9LE1exdlYvBBeZ7jqch9//q1uH4TLzw4d6+ErXMMcXuHWxId3KOETnnXXV6MJpcq2MLaI97CER3N0vr4MkhoXe0rZigAAAABJRU5ErkJggg=="; + try { + uri = ioService.newURI(currentSpec); + } catch (e) { + exception = true; + } + Assert.equal(exception, true); + exception = false; // reset exception value + + // Now test a URI that should be a file name but is ridiculously long. This should fail. + currentSpec = + "moz-icon://data:application/vnd.ms-excel;base64,PHhtbCB2ZXJzaW9uPSIxLjAiIGVuY29kaW5nPSJ1dGYtOCI+PHNzOldvcmtib29rIHhtbG5zOnNzPSJ1cm46c2NoZW1hcy1taWNyb3NvZnQtY29tOm9mZmljZTpzcHJlYWRzaGVldCIgeG1sbnM6eD0idXJuOnNjaGVtYXMtbWljcm9zb2Z0LWNvbTpvZmZpY2U6ZXhjZWwiIHhtbG5zOm89InVybjpzY2hlbWFzLW1pY3Jvc29mdC1jb206b2ZmaWNlOm9mZmljZSI+PG86RG9jdW1lbnRQcm9wZXJ0aWVzPjxvOlRpdGxlPkFycmF5IEdyaWQ8L286VGl0bGU+PC9vOkRvY3VtZW50UHJvcGVydGllcz48c3M6RXhjZWxXb3JrYm9vaz48c3M6V2luZG93SGVpZ2h0PjkwMDA8L3NzOldpbmRvd0hlaWdodD48c3M6V2luZG93V2lkdGg+MTc0ODA8L3NzOldpbmRvd1dpZHRoPjxzczpQcm90ZWN0U3RydWN0dXJlPkZhbHNlPC9zczpQcm90ZWN0U3RydWN0dXJlPjxzczpQcm90ZWN0V2luZG93cz5GYWxzZTwvc3M6UHJvdGVjdFdpbmRvd3M+PC9zczpFeGNlbFdvcmtib29rPjxzczpTdHlsZXM+PHNzOlN0eWxlIHNzOklEPSJEZWZhdWx0Ij48c3M6QWxpZ25tZW50IHNzOlZlcnRpY2FsPSJUb3AiIHNzOldyYXBUZXh0PSIxIiAvPjxzczpGb250IHNzOkZvbnROYW1lPSJhcmlhbCIgc3M6U2l6ZT0iMTAiIC8+PHNzOkJvcmRlcnM+PHNzOkJvcmRlciBzczpDb2xvcj0iI2U0ZTRlNCIgc3M6V2VpZ2h0PSIxIiBzczpMaW5lU3R5bGU9IkNvbnRpbnVvdXMiIHNzOlBvc2l0aW9uPSJUb3AiIC8+PHNzOkJvcmRlciBzczpDb2xvcj0iI2U0ZTRlNCIgc3M6V2VpZ2h0PSIxIiBzczpMaW5lU3R5bGU9IkNvbnRpbnVvdXMiIHNzOlBvc2l0aW9uPSJCb3R0b20iIC8+PHNzOkJvcmRlciBzczpDb2xvcj0iI2U0ZTRlNCIgc3M6V2VpZ2h0PSIxIiBzczpMaW5lU3R5bGU9IkNvbnRpbnVvdXMiIHNzOlBvc2l0aW9uPSJMZWZ0IiAvPjxzczpCb3JkZXIgc3M6Q29sb3I9IiNlNGU0ZTQiIHNzOldlaWdodD0iMSIgc3M6TGluZVN0eWxlPSJDb250aW51b3VzIiBzczpQb3NpdGlvbj0iUmlnaHQiIC8+PC9zczpCb3JkZXJzPjxzczpJbnRlcmlvciAvPjxzczpOdW1iZXJGb3JtYXQgLz48c3M6UHJvdGVjdGlvbiAvPjwvc3M6U3R5bGU+PHNzOlN0eWxlIHNzOklEPSJ0aXRsZSI+PHNzOkJvcmRlcnMgLz48c3M6Rm9udCAvPjxzczpBbGlnbm1lbnQgc3M6V3JhcFRleHQ9IjEiIHNzOlZlcnRpY2FsPSJDZW50ZXIiIHNzOkhvcml6b250YWw9IkNlbnRlciIgLz48c3M6TnVtYmVyRm9ybWF0IHNzOkZvcm1hdD0iQCIgLz48L3NzOlN0eWxlPjxzczpTdHlsZSBzczpJRD0iaGVhZGVyY2VsbCI+PHNzOkZvbnQgc3M6Qm9sZD0iMSIgc3M6U2l6ZT0iMTAiIC8+PHNzOkFsaWdubWVudCBzczpXcmFwVGV4dD0iMSIgc3M6SG9yaXpvbnRhbD0iQ2VudGVyIiAvPjxzczpJbnRlcmlvciBzczpQYXR0ZXJuPSJTb2xpZCIgc3M6Q29sb3I9IiNBM0M5RjEiIC8+PC9zczpTdHlsZT48c3M6U3R5bGUgc3M6SUQ9ImV2ZW4iPjxzczpJbnRlcmlvciBzczpQYXR0ZXJuPSJTb2xpZCIgc3M6Q29sb3I9IiNDQ0ZGRkYiIC8+PC9zczpTdHlsZT48c3M6U3R5bGUgc3M6UGFyZW50PSJldmVuIiBzczpJRD0iZXZlbmRhdGUiPjxzczpOdW1iZXJGb3JtYXQgc3M6Rm9ybWF0PSJ5eXl5LW1tLWRkIiAvPjwvc3M6U3R5bGU+PHNzOlN0eWxlIHNzOlBhcmVudD0iZXZlbiIgc3M6SUQ9ImV2ZW5pbnQiPjxzczpOdW1iZXJGb3JtYXQgc3M6Rm9ybWF0PSIwIiAvPjwvc3M6U3R5bGU+PHNzOlN0eWxlIHNzOlBhcmVudD0iZXZlbiIgc3M6SUQ9ImV2ZW5mbG9hdCI+PHNzOk51bWJlckZvcm1hdCBzczpGb3JtYXQ9IjAuMDAwIiAvPjwvc3M6U3R5bGU+PHNzOlN0eWxlIHNzOklEPSJvZGQiPjxzczpJbnRlcmlvciBzczpQYXR0ZXJuPSJTb2xpZCIgc3M6Q29sb3I9IiNDQ0NDRkYiIC8+PC9zczpTdHlsZT48c3M6U3R5bGUgc3M6UGFyZW50PSJvZGQiIHNzOklEPSJvZGRkYXRlIj48c3M6TnVtYmVyRm9ybWF0IHNzOkZvcm1hdD0ieXl5eS1tbS1kZCIgLz48L3NzOlN0eWxlPjxzczpTdHlsZSBzczpQYXJlbnQ9Im9kZCIgc3M6SUQ9Im9kZGludCI+PHNzOk51bWJlckZvcm1hdCBzczpGb3JtYXQ9IjAiIC8+PC9zczpTdHlsZT48c3M6U3R5bGUgc3M6UGFyZW50PSJvZGQiIHNzOklEPSJvZGRmbG9hdCI+PHNzOk51bWJlckZvcm1hdCBzczpGb3JtYXQ9IjAuMDAwIiAvPjwvc3M6U3R5bGU+PC9zczpTdHlsZXM+PHNzOldvcmtzaGVldCBzczpOYW1lPSJBcnJheSBHcmlkIj48c3M6TmFtZXM+PHNzOk5hbWVkUmFuZ2Ugc3M6TmFtZT0iUHJpbnRfVGl0bGVzIiBzczpSZWZlcnNUbz0iPSdBcnJheSBHcmlkJyFSMTpSMiIgLz48L3NzOk5hbWVzPjxzczpUYWJsZSB4OkZ1bGxSb3dzPSIxIiB4OkZ1bGxDb2x1bW5zPSIxIiBzczpFeHBhbmRlZENvbHVtbkNvdW50PSI1IiBzczpFeHBhbmRlZFJvd0NvdW50PSIzMSI+PHNzOkNvbHVtbiBzczpBdXRvRml0V2lkdGg9IjEiIHNzOldpZHRoPSIyNzEiIC8+PHNzOkNvbHVtbiBzczpBdXRvRml0V2lkdGg9IjEiIHNzOldpZHRoPSI3NSIgLz48c3M6Q29sdW1uIHNzOkF1dG9GaXRXaWR0aD0iMSIgc3M6V2lkdGg9Ijc1IiAvPjxzczpDb2x1bW4gc3M6QXV0b0ZpdFdpZHRoPSIxIiBzczpXaWR0aD0iNzUiIC8+PHNzOkNvbHVtbiBzczpBdXRvRml0V2lkdGg9IjEiIHNzOldpZHRoPSI4NSIgLz48c3M6Um93IHNzOkhlaWdodD0iMzgiPjxzczpDZWxsIHNzOlN0eWxlSUQ9InRpdGxlIiBzczpNZXJnZUFjcm9zcz0iNCI+PHNzOkRhdGEgeG1sbnM6aHRtbD0iaHR0cDovL3d3dy53My5vcmcvVFIvUkVDLWh0bWw0MCIgc3M6VHlwZT0iU3RyaW5nIj48aHRtbDpCPiAoYykyMDA4IFNFQk4gVUE8L2h0bWw6Qj48L3NzOkRhdGE+PHNzOk5hbWVkQ2VsbCBzczpOYW1lPSJQcmludF9UaXRsZXMiIC8+PC9zczpDZWxsPjwvc3M6Um93PjxzczpSb3cgc3M6QXV0b0ZpdEhlaWdodD0iMSI+PHNzOkNlbGwgc3M6U3R5bGVJRD0iaGVhZGVyY2VsbCI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj5Db21wYW55PC9zczpEYXRhPjxzczpOYW1lZENlbGwgc3M6TmFtZT0iUHJpbnRfVGl0bGVzIiAvPjwvc3M6Q2VsbD48c3M6Q2VsbCBzczpTdHlsZUlEPSJoZWFkZXJjZWxsIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPlByaWNlPC9zczpEYXRhPjxzczpOYW1lZENlbGwgc3M6TmFtZT0iUHJpbnRfVGl0bGVzIiAvPjwvc3M6Q2VsbD48c3M6Q2VsbCBzczpTdHlsZUlEPSJoZWFkZXJjZWxsIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPkNoYW5nZTwvc3M6RGF0YT48c3M6TmFtZWRDZWxsIHNzOk5hbWU9IlByaW50X1RpdGxlcyIgLz48L3NzOkNlbGw+PHNzOkNlbGwgc3M6U3R5bGVJRD0iaGVhZGVyY2VsbCI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj4lIENoYW5nZTwvc3M6RGF0YT48c3M6TmFtZWRDZWxsIHNzOk5hbWU9IlByaW50X1RpdGxlcyIgLz48L3NzOkNlbGw+PHNzOkNlbGwgc3M6U3R5bGVJRD0iaGVhZGVyY2VsbCI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj5MYXN0IFVwZGF0ZWQ8L3NzOkRhdGE+PHNzOk5hbWVkQ2VsbCBzczpOYW1lPSJQcmludF9UaXRsZXMiIC8+PC9zczpDZWxsPjwvc3M6Um93PjxzczpSb3c+PHNzOkNlbGwgc3M6U3R5bGVJRD0iZXZlbiI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj4zbSBDbzwvc3M6RGF0YT48L3NzOkNlbGw+PHNzOkNlbGwgc3M6U3R5bGVJRD0iZXZlbiI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj43MS43Mjwvc3M6RGF0YT48L3NzOkNlbGw+PHNzOkNlbGwgc3M6U3R5bGVJRD0iZXZlbiI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj4wLjAyPC9zczpEYXRhPjwvc3M6Q2VsbD48c3M6Q2VsbCBzczpTdHlsZUlEPSJldmVuIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPjAuMDM8L3NzOkRhdGE+PC9zczpDZWxsPjxzczpDZWxsIHNzOlN0eWxlSUQ9ImV2ZW4iPjxzczpEYXRhIHNzOlR5cGU9IlN0cmluZyI+V2VkIFNlcCAwMSAyMDEwIDAwOjAwOjAwIEdNVCsxMDAwIChFU1QpPC9zczpEYXRhPjwvc3M6Q2VsbD48L3NzOlJvdz48c3M6Um93PjxzczpDZWxsIHNzOlN0eWxlSUQ9Im9kZCI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj5BVCZUIEluYy48L3NzOkRhdGE+PC9zczpDZWxsPjxzczpDZWxsIHNzOlN0eWxlSUQ9Im9kZCI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj4zMS42MTwvc3M6RGF0YT48L3NzOkNlbGw+PHNzOkNlbGwgc3M6U3R5bGVJRD0ib2RkIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPi0wLjQ4PC9zczpEYXRhPjwvc3M6Q2VsbD48c3M6Q2VsbCBzczpTdHlsZUlEPSJvZGQiPjxzczpEYXRhIHNzOlR5cGU9IlN0cmluZyI+LTEuNTQ8L3NzOkRhdGE+PC9zczpDZWxsPjxzczpDZWxsIHNzOlN0eWxlSUQ9Im9kZCI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj5XZWQgU2VwIDAxIDIwMTAgMDA6MDA6MDAgR01UKzEwMDAgKEVTVCk8L3NzOkRhdGE+PC9zczpDZWxsPjwvc3M6Um93PjxzczpSb3c+PHNzOkNlbGwgc3M6U3R5bGVJRD0iZXZlbiI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj5BbGNvYSBJbmM8L3NzOkRhdGE+PC9zczpDZWxsPjxzczpDZWxsIHNzOlN0eWxlSUQ9ImV2ZW4iPjxzczpEYXRhIHNzOlR5cGU9IlN0cmluZyI+MjkuMDE8L3NzOkRhdGE+PC9zczpDZWxsPjxzczpDZWxsIHNzOlN0eWxlSUQ9ImV2ZW4iPjxzczpEYXRhIHNzOlR5cGU9IlN0cmluZyI+MC40Mjwvc3M6RGF0YT48L3NzOkNlbGw+PHNzOkNlbGwgc3M6U3R5bGVJRD0iZXZlbiI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj4xLjQ3PC9zczpEYXRhPjwvc3M6Q2VsbD48c3M6Q2VsbCBzczpTdHlsZUlEPSJldmVuIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPldlZCBTZXAgMDEgMjAxMCAwMDowMDowMCBHTVQrMTAwMCAoRVNUKTwvc3M6RGF0YT48L3NzOkNlbGw+PC9zczpSb3c+PHNzOlJvdz48c3M6Q2VsbCBzczpTdHlsZUlEPSJvZGQiPjxzczpEYXRhIHNzOlR5cGU9IlN0cmluZyI+QWx0cmlhIEdyb3VwIEluYzwvc3M6RGF0YT48L3NzOkNlbGw+PHNzOkNlbGwgc3M6U3R5bGVJRD0ib2RkIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPjgzLjgxPC9zczpEYXRhPjwvc3M6Q2VsbD48c3M6Q2VsbCBzczpTdHlsZUlEPSJvZGQiPjxzczpEYXRhIHNzOlR5cGU9IlN0cmluZyI+MC4yODwvc3M6RGF0YT48L3NzOkNlbGw+PHNzOkNlbGwgc3M6U3R5bGVJRD0ib2RkIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPjAuMzQ8L3NzOkRhdGE+PC9zczpDZWxsPjxzczpDZWxsIHNzOlN0eWxlSUQ9Im9kZCI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj5XZWQgU2VwIDAxIDIwMTAgMDA6MDA6MDAgR01UKzEwMDAgKEVTVCk8L3NzOkRhdGE+PC9zczpDZWxsPjwvc3M6Um93PjxzczpSb3c+PHNzOkNlbGwgc3M6U3R5bGVJRD0iZXZlbiI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj5BbWVyaWNhbiBFeHByZXNzIENvbXBhbnk8L3NzOkRhdGE+PC9zczpDZWxsPjxzczpDZWxsIHNzOlN0eWxlSUQ9ImV2ZW4iPjxzczpEYXRhIHNzOlR5cGU9IlN0cmluZyI+NTIuNTU8L3NzOkRhdGE+PC9zczpDZWxsPjxzczpDZWxsIHNzOlN0eWxlSUQ9ImV2ZW4iPjxzczpEYXRhIHNzOlR5cGU9IlN0cmluZyI+MC4wMTwvc3M6RGF0YT48L3NzOkNlbGw+PHNzOkNlbGwgc3M6U3R5bGVJRD0iZXZlbiI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj4wLjAyPC9zczpEYXRhPjwvc3M6Q2VsbD48c3M6Q2VsbCBzczpTdHlsZUlEPSJldmVuIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPldlZCBTZXAgMDEgMjAxMCAwMDowMDowMCBHTVQrMTAwMCAoRVNUKTwvc3M6RGF0YT48L3NzOkNlbGw+PC9zczpSb3c+PHNzOlJvdz48c3M6Q2VsbCBzczpTdHlsZUlEPSJvZGQiPjxzczpEYXRhIHNzOlR5cGU9IlN0cmluZyI+QW1lcmljYW4gSW50ZXJuYXRpb25hbCBHcm91cCwgSW5jLjwvc3M6RGF0YT48L3NzOkNlbGw+PHNzOkNlbGwgc3M6U3R5bGVJRD0ib2RkIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPjY0LjEzPC9zczpEYXRhPjwvc3M6Q2VsbD48c3M6Q2VsbCBzczpTdHlsZUlEPSJvZGQiPjxzczpEYXRhIHNzOlR5cGU9IlN0cmluZyI+MC4zMTwvc3M6RGF0YT48L3NzOkNlbGw+PHNzOkNlbGwgc3M6U3R5bGVJRD0ib2RkIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPjAuNDk8L3NzOkRhdGE+PC9zczpDZWxsPjxzczpDZWxsIHNzOlN0eWxlSUQ9Im9kZCI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj5XZWQgU2VwIDAxIDIwMTAgMDA6MDA6MDAgR01UKzEwMDAgKEVTVCk8L3NzOkRhdGE+PC9zczpDZWxsPjwvc3M6Um93PjxzczpSb3c+PHNzOkNlbGwgc3M6U3R5bGVJRD0iZXZlbiI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj5Cb2VpbmcgQ28uPC9zczpEYXRhPjwvc3M6Q2VsbD48c3M6Q2VsbCBzczpTdHlsZUlEPSJldmVuIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPjc1LjQzPC9zczpEYXRhPjwvc3M6Q2VsbD48c3M6Q2VsbCBzczpTdHlsZUlEPSJldmVuIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPjAuNTM8L3NzOkRhdGE+PC9zczpDZWxsPjxzczpDZWxsIHNzOlN0eWxlSUQ9ImV2ZW4iPjxzczpEYXRhIHNzOlR5cGU9IlN0cmluZyI+MC43MTwvc3M6RGF0YT48L3NzOkNlbGw+PHNzOkNlbGwgc3M6U3R5bGVJRD0iZXZlbiI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj5XZWQgU2VwIDAxIDIwMTAgMDA6MDA6MDAgR01UKzEwMDAgKEVTVCk8L3NzOkRhdGE+PC9zczpDZWxsPjwvc3M6Um93PjxzczpSb3c+PHNzOkNlbGwgc3M6U3R5bGVJRD0ib2RkIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPkNhdGVycGlsbGFyIEluYy48L3NzOkRhdGE+PC9zczpDZWxsPjxzczpDZWxsIHNzOlN0eWxlSUQ9Im9kZCI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj42Ny4yNzwvc3M6RGF0YT48L3NzOkNlbGw+PHNzOkNlbGwgc3M6U3R5bGVJRD0ib2RkIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPjAuOTI8L3NzOkRhdGE+PC9zczpDZWxsPjxzczpDZWxsIHNzOlN0eWxlSUQ9Im9kZCI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj4xLjM5PC9zczpEYXRhPjwvc3M6Q2VsbD48c3M6Q2VsbCBzczpTdHlsZUlEPSJvZGQiPjxzczpEYXRhIHNzOlR5cGU9IlN0cmluZyI+V2VkIFNlcCAwMSAyMDEwIDAwOjAwOjAwIEdNVCsxMDAwIChFU1QpPC9zczpEYXRhPjwvc3M6Q2VsbD48L3NzOlJvdz48c3M6Um93PjxzczpDZWxsIHNzOlN0eWxlSUQ9ImV2ZW4iPjxzczpEYXRhIHNzOlR5cGU9IlN0cmluZyI+Q2l0aWdyb3VwLCBJbmMuPC9zczpEYXRhPjwvc3M6Q2VsbD48c3M6Q2VsbCBzczpTdHlsZUlEPSJldmVuIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPjQ5LjM3PC9zczpEYXRhPjwvc3M6Q2VsbD48c3M6Q2VsbCBzczpTdHlsZUlEPSJldmVuIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPjAuMDI8L3NzOkRhdGE+PC9zczpDZWxsPjxzczpDZWxsIHNzOlN0eWxlSUQ9ImV2ZW4iPjxzczpEYXRhIHNzOlR5cGU9IlN0cmluZyI+MC4wNDwvc3M6RGF0YT48L3NzOkNlbGw+PHNzOkNlbGwgc3M6U3R5bGVJRD0iZXZlbiI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj5XZWQgU2VwIDAxIDIwMTAgMDA6MDA6MDAgR01UKzEwMDAgKEVTVCk8L3NzOkRhdGE+PC9zczpDZWxsPjwvc3M6Um93PjxzczpSb3c+PHNzOkNlbGwgc3M6U3R5bGVJRD0ib2RkIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPkUuSS4gZHUgUG9udCBkZSBOZW1vdXJzIGFuZCBDb21wYW55PC9zczpEYXRhPjwvc3M6Q2VsbD48c3M6Q2VsbCBzczpTdHlsZUlEPSJvZGQiPjxzczpEYXRhIHNzOlR5cGU9IlN0cmluZyI+NDAuNDg8L3NzOkRhdGE+PC9zczpDZWxsPjxzczpDZWxsIHNzOlN0eWxlSUQ9Im9kZCI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj4wLjUxPC9zczpEYXRhPjwvc3M6Q2VsbD48c3M6Q2VsbCBzczpTdHlsZUlEPSJvZGQiPjxzczpEYXRhIHNzOlR5cGU9IlN0cmluZyI+MS4yODwvc3M6RGF0YT48L3NzOkNlbGw+PHNzOkNlbGwgc3M6U3R5bGVJRD0ib2RkIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPldlZCBTZXAgMDEgMjAxMCAwMDowMDowMCBHTVQrMTAwMCAoRVNUKTwvc3M6RGF0YT48L3NzOkNlbGw+PC9zczpSb3c+PHNzOlJvdz48c3M6Q2VsbCBzczpTdHlsZUlEPSJldmVuIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPkV4eG9uIE1vYmlsIENvcnA8L3NzOkRhdGE+PC9zczpDZWxsPjxzczpDZWxsIHNzOlN0eWxlSUQ9ImV2ZW4iPjxzczpEYXRhIHNzOlR5cGU9IlN0cmluZyI+NjguMTwvc3M6RGF0YT48L3NzOkNlbGw+PHNzOkNlbGwgc3M6U3R5bGVJRD0iZXZlbiI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj4tMC40Mzwvc3M6RGF0YT48L3NzOkNlbGw+PHNzOkNlbGwgc3M6U3R5bGVJRD0iZXZlbiI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj4tMC42NDwvc3M6RGF0YT48L3NzOkNlbGw+PHNzOkNlbGwgc3M6U3R5bGVJRD0iZXZlbiI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj5XZWQgU2VwIDAxIDIwMTAgMDA6MDA6MDAgR01UKzEwMDAgKEVTVCk8L3NzOkRhdGE+PC9zczpDZWxsPjwvc3M6Um93PjxzczpSb3c+PHNzOkNlbGwgc3M6U3R5bGVJRD0ib2RkIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPkdlbmVyYWwgRWxlY3RyaWMgQ29tcGFueTwvc3M6RGF0YT48L3NzOkNlbGw+PHNzOkNlbGwgc3M6U3R5bGVJRD0ib2RkIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPjM0LjE0PC9zczpEYXRhPjwvc3M6Q2VsbD48c3M6Q2VsbCBzczpTdHlsZUlEPSJvZGQiPjxzczpEYXRhIHNzOlR5cGU9IlN0cmluZyI+LTAuMDg8L3NzOkRhdGE+PC9zczpDZWxsPjxzczpDZWxsIHNzOlN0eWxlSUQ9Im9kZCI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj4tMC4yMzwvc3M6RGF0YT48L3NzOkNlbGw+PHNzOkNlbGwgc3M6U3R5bGVJRD0ib2RkIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPldlZCBTZXAgMDEgMjAxMCAwMDowMDowMCBHTVQrMTAwMCAoRVNUKTwvc3M6RGF0YT48L3NzOkNlbGw+PC9zczpSb3c+PHNzOlJvdz48c3M6Q2VsbCBzczpTdHlsZUlEPSJldmVuIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPkdlbmVyYWwgTW90b3JzIENvcnBvcmF0aW9uPC9zczpEYXRhPjwvc3M6Q2VsbD48c3M6Q2VsbCBzczpTdHlsZUlEPSJldmVuIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPjMwLjI3PC9zczpEYXRhPjwvc3M6Q2VsbD48c3M6Q2VsbCBzczpTdHlsZUlEPSJldmVuIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPjEuMDk8L3NzOkRhdGE+PC9zczpDZWxsPjxzczpDZWxsIHNzOlN0eWxlSUQ9ImV2ZW4iPjxzczpEYXRhIHNzOlR5cGU9IlN0cmluZyI+My43NDwvc3M6RGF0YT48L3NzOkNlbGw+PHNzOkNlbGwgc3M6U3R5bGVJRD0iZXZlbiI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj5XZWQgU2VwIDAxIDIwMTAgMDA6MDA6MDAgR01UKzEwMDAgKEVTVCk8L3NzOkRhdGE+PC9zczpDZWxsPjwvc3M6Um93PjxzczpSb3c+PHNzOkNlbGwgc3M6U3R5bGVJRD0ib2RkIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPkhld2xldHQtUGFja2FyZCBDby48L3NzOkRhdGE+PC9zczpDZWxsPjxzczpDZWxsIHNzOlN0eWxlSUQ9Im9kZCI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj4zNi41Mzwvc3M6RGF0YT48L3NzOkNlbGw+PHNzOkNlbGwgc3M6U3R5bGVJRD0ib2RkIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPi0wLjAzPC9zczpEYXRhPjwvc3M6Q2VsbD48c3M6Q2VsbCBzczpTdHlsZUlEPSJvZGQiPjxzczpEYXRhIHNzOlR5cGU9IlN0cmluZyI+LTAuMDg8L3NzOkRhdGE+PC9zczpDZWxsPjxzczpDZWxsIHNzOlN0eWxlSUQ9Im9kZCI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj5XZWQgU2VwIDAxIDIwMTAgMDA6MDA6MDAgR01UKzEwMDAgKEVTVCk8L3NzOkRhdGE+PC9zczpDZWxsPjwvc3M6Um93PjxzczpSb3c+PHNzOkNlbGwgc3M6U3R5bGVJRD0iZXZlbiI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj5Ib25leXdlbGwgSW50bCBJbmM8L3NzOkRhdGE+PC9zczpDZWxsPjxzczpDZWxsIHNzOlN0eWxlSUQ9ImV2ZW4iPjxzczpEYXRhIHNzOlR5cGU9IlN0cmluZyI+MzguNzc8L3NzOkRhdGE+PC9zczpDZWxsPjxzczpDZWxsIHNzOlN0eWxlSUQ9ImV2ZW4iPjxzczpEYXRhIHNzOlR5cGU9IlN0cmluZyI+MC4wNTwvc3M6RGF0YT48L3NzOkNlbGw+PHNzOkNlbGwgc3M6U3R5bGVJRD0iZXZlbiI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj4wLjEzPC9zczpEYXRhPjwvc3M6Q2VsbD48c3M6Q2VsbCBzczpTdHlsZUlEPSJldmVuIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPldlZCBTZXAgMDEgMjAxMCAwMDowMDowMCBHTVQrMTAwMCAoRVNUKTwvc3M6RGF0YT48L3NzOkNlbGw+PC9zczpSb3c+PHNzOlJvdz48c3M6Q2VsbCBzczpTdHlsZUlEPSJvZGQiPjxzczpEYXRhIHNzOlR5cGU9IlN0cmluZyI+SW50ZWwgQ29ycG9yYXRpb248L3NzOkRhdGE+PC9zczpDZWxsPjxzczpDZWxsIHNzOlN0eWxlSUQ9Im9kZCI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj4xOS44ODwvc3M6RGF0YT48L3NzOkNlbGw+PHNzOkNlbGwgc3M6U3R5bGVJRD0ib2RkIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPjAuMzE8L3NzOkRhdGE+PC9zczpDZWxsPjxzczpDZWxsIHNzOlN0eWxlSUQ9Im9kZCI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj4xLjU4PC9zczpEYXRhPjwvc3M6Q2VsbD48c3M6Q2VsbCBzczpTdHlsZUlEPSJvZGQiPjxzczpEYXRhIHNzOlR5cGU9IlN0cmluZyI+V2VkIFNlcCAwMSAyMDEwIDAwOjAwOjAwIEdNVCsxMDAwIChFU1QpPC9zczpEYXRhPjwvc3M6Q2VsbD48L3NzOlJvdz48c3M6Um93PjxzczpDZWxsIHNzOlN0eWxlSUQ9ImV2ZW4iPjxzczpEYXRhIHNzOlR5cGU9IlN0cmluZyI+SW50ZXJuYXRpb25hbCBCdXNpbmVzcyBNYWNoaW5lczwvc3M6RGF0YT48L3NzOkNlbGw+PHNzOkNlbGwgc3M6U3R5bGVJRD0iZXZlbiI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj44MS40MTwvc3M6RGF0YT48L3NzOkNlbGw+PHNzOkNlbGwgc3M6U3R5bGVJRD0iZXZlbiI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj4wLjQ0PC9zczpEYXRhPjwvc3M6Q2VsbD48c3M6Q2VsbCBzczpTdHlsZUlEPSJldmVuIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPjAuNTQ8L3NzOkRhdGE+PC9zczpDZWxsPjxzczpDZWxsIHNzOlN0eWxlSUQ9ImV2ZW4iPjxzczpEYXRhIHNzOlR5cGU9IlN0cmluZyI+V2VkIFNlcCAwMSAyMDEwIDAwOjAwOjAwIEdNVCsxMDAwIChFU1QpPC9zczpEYXRhPjwvc3M6Q2VsbD48L3NzOlJvdz48c3M6Um93PjxzczpDZWxsIHNzOlN0eWxlSUQ9Im9kZCI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj5KUCBNb3JnYW4gJiBDaGFzZSAmIENvPC9zczpEYXRhPjwvc3M6Q2VsbD48c3M6Q2VsbCBzczpTdHlsZUlEPSJvZGQiPjxzczpEYXRhIHNzOlR5cGU9IlN0cmluZyI+NDUuNzM8L3NzOkRhdGE+PC9zczpDZWxsPjxzczpDZWxsIHNzOlN0eWxlSUQ9Im9kZCI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj4wLjA3PC9zczpEYXRhPjwvc3M6Q2VsbD48c3M6Q2VsbCBzczpTdHlsZUlEPSJvZGQiPjxzczpEYXRhIHNzOlR5cGU9IlN0cmluZyI+MC4xNTwvc3M6RGF0YT48L3NzOkNlbGw+PHNzOkNlbGwgc3M6U3R5bGVJRD0ib2RkIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPldlZCBTZXAgMDEgMjAxMCAwMDowMDowMCBHTVQrMTAwMCAoRVNUKTwvc3M6RGF0YT48L3NzOkNlbGw+PC9zczpSb3c+PHNzOlJvdz48c3M6Q2VsbCBzczpTdHlsZUlEPSJldmVuIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPkpvaG5zb24gJiBKb2huc29uPC9zczpEYXRhPjwvc3M6Q2VsbD48c3M6Q2VsbCBzczpTdHlsZUlEPSJldmVuIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPjY0LjcyPC9zczpEYXRhPjwvc3M6Q2VsbD48c3M6Q2VsbCBzczpTdHlsZUlEPSJldmVuIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPjAuMDY8L3NzOkRhdGE+PC9zczpDZWxsPjxzczpDZWxsIHNzOlN0eWxlSUQ9ImV2ZW4iPjxzczpEYXRhIHNzOlR5cGU9IlN0cmluZyI+MC4wOTwvc3M6RGF0YT48L3NzOkNlbGw+PHNzOkNlbGwgc3M6U3R5bGVJRD0iZXZlbiI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj5XZWQgU2VwIDAxIDIwMTAgMDA6MDA6MDAgR01UKzEwMDAgKEVTVCk8L3NzOkRhdGE+PC9zczpDZWxsPjwvc3M6Um93PjxzczpSb3c+PHNzOkNlbGwgc3M6U3R5bGVJRD0ib2RkIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPk1jRG9uYWxkJ3MgQ29ycG9yYXRpb248L3NzOkRhdGE+PC9zczpDZWxsPjxzczpDZWxsIHNzOlN0eWxlSUQ9Im9kZCI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj4zNi43Njwvc3M6RGF0YT48L3NzOkNlbGw+PHNzOkNlbGwgc3M6U3R5bGVJRD0ib2RkIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPjAuODY8L3NzOkRhdGE+PC9zczpDZWxsPjxzczpDZWxsIHNzOlN0eWxlSUQ9Im9kZCI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj4yLjQ8L3NzOkRhdGE+PC9zczpDZWxsPjxzczpDZWxsIHNzOlN0eWxlSUQ9Im9kZCI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj5XZWQgU2VwIDAxIDIwMTAgMDA6MDA6MDAgR01UKzEwMDAgKEVTVCk8L3NzOkRhdGE+PC9zczpDZWxsPjwvc3M6Um93PjxzczpSb3c+PHNzOkNlbGwgc3M6U3R5bGVJRD0iZXZlbiI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj5NZXJjayAmIENvLiwgSW5jLjwvc3M6RGF0YT48L3NzOkNlbGw+PHNzOkNlbGwgc3M6U3R5bGVJRD0iZXZlbiI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj40MC45Njwvc3M6RGF0YT48L3NzOkNlbGw+PHNzOkNlbGwgc3M6U3R5bGVJRD0iZXZlbiI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj4wLjQxPC9zczpEYXRhPjwvc3M6Q2VsbD48c3M6Q2VsbCBzczpTdHlsZUlEPSJldmVuIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPjEuMDE8L3NzOkRhdGE+PC9zczpDZWxsPjxzczpDZWxsIHNzOlN0eWxlSUQ9ImV2ZW4iPjxzczpEYXRhIHNzOlR5cGU9IlN0cmluZyI+V2VkIFNlcCAwMSAyMDEwIDAwOjAwOjAwIEdNVCsxMDAwIChFU1QpPC9zczpEYXRhPjwvc3M6Q2VsbD48L3NzOlJvdz48c3M6Um93PjxzczpDZWxsIHNzOlN0eWxlSUQ9Im9kZCI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj5NaWNyb3NvZnQgQ29ycG9yYXRpb248L3NzOkRhdGE+PC9zczpDZWxsPjxzczpDZWxsIHNzOlN0eWxlSUQ9Im9kZCI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj4yNS44NDwvc3M6RGF0YT48L3NzOkNlbGw+PHNzOkNlbGwgc3M6U3R5bGVJRD0ib2RkIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPjAuMTQ8L3NzOkRhdGE+PC9zczpDZWxsPjxzczpDZWxsIHNzOlN0eWxlSUQ9Im9kZCI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj4wLjU0PC9zczpEYXRhPjwvc3M6Q2VsbD48c3M6Q2VsbCBzczpTdHlsZUlEPSJvZGQiPjxzczpEYXRhIHNzOlR5cGU9IlN0cmluZyI+V2VkIFNlcCAwMSAyMDEwIDAwOjAwOjAwIEdNVCsxMDAwIChFU1QpPC9zczpEYXRhPjwvc3M6Q2VsbD48L3NzOlJvdz48c3M6Um93PjxzczpDZWxsIHNzOlN0eWxlSUQ9ImV2ZW4iPjxzczpEYXRhIHNzOlR5cGU9IlN0cmluZyI+UGZpemVyIEluYzwvc3M6RGF0YT48L3NzOkNlbGw+PHNzOkNlbGwgc3M6U3R5bGVJRD0iZXZlbiI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj4yNy45Njwvc3M6RGF0YT48L3NzOkNlbGw+PHNzOkNlbGwgc3M6U3R5bGVJRD0iZXZlbiI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj4wLjQ8L3NzOkRhdGE+PC9zczpDZWxsPjxzczpDZWxsIHNzOlN0eWxlSUQ9ImV2ZW4iPjxzczpEYXRhIHNzOlR5cGU9IlN0cmluZyI+MS40NTwvc3M6RGF0YT48L3NzOkNlbGw+PHNzOkNlbGwgc3M6U3R5bGVJRD0iZXZlbiI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj5XZWQgU2VwIDAxIDIwMTAgMDA6MDA6MDAgR01UKzEwMDAgKEVTVCk8L3NzOkRhdGE+PC9zczpDZWxsPjwvc3M6Um93PjxzczpSb3c+PHNzOkNlbGwgc3M6U3R5bGVJRD0ib2RkIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPlRoZSBDb2NhLUNvbGEgQ29tcGFueTwvc3M6RGF0YT48L3NzOkNlbGw+PHNzOkNlbGwgc3M6U3R5bGVJRD0ib2RkIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPjQ1LjA3PC9zczpEYXRhPjwvc3M6Q2VsbD48c3M6Q2VsbCBzczpTdHlsZUlEPSJvZGQiPjxzczpEYXRhIHNzOlR5cGU9IlN0cmluZyI+MC4yNjwvc3M6RGF0YT48L3NzOkNlbGw+PHNzOkNlbGwgc3M6U3R5bGVJRD0ib2RkIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPjAuNTg8L3NzOkRhdGE+PC9zczpDZWxsPjxzczpDZWxsIHNzOlN0eWxlSUQ9Im9kZCI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj5XZWQgU2VwIDAxIDIwMTAgMDA6MDA6MDAgR01UKzEwMDAgKEVTVCk8L3NzOkRhdGE+PC9zczpDZWxsPjwvc3M6Um93PjxzczpSb3c+PHNzOkNlbGwgc3M6U3R5bGVJRD0iZXZlbiI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj5UaGUgSG9tZSBEZXBvdCwgSW5jLjwvc3M6RGF0YT48L3NzOkNlbGw+PHNzOkNlbGwgc3M6U3R5bGVJRD0iZXZlbiI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj4zNC42NDwvc3M6RGF0YT48L3NzOkNlbGw+PHNzOkNlbGwgc3M6U3R5bGVJRD0iZXZlbiI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj4wLjM1PC9zczpEYXRhPjwvc3M6Q2VsbD48c3M6Q2VsbCBzczpTdHlsZUlEPSJldmVuIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPjEuMDI8L3NzOkRhdGE+PC9zczpDZWxsPjxzczpDZWxsIHNzOlN0eWxlSUQ9ImV2ZW4iPjxzczpEYXRhIHNzOlR5cGU9IlN0cmluZyI+V2VkIFNlcCAwMSAyMDEwIDAwOjAwOjAwIEdNVCsxMDAwIChFU1QpPC9zczpEYXRhPjwvc3M6Q2VsbD48L3NzOlJvdz48c3M6Um93PjxzczpDZWxsIHNzOlN0eWxlSUQ9Im9kZCI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj5UaGUgUHJvY3RlciAmIEdhbWJsZSBDb21wYW55PC9zczpEYXRhPjwvc3M6Q2VsbD48c3M6Q2VsbCBzczpTdHlsZUlEPSJvZGQiPjxzczpEYXRhIHNzOlR5cGU9IlN0cmluZyI+NjEuOTE8L3NzOkRhdGE+PC9zczpDZWxsPjxzczpDZWxsIHNzOlN0eWxlSUQ9Im9kZCI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj4wLjAxPC9zczpEYXRhPjwvc3M6Q2VsbD48c3M6Q2VsbCBzczpTdHlsZUlEPSJvZGQiPjxzczpEYXRhIHNzOlR5cGU9IlN0cmluZyI+MC4wMjwvc3M6RGF0YT48L3NzOkNlbGw+PHNzOkNlbGwgc3M6U3R5bGVJRD0ib2RkIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPldlZCBTZXAgMDEgMjAxMCAwMDowMDowMCBHTVQrMTAwMCAoRVNUKTwvc3M6RGF0YT48L3NzOkNlbGw+PC9zczpSb3c+PHNzOlJvdz48c3M6Q2VsbCBzczpTdHlsZUlEPSJldmVuIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPlVuaXRlZCBUZWNobm9sb2dpZXMgQ29ycG9yYXRpb248L3NzOkRhdGE+PC9zczpDZWxsPjxzczpDZWxsIHNzOlN0eWxlSUQ9ImV2ZW4iPjxzczpEYXRhIHNzOlR5cGU9IlN0cmluZyI+NjMuMjY8L3NzOkRhdGE+PC9zczpDZWxsPjxzczpDZWxsIHNzOlN0eWxlSUQ9ImV2ZW4iPjxzczpEYXRhIHNzOlR5cGU9IlN0cmluZyI+MC41NTwvc3M6RGF0YT48L3NzOkNlbGw+PHNzOkNlbGwgc3M6U3R5bGVJRD0iZXZlbiI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj4wLjg4PC9zczpEYXRhPjwvc3M6Q2VsbD48c3M6Q2VsbCBzczpTdHlsZUlEPSJldmVuIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPldlZCBTZXAgMDEgMjAxMCAwMDowMDowMCBHTVQrMTAwMCAoRVNUKTwvc3M6RGF0YT48L3NzOkNlbGw+PC9zczpSb3c+PHNzOlJvdz48c3M6Q2VsbCBzczpTdHlsZUlEPSJvZGQiPjxzczpEYXRhIHNzOlR5cGU9IlN0cmluZyI+VmVyaXpvbiBDb21tdW5pY2F0aW9uczwvc3M6RGF0YT48L3NzOkNlbGw+PHNzOkNlbGwgc3M6U3R5bGVJRD0ib2RkIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPjM1LjU3PC9zczpEYXRhPjwvc3M6Q2VsbD48c3M6Q2VsbCBzczpTdHlsZUlEPSJvZGQiPjxzczpEYXRhIHNzOlR5cGU9IlN0cmluZyI+MC4zOTwvc3M6RGF0YT48L3NzOkNlbGw+PHNzOkNlbGwgc3M6U3R5bGVJRD0ib2RkIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPjEuMTE8L3NzOkRhdGE+PC9zczpDZWxsPjxzczpDZWxsIHNzOlN0eWxlSUQ9Im9kZCI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj5XZWQgU2VwIDAxIDIwMTAgMDA6MDA6MDAgR01UKzEwMDAgKEVTVCk8L3NzOkRhdGE+PC9zczpDZWxsPjwvc3M6Um93PjxzczpSb3c+PHNzOkNlbGwgc3M6U3R5bGVJRD0iZXZlbiI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj5XYWwtTWFydCBTdG9yZXMsIEluYy48L3NzOkRhdGE+PC9zczpDZWxsPjxzczpDZWxsIHNzOlN0eWxlSUQ9ImV2ZW4iPjxzczpEYXRhIHNzOlR5cGU9IlN0cmluZyI+NDUuNDU8L3NzOkRhdGE+PC9zczpDZWxsPjxzczpDZWxsIHNzOlN0eWxlSUQ9ImV2ZW4iPjxzczpEYXRhIHNzOlR5cGU9IlN0cmluZyI+MC43Mzwvc3M6RGF0YT48L3NzOkNlbGw+PHNzOkNlbGwgc3M6U3R5bGVJRD0iZXZlbiI+PHNzOkRhdGEgc3M6VHlwZT0iU3RyaW5nIj4xLjYzPC9zczpEYXRhPjwvc3M6Q2VsbD48c3M6Q2VsbCBzczpTdHlsZUlEPSJldmVuIj48c3M6RGF0YSBzczpUeXBlPSJTdHJpbmciPldlZCBTZXAgMDEgMjAxMCAwMDowMDowMCBHTVQrMTAwMCAoRVNUKTwvc3M6RGF0YT48L3NzOkNlbGw+PC9zczpSb3c+PC9zczpUYWJsZT48eDpXb3Jrc2hlZXRPcHRpb25zPjx4OlBhZ2VTZXR1cD48eDpMYXlvdXQgeDpDZW50ZXJIb3Jpem9udGFsPSIxIiB4Ok9yaWVudGF0aW9uPSJMYW5kc2NhcGUiIC8+PHg6Rm9vdGVyIHg6RGF0YT0iUGFnZSAmYW1wO1Agb2YgJmFtcDtOIiB4Ok1hcmdpbj0iMC41IiAvPjx4OlBhZ2VNYXJnaW5zIHg6VG9wPSIwLjUiIHg6UmlnaHQ9IjAuNSIgeDpMZWZ0PSIwLjUiIHg6Qm90dG9tPSIwLjgiIC8+PC94OlBhZ2VTZXR1cD48eDpGaXRUb1BhZ2UgLz48eDpQcmludD48eDpQcmludEVycm9ycz5CbGFuazwveDpQcmludEVycm9ycz48eDpGaXRXaWR0aD4xPC94OkZpdFdpZHRoPjx4OkZpdEhlaWdodD4zMjc2NzwveDpGaXRIZWlnaHQ+PHg6VmFsaWRQcmludGVySW5mbyAvPjx4OlZlcnRpY2FsUmVzb2x1dGlvbj42MDA8L3g6VmVydGljYWxSZXNvbHV0aW9uPjwveDpQcmludD48eDpTZWxlY3RlZCAvPjx4OkRvTm90RGlzcGxheUdyaWRsaW5lcyAvPjx4OlByb3RlY3RPYmplY3RzPkZhbHNlPC94OlByb3RlY3RPYmplY3RzPjx4OlByb3RlY3RTY2VuYXJpb3M+RmFsc2U8L3g6UHJvdGVjdFNjZW5hcmlvcz48L3g6V29ya3NoZWV0T3B0aW9ucz48L3NzOldvcmtzaGVldD48L3NzOldvcmtib29rPg=="; + try { + uri = ioService.newURI(currentSpec); + } catch (e) { + exception = true; + } + Assert.equal(exception, true); + exception = false; // reset exception value +} diff --git a/image/test/unit/test_private_channel.js b/image/test/unit/test_private_channel.js new file mode 100644 index 0000000000..b2d0e74e2c --- /dev/null +++ b/image/test/unit/test_private_channel.js @@ -0,0 +1,170 @@ +const { NetUtil } = ChromeUtils.importESModule( + "resource://gre/modules/NetUtil.sys.mjs" +); +const { HttpServer } = ChromeUtils.importESModule( + "resource://testing-common/httpd.sys.mjs" +); + +const ReferrerInfo = Components.Constructor( + "@mozilla.org/referrer-info;1", + "nsIReferrerInfo", + "init" +); + +var server = new HttpServer(); +server.registerPathHandler("/image.png", imageHandler); +server.start(-1); + +/* import-globals-from image_load_helpers.js */ +load("image_load_helpers.js"); + +var gHits = 0; + +var gIoService = Services.io; +var gPublicLoader = Cc["@mozilla.org/image/loader;1"].createInstance( + Ci.imgILoader +); +var gPrivateLoader = Cc["@mozilla.org/image/loader;1"].createInstance( + Ci.imgILoader +); +gPrivateLoader.QueryInterface(Ci.imgICache).respectPrivacyNotifications(); + +var nonPrivateLoadContext = Cu.createLoadContext(); +var privateLoadContext = Cu.createPrivateLoadContext(); + +function imageHandler(metadata, response) { + gHits++; + response.setHeader("Cache-Control", "max-age=10000", false); + response.setStatusLine(metadata.httpVersion, 200, "OK"); + response.setHeader("Content-Type", "image/png", false); + var body = atob( + "iVBORw0KGgoAAAANSUhEUgAAAAMAAAADCAIAAADZSiLoAAAAEUlEQVQImWP4z8AAQTAamQkAhpcI+DeMzFcAAAAASUVORK5CYII=" + ); + response.bodyOutputStream.write(body, body.length); +} + +var requests = []; +var listeners = []; + +var gImgPath = "http://localhost:" + server.identity.primaryPort + "/image.png"; + +function setup_chan(path, isPrivate, callback) { + var uri = NetUtil.newURI(gImgPath); + var securityFlags = Ci.nsILoadInfo.SEC_ALLOW_CROSS_ORIGIN_SEC_CONTEXT_IS_NULL; + var principal = Services.scriptSecurityManager.createContentPrincipal(uri, { + privateBrowsingId: isPrivate ? 1 : 0, + }); + var chan = NetUtil.newChannel({ + uri, + loadingPrincipal: principal, + securityFlags, + contentPolicyType: Ci.nsIContentPolicy.TYPE_INTERNAL_IMAGE, + }); + chan.notificationCallbacks = isPrivate + ? privateLoadContext + : nonPrivateLoadContext; + var channelListener = new ChannelListener(); + chan.asyncOpen(channelListener); + + var listener = new ImageListener(null, callback); + var outlistener = {}; + var loader = isPrivate ? gPrivateLoader : gPublicLoader; + var outer = Cc["@mozilla.org/image/tools;1"] + .getService(Ci.imgITools) + .createScriptedObserver(listener); + listeners.push(outer); + requests.push( + loader.loadImageWithChannelXPCOM(chan, outer, null, outlistener) + ); + channelListener.outputListener = outlistener.value; + listener.synchronous = false; +} + +function loadImage(isPrivate, callback) { + var listener = new ImageListener(null, callback); + var outer = Cc["@mozilla.org/image/tools;1"] + .getService(Ci.imgITools) + .createScriptedObserver(listener); + var uri = gIoService.newURI(gImgPath); + var loadGroup = Cc["@mozilla.org/network/load-group;1"].createInstance( + Ci.nsILoadGroup + ); + loadGroup.notificationCallbacks = isPrivate + ? privateLoadContext + : nonPrivateLoadContext; + var loader = isPrivate ? gPrivateLoader : gPublicLoader; + var referrerInfo = new ReferrerInfo( + Ci.nsIReferrerInfo.NO_REFERRER_WHEN_DOWNGRADE, + true, + null + ); + requests.push( + loader.loadImageXPCOM( + uri, + null, + referrerInfo, + null, + loadGroup, + outer, + null, + 0, + null + ) + ); + listener.synchronous = false; +} + +function run_loadImage_tests() { + function observer() { + Services.obs.removeObserver(observer, "cacheservice:empty-cache"); + gHits = 0; + loadImage(false, function () { + loadImage(false, function () { + loadImage(true, function () { + loadImage(true, function () { + Assert.equal(gHits, 2); + server.stop(do_test_finished); + }); + }); + }); + }); + } + + for (let loader of [gPublicLoader, gPrivateLoader]) { + loader.QueryInterface(Ci.imgICache).clearCache(true); + loader.QueryInterface(Ci.imgICache).clearCache(false); + } + Services.obs.addObserver(observer, "cacheservice:empty-cache"); + let cs = Services.cache2; + cs.clear(); +} + +function cleanup() { + for (var i = 0; i < requests.length; ++i) { + requests[i].cancelAndForgetObserver(0); + } +} + +function run_test() { + registerCleanupFunction(cleanup); + + do_test_pending(); + + Services.prefs.setBoolPref("network.http.rcwn.enabled", false); + + // We create a public channel that loads an image, then an identical + // one that should cause a cache read. We then create a private channel + // and load the same image, and do that a second time to ensure a cache + // read. In total, we should cause two separate http responses to occur, + // since the private channels shouldn't be able to use the public cache. + setup_chan("/image.png", false, function () { + setup_chan("/image.png", false, function () { + setup_chan("/image.png", true, function () { + setup_chan("/image.png", true, function () { + Assert.equal(gHits, 2); + run_loadImage_tests(); + }); + }); + }); + }); +} diff --git a/image/test/unit/xpcshell.toml b/image/test/unit/xpcshell.toml new file mode 100644 index 0000000000..5e1af40fdc --- /dev/null +++ b/image/test/unit/xpcshell.toml @@ -0,0 +1,50 @@ +[DEFAULT] +head = "" +support-files = [ + "async_load_tests.js", + "bug413512.ico", + "bug815359.ico", + "image1.png", + "image1.webp", + "image1quality50.webp", + "image1png16x16.jpg", + "image1png64x64.jpg", + "image2.jpg", + "image2jpg16x16-win.png", + "image2jpg16x16.png", + "image2jpg16x16cropped.jpg", + "image2jpg16x16cropped2.jpg", + "image2jpg16x32cropped3.jpg", + "image2jpg16x32scaled.jpg", + "image2jpg32x16cropped4.jpg", + "image2jpg32x16scaled.jpg", + "image2jpg32x32-win.png", + "image2jpg32x32.jpg", + "image2jpg32x32.png", + "image3.ico", + "image3ico16x16.png", + "image3ico32x32.png", + "image4.gif", + "image4gif16x16bmp24bpp.ico", + "image4gif16x16bmp32bpp.ico", + "image4gif32x32bmp24bpp.ico", + "image4gif32x32bmp32bpp.ico", + "image_load_helpers.js", +] + + +["test_async_notification.js"] + +["test_async_notification_404.js"] + +["test_async_notification_animated.js"] + +["test_encoder_apng.js"] + +["test_encoder_png.js"] + +["test_imgtools.js"] + +["test_moz_icon_uri.js"] + +["test_private_channel.js"] -- cgit v1.2.3