diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:47:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:47:29 +0000 |
commit | 0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d (patch) | |
tree | a31f07c9bcca9d56ce61e9a1ffd30ef350d513aa /image/test/reftest/gif | |
parent | Initial commit. (diff) | |
download | firefox-esr-0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d.tar.xz firefox-esr-0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d.zip |
Adding upstream version 115.8.0esr.upstream/115.8.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'image/test/reftest/gif')
38 files changed, 272 insertions, 0 deletions
diff --git a/image/test/reftest/gif/1bit-255-trans.gif b/image/test/reftest/gif/1bit-255-trans.gif Binary files differnew file mode 100644 index 0000000000..60273ba81d --- /dev/null +++ b/image/test/reftest/gif/1bit-255-trans.gif diff --git a/image/test/reftest/gif/1bit-255-trans.png b/image/test/reftest/gif/1bit-255-trans.png Binary files differnew file mode 100644 index 0000000000..611480ac4c --- /dev/null +++ b/image/test/reftest/gif/1bit-255-trans.png 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 Binary files differnew file mode 100644 index 0000000000..d328276545 --- /dev/null +++ b/image/test/reftest/gif/animation1a.gif diff --git a/image/test/reftest/gif/animation2a-finalframe.gif b/image/test/reftest/gif/animation2a-finalframe.gif Binary files differnew file mode 100644 index 0000000000..8d9c4aaf7d --- /dev/null +++ b/image/test/reftest/gif/animation2a-finalframe.gif diff --git a/image/test/reftest/gif/animation2a.gif b/image/test/reftest/gif/animation2a.gif Binary files differnew file mode 100644 index 0000000000..07abf8d986 --- /dev/null +++ b/image/test/reftest/gif/animation2a.gif diff --git a/image/test/reftest/gif/blue.gif b/image/test/reftest/gif/blue.gif Binary files differnew file mode 100644 index 0000000000..f9dbeeea8e --- /dev/null +++ b/image/test/reftest/gif/blue.gif diff --git a/image/test/reftest/gif/comment.gif b/image/test/reftest/gif/comment.gif Binary files differnew file mode 100644 index 0000000000..255cceb418 --- /dev/null +++ b/image/test/reftest/gif/comment.gif diff --git a/image/test/reftest/gif/comment.png b/image/test/reftest/gif/comment.png Binary files differnew file mode 100644 index 0000000000..89394ba186 --- /dev/null +++ b/image/test/reftest/gif/comment.png 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 @@ +<!DOCTYPE HTML> +<html class="reftest-wait"> +<head> +<title>Delayed image reftest wrapper</title> +</head> +<body> +<!-- non-empty alt to avoid the broken image icon --> +<img id="image1" alt=" "> +<script> + +window.addEventListener("MozReftestInvalidate", reftestInvalidateListener); + +// This loads a externally specified image, forces a draw (in case of +// decode-on-draw), waits 100ms, and then triggers the reftest snapshot. +// This allows the animation on the page to complete. +// +// Use as "delaytest.html?animation.png" +// + +// Get the image URL from our URL +var imgURL = document.location.search.substr(1); + +// Load the image +var img = document.images[0]; +img.src = imgURL; +img.onload = forceDecode; + +let decodeComplete = false; +let gotReftestInvalidate = false; + +function forceDecode() { + img.decode().then(function() { + decodeComplete = true; + maybeStartTimer(); + }, function() { + decodeComplete = true; + maybeStartTimer(); + }); +} + +function reftestInvalidateListener() { + gotReftestInvalidate = true; + maybeStartTimer(); +} + +function maybeStartTimer() { + if (decodeComplete && gotReftestInvalidate) { + startTimer(); + } +} + +function startTimer() { + const delay = 500; + setTimeout("document.documentElement.className = '';", delay); +} +</script> +</body> +</html> diff --git a/image/test/reftest/gif/in-colormap-trans.gif b/image/test/reftest/gif/in-colormap-trans.gif Binary files differnew file mode 100644 index 0000000000..48f5c7caf1 --- /dev/null +++ b/image/test/reftest/gif/in-colormap-trans.gif diff --git a/image/test/reftest/gif/in-colormap-trans.png b/image/test/reftest/gif/in-colormap-trans.png Binary files differnew file mode 100644 index 0000000000..08761dfe41 --- /dev/null +++ b/image/test/reftest/gif/in-colormap-trans.png diff --git a/image/test/reftest/gif/one-color-offset-ref.gif b/image/test/reftest/gif/one-color-offset-ref.gif Binary files differnew file mode 100644 index 0000000000..14a59ff477 --- /dev/null +++ b/image/test/reftest/gif/one-color-offset-ref.gif diff --git a/image/test/reftest/gif/one-color-offset.gif b/image/test/reftest/gif/one-color-offset.gif Binary files differnew file mode 100644 index 0000000000..e6d7c49322 --- /dev/null +++ b/image/test/reftest/gif/one-color-offset.gif 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 @@ +<!DOCTYPE html> +<style> +html{ +background-color:black; +} +div { + width: 200px; + height: 200px; +} +</style> +<div></div> 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 @@ +<!DOCTYPE html> +<style> +html{ +background-color:black; +} +div { + width: 200px; + height: 200px; +} +</style> +<div style="background-image:url(data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=)"></div> diff --git a/image/test/reftest/gif/out-of-colormap-trans.gif b/image/test/reftest/gif/out-of-colormap-trans.gif Binary files differnew file mode 100644 index 0000000000..17e747c9b2 --- /dev/null +++ b/image/test/reftest/gif/out-of-colormap-trans.gif diff --git a/image/test/reftest/gif/out-of-colormap-trans.png b/image/test/reftest/gif/out-of-colormap-trans.png Binary files differnew file mode 100644 index 0000000000..8d3eb581a2 --- /dev/null +++ b/image/test/reftest/gif/out-of-colormap-trans.png diff --git a/image/test/reftest/gif/red.gif b/image/test/reftest/gif/red.gif Binary files differnew file mode 100644 index 0000000000..d3c32bae25 --- /dev/null +++ b/image/test/reftest/gif/red.gif 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 Binary files differnew file mode 100644 index 0000000000..b513c41aa2 --- /dev/null +++ b/image/test/reftest/gif/small-background-size-2-ref.gif diff --git a/image/test/reftest/gif/small-background-size-2.gif b/image/test/reftest/gif/small-background-size-2.gif Binary files differnew file mode 100644 index 0000000000..a5e2147678 --- /dev/null +++ b/image/test/reftest/gif/small-background-size-2.gif diff --git a/image/test/reftest/gif/small-background-size-ref.gif b/image/test/reftest/gif/small-background-size-ref.gif Binary files differnew file mode 100644 index 0000000000..1b656ce439 --- /dev/null +++ b/image/test/reftest/gif/small-background-size-ref.gif diff --git a/image/test/reftest/gif/small-background-size.gif b/image/test/reftest/gif/small-background-size.gif Binary files differnew file mode 100644 index 0000000000..8185eb71e8 --- /dev/null +++ b/image/test/reftest/gif/small-background-size.gif 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 @@ +<!DOCTYPE HTML> +<html class="reftest-wait"> +<head> +<title>Test for bug 641198</title> +<link rel="stylesheet" href="ImageDocument.css"> +<style type="text/css" media=screen> + a.animated1 { + display: block; + width: 40px; + height: 40px; + background: url("animation1a.gif") no-repeat 0 0; + } + + a.animated1 span { + position: absolute; + top: -999em; + } + + a.animated2 { + display: block; + width: 40px; + height: 40px; + background: url("animation2a.gif") no-repeat 0 0; + } + + a.animated2 span { + position: absolute; + top: -999em; + } +</style> +</head> +<body onload="doTimeout()"> + +<a id="animated" href="#" title="Animated"><span>Animated</span></a> + +<script> +// We check whether changing the class will lead to the animation being +// run from the beginning, even if the animation was already shown +// before. +var counter = 0; +function doTimeout() { + if (counter == 4) { + document.documentElement.className = ''; + } else { + document.getElementById("animated").setAttribute("class", "animated" + ((counter % 2)+1)); + setTimeout(doTimeout, counter == 3 ? 500 : 250); // Wait a bit more for the last one, to prevent oranges + } + counter++; +} +</script> +</body> +</html> + 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 @@ +<!DOCTYPE html> +<!-- +https://bugzilla.mozilla.org/show_bug.cgi?id=1068230 +--> +<html> +<head> + <title>Intermediate surface should be transformed correctly when tiling an image</title> +</head> +<body> +<button style="margin: 10px; padding: 10px; border: none; background: url('tiletest-ref.png');"></button> +</body> +</html> 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 @@ +<!DOCTYPE html> +<!-- +https://bugzilla.mozilla.org/show_bug.cgi?id=1068230 +--> +<html> +<head> + <title>Intermediate surface should be transformed correctly when tiling an image</title> +</head> +<body> +<button style="margin: 10px; padding: 10px; border: none; background: url('tiletest.gif');"></button> +</body> +</html> diff --git a/image/test/reftest/gif/tiletest-ref.png b/image/test/reftest/gif/tiletest-ref.png Binary files differnew file mode 100644 index 0000000000..b493899cc8 --- /dev/null +++ b/image/test/reftest/gif/tiletest-ref.png diff --git a/image/test/reftest/gif/tiletest.gif b/image/test/reftest/gif/tiletest.gif Binary files differnew file mode 100644 index 0000000000..7a04c9654a --- /dev/null +++ b/image/test/reftest/gif/tiletest.gif diff --git a/image/test/reftest/gif/transparent-animation-finalframe.gif b/image/test/reftest/gif/transparent-animation-finalframe.gif Binary files differnew file mode 100644 index 0000000000..a55f92a813 --- /dev/null +++ b/image/test/reftest/gif/transparent-animation-finalframe.gif 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 @@ +<!DOCTYPE HTML> +<html> +<body> +<img src="transparent-animation-finalframe.gif"> +</body> +</html> diff --git a/image/test/reftest/gif/transparent-animation.gif b/image/test/reftest/gif/transparent-animation.gif Binary files differnew file mode 100644 index 0000000000..b2895487bd --- /dev/null +++ b/image/test/reftest/gif/transparent-animation.gif diff --git a/image/test/reftest/gif/truncated-framerect-interlaced-ref.gif b/image/test/reftest/gif/truncated-framerect-interlaced-ref.gif Binary files differnew file mode 100644 index 0000000000..ca9bf2fa71 --- /dev/null +++ b/image/test/reftest/gif/truncated-framerect-interlaced-ref.gif diff --git a/image/test/reftest/gif/truncated-framerect-interlaced.gif b/image/test/reftest/gif/truncated-framerect-interlaced.gif Binary files differnew file mode 100644 index 0000000000..59709898bd --- /dev/null +++ b/image/test/reftest/gif/truncated-framerect-interlaced.gif diff --git a/image/test/reftest/gif/truncated-framerect-ref.gif b/image/test/reftest/gif/truncated-framerect-ref.gif Binary files differnew file mode 100644 index 0000000000..ab79a455b0 --- /dev/null +++ b/image/test/reftest/gif/truncated-framerect-ref.gif 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 @@ +<!DOCTYPE html> +<!-- Any copyright is dedicated to the Public Domain. + - http://creativecommons.org/publicdomain/zero/1.0/ --> +<html> + <head> + <title>Bug 1234077 - Make sure GIFs still render correctly with a truncated frameRect</title> + <style type="text/css"> + div, img { + padding: 0; + margin: 0; + border: 0; + overflow: hidden; + width: 200px; + height: 200px; + } + + div img { + margin: 136px 0 0 136px; + } + </style> + </head> + <body> + <img src="truncated-framerect-interlaced-ref.gif" /> + + <div> + <img src="truncated-framerect-ref.gif" /> + </div> + + <div> + <img src="truncated-framerect-interlaced-ref.gif" /> + </div> + </body> +</html> diff --git a/image/test/reftest/gif/truncated-framerect.gif b/image/test/reftest/gif/truncated-framerect.gif Binary files differnew file mode 100644 index 0000000000..8febb2a748 --- /dev/null +++ b/image/test/reftest/gif/truncated-framerect.gif 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 @@ +<!DOCTYPE html> +<!-- Any copyright is dedicated to the Public Domain. + - http://creativecommons.org/publicdomain/zero/1.0/ --> +<html> + <head> + <title>Bug 1234077 - Make sure GIFs still render correctly with a truncated frameRect</title> + <style type="text/css"> + div, img { + padding: 0; + margin: 0; + border: 0; + width: 200px; + height: 200px; + } + </style> + </head> + <body> + <img src="truncated-framerect-ref.gif" /> + + <div> + <img src="truncated-framerect.gif" /> + </div> + + <div> + <img src="truncated-framerect-interlaced.gif" /> + </div> + </body> +</html> |