diff options
Diffstat (limited to 'image/test/reftest/bmp/bmpsuite/b')
33 files changed, 138 insertions, 0 deletions
diff --git a/image/test/reftest/bmp/bmpsuite/b/badbitcount.bmp b/image/test/reftest/bmp/bmpsuite/b/badbitcount.bmp Binary files differnew file mode 100644 index 0000000000..d4fa4e8b88 --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/b/badbitcount.bmp diff --git a/image/test/reftest/bmp/bmpsuite/b/badbitssize.bmp b/image/test/reftest/bmp/bmpsuite/b/badbitssize.bmp Binary files differnew file mode 100644 index 0000000000..0a99a605af --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/b/badbitssize.bmp diff --git a/image/test/reftest/bmp/bmpsuite/b/baddens1.bmp b/image/test/reftest/bmp/bmpsuite/b/baddens1.bmp Binary files differnew file mode 100644 index 0000000000..a6150a6fe7 --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/b/baddens1.bmp diff --git a/image/test/reftest/bmp/bmpsuite/b/baddens2.bmp b/image/test/reftest/bmp/bmpsuite/b/baddens2.bmp Binary files differnew file mode 100644 index 0000000000..f2c1dfb665 --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/b/baddens2.bmp diff --git a/image/test/reftest/bmp/bmpsuite/b/badfilesize.bmp b/image/test/reftest/bmp/bmpsuite/b/badfilesize.bmp Binary files differnew file mode 100644 index 0000000000..da52cb51d7 --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/b/badfilesize.bmp diff --git a/image/test/reftest/bmp/bmpsuite/b/badheadersize.bmp b/image/test/reftest/bmp/bmpsuite/b/badheadersize.bmp Binary files differnew file mode 100644 index 0000000000..2a4083a6f9 --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/b/badheadersize.bmp diff --git a/image/test/reftest/bmp/bmpsuite/b/badpalettesize.bmp b/image/test/reftest/bmp/bmpsuite/b/badpalettesize.bmp Binary files differnew file mode 100644 index 0000000000..7d9d1b745d --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/b/badpalettesize.bmp diff --git a/image/test/reftest/bmp/bmpsuite/b/badplanes.bmp b/image/test/reftest/bmp/bmpsuite/b/badplanes.bmp Binary files differnew file mode 100644 index 0000000000..92d2855b62 --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/b/badplanes.bmp diff --git a/image/test/reftest/bmp/bmpsuite/b/badrle.bmp b/image/test/reftest/bmp/bmpsuite/b/badrle.bmp Binary files differnew file mode 100644 index 0000000000..cbf8fdc2e1 --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/b/badrle.bmp diff --git a/image/test/reftest/bmp/bmpsuite/b/badrle.png b/image/test/reftest/bmp/bmpsuite/b/badrle.png Binary files differnew file mode 100644 index 0000000000..1764ef9f98 --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/b/badrle.png diff --git a/image/test/reftest/bmp/bmpsuite/b/badrle4.bmp b/image/test/reftest/bmp/bmpsuite/b/badrle4.bmp Binary files differnew file mode 100644 index 0000000000..632787a730 --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/b/badrle4.bmp diff --git a/image/test/reftest/bmp/bmpsuite/b/badrle4.png b/image/test/reftest/bmp/bmpsuite/b/badrle4.png Binary files differnew file mode 100644 index 0000000000..7f5af39fe0 --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/b/badrle4.png diff --git a/image/test/reftest/bmp/bmpsuite/b/badrle4bis.bmp b/image/test/reftest/bmp/bmpsuite/b/badrle4bis.bmp Binary files differnew file mode 100644 index 0000000000..130b7e659c --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/b/badrle4bis.bmp diff --git a/image/test/reftest/bmp/bmpsuite/b/badrle4bis.png b/image/test/reftest/bmp/bmpsuite/b/badrle4bis.png Binary files differnew file mode 100644 index 0000000000..7d0d95871a --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/b/badrle4bis.png diff --git a/image/test/reftest/bmp/bmpsuite/b/badrle4ter.bmp b/image/test/reftest/bmp/bmpsuite/b/badrle4ter.bmp Binary files differnew file mode 100644 index 0000000000..8107a335fc --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/b/badrle4ter.bmp diff --git a/image/test/reftest/bmp/bmpsuite/b/badrle4ter.png b/image/test/reftest/bmp/bmpsuite/b/badrle4ter.png Binary files differnew file mode 100644 index 0000000000..230bb60f47 --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/b/badrle4ter.png diff --git a/image/test/reftest/bmp/bmpsuite/b/badrlebis.bmp b/image/test/reftest/bmp/bmpsuite/b/badrlebis.bmp Binary files differnew file mode 100644 index 0000000000..893eb11ab7 --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/b/badrlebis.bmp diff --git a/image/test/reftest/bmp/bmpsuite/b/badrlebis.png b/image/test/reftest/bmp/bmpsuite/b/badrlebis.png Binary files differnew file mode 100644 index 0000000000..f0094a1156 --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/b/badrlebis.png diff --git a/image/test/reftest/bmp/bmpsuite/b/badrleter.bmp b/image/test/reftest/bmp/bmpsuite/b/badrleter.bmp Binary files differnew file mode 100644 index 0000000000..04d5874e67 --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/b/badrleter.bmp diff --git a/image/test/reftest/bmp/bmpsuite/b/badrleter.png b/image/test/reftest/bmp/bmpsuite/b/badrleter.png Binary files differnew file mode 100644 index 0000000000..359bc12e12 --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/b/badrleter.png diff --git a/image/test/reftest/bmp/bmpsuite/b/badwidth.bmp b/image/test/reftest/bmp/bmpsuite/b/badwidth.bmp Binary files differnew file mode 100644 index 0000000000..9fca005dc3 --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/b/badwidth.bmp diff --git a/image/test/reftest/bmp/bmpsuite/b/pal1.png b/image/test/reftest/bmp/bmpsuite/b/pal1.png Binary files differnew file mode 100644 index 0000000000..89a433ed76 --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/b/pal1.png diff --git a/image/test/reftest/bmp/bmpsuite/b/pal8.png b/image/test/reftest/bmp/bmpsuite/b/pal8.png Binary files differnew file mode 100644 index 0000000000..2bfd3e650f --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/b/pal8.png diff --git a/image/test/reftest/bmp/bmpsuite/b/pal8badindex.bmp b/image/test/reftest/bmp/bmpsuite/b/pal8badindex.bmp Binary files differnew file mode 100644 index 0000000000..efe16c05c1 --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/b/pal8badindex.bmp diff --git a/image/test/reftest/bmp/bmpsuite/b/pal8badindex.png b/image/test/reftest/bmp/bmpsuite/b/pal8badindex.png Binary files differnew file mode 100644 index 0000000000..0efb392b9e --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/b/pal8badindex.png diff --git a/image/test/reftest/bmp/bmpsuite/b/reallybig.bmp b/image/test/reftest/bmp/bmpsuite/b/reallybig.bmp Binary files differnew file mode 100644 index 0000000000..101e0b4943 --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/b/reallybig.bmp 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: <no "BMP:" output is produced for files with bad header sizes> +# "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 Binary files differnew file mode 100644 index 0000000000..72e7ce0eaf --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/b/rgb16-880.bmp diff --git a/image/test/reftest/bmp/bmpsuite/b/rgb16-880.png b/image/test/reftest/bmp/bmpsuite/b/rgb16-880.png Binary files differnew file mode 100644 index 0000000000..9450eba2bb --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/b/rgb16-880.png diff --git a/image/test/reftest/bmp/bmpsuite/b/rletopdown.bmp b/image/test/reftest/bmp/bmpsuite/b/rletopdown.bmp Binary files differnew file mode 100644 index 0000000000..21a909fda9 --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/b/rletopdown.bmp diff --git a/image/test/reftest/bmp/bmpsuite/b/shortfile.bmp b/image/test/reftest/bmp/bmpsuite/b/shortfile.bmp Binary files differnew file mode 100644 index 0000000000..73960797b9 --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/b/shortfile.bmp diff --git a/image/test/reftest/bmp/bmpsuite/b/shortfile.png b/image/test/reftest/bmp/bmpsuite/b/shortfile.png Binary files differnew file mode 100644 index 0000000000..0ec21d9295 --- /dev/null +++ b/image/test/reftest/bmp/bmpsuite/b/shortfile.png 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 @@ +<!DOCTYPE HTML> +<html class="reftest-wait"> +<head> +<title>Image reftest wrapper</title> +<style type="text/css"> + #image1 { background-color: rgb(10, 100, 250); } +</style> +<script> + // The image is loaded async after the page loads + // wait for it to finish loading + function onImageLoad() { + document.documentElement.removeAttribute("class"); + }; +</script> +</head> +<body> +<!-- non-empty alt to avoid the broken image icon --> +<img id="image1" alt=" "> +<script> + // Use as "wrapper.html?image.png" + var imgURL = document.location.search.substr(1); + document.images[0].onload = onImageLoad; + document.images[0].onerror = onImageLoad; + document.images[0].src = imgURL; +</script> +</body> +</html> + |