Backed out 3 changesets (bug 1470350) for reftest failures in image/test/crashtests/delaytest.html?523528-1.gif CLOSED TREE

Backed out changeset 78dfbdcb7eea (bug 1470350)
Backed out changeset 01aae64a6b4b (bug 1470350)
Backed out changeset 8fa4c531ab77 (bug 1470350)
This commit is contained in:
Stefan Hindli 2020-04-08 04:08:59 +03:00
parent 772d2f3c88
commit e2003e251b
8 changed files with 23 additions and 78 deletions

View File

@ -7,9 +7,6 @@
<!-- 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 350ms, and then triggers the reftest snapshot.
// This allows the animation on the page to complete.
@ -26,25 +23,17 @@ img.src = imgURL;
img.onload = forceDecode;
img.onerror = forceDecode;
let decodeComplete = false;
let gotReftestInvalidate = false;
function forceDecode() {
img.decode().then(function() {
decodeComplete = true;
maybeStartTimer();
});
}
function reftestInvalidateListener() {
gotReftestInvalidate = true;
maybeStartTimer();
}
try {
// 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);
} catch(e) {}
function maybeStartTimer() {
if (decodeComplete && gotReftestInvalidate) {
startTimer();
}
// We've force the decode. start the timer to trigger the reftest
startTimer();
}
function startTimer() {

View File

@ -1,6 +0,0 @@
<!DOCTYPE HTML>
<html>
<body>
<img src="bug411852-1-ref.png">
</body>
</html>

View File

@ -1,6 +0,0 @@
<!DOCTYPE HTML>
<html>
<body>
<img src="bug546272-ref.png">
</body>
</html>

View File

@ -7,9 +7,6 @@
<!-- 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.
@ -25,25 +22,15 @@ 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 reftestInvalidateListener() {
gotReftestInvalidate = true;
maybeStartTimer();
}
// 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);
function maybeStartTimer() {
if (decodeComplete && gotReftestInvalidate) {
startTimer();
}
// We've force the decode. start the timer to trigger the reftest
startTimer();
}
function startTimer() {

View File

@ -2,5 +2,5 @@
#
# 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
random == delaytest.html?bug411852-1.png bug411852-1-ref.png
random == delaytest.html?bug546272.png bug546272-ref.png

View File

@ -7,9 +7,6 @@
<!-- 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.
@ -25,25 +22,15 @@ 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 reftestInvalidateListener() {
gotReftestInvalidate = true;
maybeStartTimer();
}
// 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);
function maybeStartTimer() {
if (decodeComplete && gotReftestInvalidate) {
startTimer();
}
// We've force the decode. start the timer to trigger the reftest
startTimer();
}
function startTimer() {

View File

@ -14,7 +14,7 @@
# 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
random == delaytest.html?transparent-animation.gif transparent-animation-finalframe.gif # incorrect timing dependence (bug 558678)
# test for bug 641198
skip == test_bug641198.html animation2a-finalframe.gif # Disabled; see bug 1120144.

View File

@ -1,6 +0,0 @@
<!DOCTYPE HTML>
<html>
<body>
<img src="transparent-animation-finalframe.gif">
</body>
</html>