forked from Floorp-Projects/Floorp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 867774 - Tests for animated images with different disposal and bl…
…end modes. r=seth
- Loading branch information
Showing
14 changed files
with
101 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters