Bug 867774 - Tests for animated images with different disposal and blend modes. r=seth
authorJoe Drew <joe@drew.ca>
Tue, 18 Jun 2013 16:24:05 -0400
changeset 135710 f5f8e2d6d991
parent 135709 7158e859e28c
child 135711 6f3461e66694
push id24848
push useremorley@mozilla.com
push date2013-06-20 07:59 +0000
treeherdermozilla-central@83aa31ec53d9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersseth
bugs867774
milestone24.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 867774 - Tests for animated images with different disposal and blend modes. r=seth
image/test/reftest/animated/clear.gif
image/test/reftest/animated/clear.png
image/test/reftest/animated/delaytest.html
image/test/reftest/animated/green.png
image/test/reftest/animated/grey.png
image/test/reftest/animated/keep.gif
image/test/reftest/animated/keep.png
image/test/reftest/animated/nodelaytest.html
image/test/reftest/animated/over.png
image/test/reftest/animated/reftest.list
image/test/reftest/animated/restore-previous.gif
image/test/reftest/animated/restore-previous.png
image/test/reftest/animated/source.png
image/test/reftest/reftest.list
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..7ae79ba86e4e95e9b3aff0f2330dbdecfb3cefef
GIT binary patch
literal 321
zc${<hbhEHbOkqf2SjfcipMe30|AT?zPZmZl21W)Qpcn&4o`I>jr+?+?xBQFeY`N9F
z`QD!2{B4gsrakLi_UhEOcihK6`CR|j`~26r@BjFDxY~~_`q<&4HT}%8&z!wp%df2Z
z+I2Q-`<->)x%s+}KiTxN$8YuZH`{*m_Md+KW!K-n^RK`E+4rAcLc_u%BBP>X#)=&$
lZoK%xkr~0j0CWc@x;t71#vQ=$V1T%T5eONWm|PectN{mVp-TV&
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..b09aecaaa031c1be3239a2ca634f5b0a57f295e8
GIT binary patch
literal 622
zc%17D@N?(olHy`uVBq!ia0vp^DIm<j1SJ1AFfjuuj>O~;A0Q24GwyuV6$YfG(ja0C
zFbxbakiz_efnoZ=eq|t=v%n*=n1O*?7=#%aX3dcR3bL1Y`ns~;WfKxIldGO8@)jsG
z&(p;*q~g}w3x<q9>zEg0{y!IW@I1Rxz|4XxTq!3fsd`V-Vci5_FhxQbjXGe)Qio|^
zMv#Ixn4vjA70eJh0oD~sx%OY%I^!9St2A%oLGm{vHh(iRh^`FT24pWvOK}VV(o6_H
zDQvBO9trZ(1<iGCbaOi{?f1pH;uw!l(%Dml<R@mRzZg;D^62cS4?wm6)K4rN*OL=|
zoCkW2iIE}eXWk>Am~e?}L`iUdT1k0gQ7VI1VnJTILXn}NrTUA_i6C=4UHx3vIVCg!
E086aF5C8xG
new file mode 100644
--- /dev/null
+++ b/image/test/reftest/animated/delaytest.html
@@ -0,0 +1,46 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<head>
+<title>Delayed image reftest wrapper + background colour</title>
+<style>
+img {
+  background-color: rgb(0, 255, 0);
+}
+</style>
+</head>
+<body>
+<img id="image1">
+<script>
+// This loads a externally specified image, forces a draw (in case of
+// decode-on-draw), waits, 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;
+
+function forceDecode() {
+
+  // We need to force drawing of the image in an invisible context
+  var canvas = document.createElement("canvas");
+  var ctx = canvas.getContext("2d");
+  ctx.drawImage(img, 0, 0);
+
+  // We've force the decode. start the timer to trigger the reftest
+  startTimer();
+}
+
+function startTimer() {
+  const delay = 1000;
+  setTimeout("document.documentElement.className = '';", delay);
+}
+</script>
+</body>
+</html>
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..7df25f33bdb26cc7f41138501ab399059839137d
GIT binary patch
literal 255
zc%17D@N?(olHy`uVBq!ia0vp^DIm<j1SJ1AFfjuu&H|6fVg?3oVGw3ym^DWND9B#o
z>FdgVmrY2>Os;yW$XlS$JWm(LkcwMxFBmd1FmNz0$ozjU>fm{HrGS|QSGZD6PEz%r
zro*}k!eEMoFdB8hjHM3Kz>FXTZ!kl1f-0CHassR?l5*|8wspoc9#?7J!~=9GgQu&X
J%Q~loCICH_Rq+4-
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..5c82cdeb10c8ca956122e56fee55ddd67d9df2ad
GIT binary patch
literal 256
zc%17D@N?(olHy`uVBq!ia0vp^DIm<j1SJ1AFfjuu&H|6fVg?3oVGw3ym^DWND9B#o
z>FdgVmrY1SREIOoZy!)-zNd?0NX4zU7YrF07&w>}w*FWZeegWH(gn}1*?|h)({v&?
zrD#r21v5lWOae2wQci*yteYSVrbq~*Q3uRe>HyYtGKgaB*S51}Eo5?SwRR{4I+elG
L)z4*}Q$iB}Q2|sJ
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..e967d6a6dc9683bc432d1d5ef29df094e4f846f4
GIT binary patch
literal 321
zc${<hbhEHbOkqf2SjfcipMe30|AT?zPZmZl21W)Qpcn&4o`I>jrGMq=xBQFeY`N9F
z`QD!2{B4gsrakLi_UhEOcihK6`CR|j`~26r@BjFDxY~~_`q<&4HT}%8&z!wp%df2Z
z+I2Q-`<->)x%s+}KiTxN$8YuZH`{*m_Md+KW!K-n^RK`E+4rAcLc_u%BBP>X#)=&$
iZoK%xkr~0j0C5KciaUA+%pK71U<5)2CMF+725SKQ%b`mE
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..aa3ff7445025fb6c91ad9df2e1f43a005c459126
GIT binary patch
literal 622
zc%17D@N?(olHy`uVBq!ia0vp^DIm<j1SJ1AFfjuuj>O~;A0Q24GwyuV6$YfG(ja0C
zFbxbakiz_efnoZ=eq|t=v%n*=n1O*?7=#%aX3dcR3bL1Y`ns~;WfKxI(>$!P@expH
zo~MgrNX4zU7YrGJ)-fw=t$!YQ@I1TH1<iGCjXIH=Qcg}<>M#w=2vYC{Gc+ftf*B$w
zCV?4TKs6u+>m~?;DH6h<T>E{ot~kcyS--Y#NAfo#c7OA1O8pLGFG@>s3<1(i2tO^z
z{C_SA<fnj{1y^Y2SR%Fm+SVD*c>GT2&XY)fVut#Q5!FveXGeVivIU@iV&S-+obcm3
z&~r?T3|T+(K=CJB;u=vBoS#-wo>-L1;FVaAm#$D`XlSYaVsj$M98Xt2mvv4FO#n9j
B#0>xd
new file mode 100644
--- /dev/null
+++ b/image/test/reftest/animated/nodelaytest.html
@@ -0,0 +1,40 @@
+<!DOCTYPE HTML>
+<html class="reftest-wait">
+<head>
+<title>Delayed image reftest wrapper + background colour</title>
+<style>
+img {
+  background-color: rgb(0, 255, 0);
+}
+</style>
+</head>
+<body>
+<img id="image1">
+<script>
+// This loads a externally specified image, forces a draw (in case of
+// decode-on-draw), and then triggers the reftest snapshot.
+//
+// Use as "nodelaytest.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;
+
+function forceDecode() {
+
+  // We need to force drawing of the image in an invisible context
+  var canvas = document.createElement("canvas");
+  var ctx = canvas.getContext("2d");
+  ctx.drawImage(img, 0, 0);
+
+  // We've force the decode. trigger the reftest
+  setTimeout("document.documentElement.className = '';", 0);
+}
+</script>
+</body>
+</html>
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..9e957182f7e7cf45c3b903d1a2bde8d478087627
GIT binary patch
literal 525
zc%17D@N?(olHy`uVBq!ia0vp^DIm<j1|$m}O$`B39Er&xK0ulYh#6bD7C!^hQfUw|
z2ABp07)W7$!N4&6V81euz0lLeF{I+w+lz+0Kw}PU_-W2-#_`gSIs5915H$ut0R<)|
z7l#H84gp45vnMh-u&{JA!0d#uC*0SawB@z7P{++4Brh>y^%7(C*3d*CdqrA`BPdXq
zK;Ci`1bXZ6221x}8x9s$UU8VbZL#%H7KE*gNi0A@Ndaazt=S6jK;5^U-$Qw4k&n%P
tpj(AYTq8<?^V3So6N^$Ayb=rY(iMsf4K3AQYzBFW!PC{xWt~$(696m2Y5V{H
new file mode 100644
--- /dev/null
+++ b/image/test/reftest/animated/reftest.list
@@ -0,0 +1,12 @@
+# Tests of the allowed disposal operators for both GIF and APNG: keep, clear,
+# and restore previous.
+== delaytest.html?clear.gif nodelaytest.html?green.png
+== delaytest.html?clear.png nodelaytest.html?green.png
+== delaytest.html?keep.gif nodelaytest.html?green.png
+== delaytest.html?keep.png nodelaytest.html?green.png
+== delaytest.html?restore-previous.gif nodelaytest.html?green.png
+== delaytest.html?restore-previous.png nodelaytest.html?green.png
+
+# Test of the blending/compositing operator that only APNG supports.
+== delaytest.html?over.png nodelaytest.html?grey.png
+!= delaytest.html?source.png nodelaytest.html?grey.png
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..15ba9ddc48dfd6e54699763553f2bdb3b096da7a
GIT binary patch
literal 457
zc${<hbhEHbOkqf2SjfcipMe30|AT?zPZmZl21W)Qpcn&4o`I>jr+?+?xBQFeY`N9F
z`QD!2{B4gsrakLi_UhEOcihK6`CR|j`~26r@BjFDxY~~_`q<&4HT}%8&z!wp%df2Z
z+I2Q-`<->)x%s+}KiTxN$8YuZH`{*m_Md+KW!K-n^RK`E+4rAcLc_u%BBP>X#)=&$
kZoK%xkr~0j0C5MyU~mU7dU&)9ba*fVAp;YW3nPOy0O*VBfB*mh
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..09dee638208922cc7ca66ba27b7e31d98f46882d
GIT binary patch
literal 622
zc%17D@N?(olHy`uVBq!ia0vp^DIm<j1SJ1AFfjuuj>O~;A0Q24GwyuV6$YfG(ja0C
zFbxbakiz_efnoZ=eq|t=v%n*=n1O*?7=#%aX3dcR3bL1Y`ns~;WfKxIldGO8@)jsG
z&(p;*q~g}w3x<q9>zEg0{y!IW@I1Rxz|4XxTq!3fsd`V-Vci5_FhxQbjXGe)Qio|^
zMv#Ixn4vjA70eJh0oD~sx%OY%I^!9St2A%oLGm{vHh(iQ*tM{i0@;hwQXE5oG!w#4
z3R~-+M}quxL35oO-Q12#`+c#lIL70XboLY>`H30oFGke3JUTn-1CT8M^%D!n_2h&f
z=YgJMVr0nrnfC}NCS2kgQ4*Y=R#Ki=l*-_hSdf>lP-JLmss3VfBFG$1S3j3^P6<r_
Dvx>ln
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..df1c76dae5d2ecbaa3405d5f3b648ef9c155936c
GIT binary patch
literal 525
zc%17D@N?(olHy`uVBq!ia0vp^DIm<j1|$m}O$`B39Er&xK0ulYh#6bD7C!^hQfUw|
z2ABp07)W7$!N4&6V81euz0lLeF{I+w+lz+0Kw}PU_-W2-#_`gSIs5915H$ut0R<)|
z7l#H84gp45vnMh-u&{JA!0d#uC*0SawB@z7P{++4Brh>y_Y%*h)bBv{inJ6*P@ph@
zyyYke^w!}GmhQhc94xH7;xKvJV(X(U2wNGGSb&6*0?ck&vlZZhx^Fwbhw{!MADjO`
sw+ffIMwA5Sr<If^7Ns(HB^KnRD-;<TTB^U;oCxxtr>mdKI;Vst09PDpF8}}l
--- a/image/test/reftest/reftest.list
+++ b/image/test/reftest/reftest.list
@@ -43,8 +43,11 @@ include generic/reftest.list
 # Color management test
 include color-management/reftest.list
 
 # Lossless encoders
 skip-if(Android||B2G) include encoders-lossless/reftest.list # bug 783621
 
 # WBMP tests
 #skip-if(!B2G) include wbmp/reftest.list # bug 852053
+
+# Animated image disposal and blending operator tests
+include animated/reftest.list