mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Bug 1261964 part 2: Add reftest for downscaling a moz-icon image. r=seth
MozReview-Commit-ID: 61m5k5mYSWN
This commit is contained in:
parent
a9f89f1558
commit
53e62d6130
37
image/test/reftest/downscaling/downscale-moz-icon-1-ref.html
Normal file
37
image/test/reftest/downscaling/downscale-moz-icon-1-ref.html
Normal file
@ -0,0 +1,37 @@
|
||||
<!DOCTYPE html>
|
||||
<!-- Any copyright is dedicated to the Public Domain.
|
||||
- http://creativecommons.org/publicdomain/zero/1.0/ -->
|
||||
<html class="reftest-wait">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Reference for downscaling moz-icon images (bug 1261964)</title>
|
||||
<script>
|
||||
function beginTest() {
|
||||
var canvas = document.getElementById("canvas");
|
||||
var ctx = canvas.getContext("2d");
|
||||
var image = new Image();
|
||||
|
||||
image.onload = function() {
|
||||
// When image loads: draw it to canvas, scale down the canvas, and
|
||||
// then let the reftest snapshot happen.
|
||||
ctx.drawImage(image, 0, 0);
|
||||
canvas.setAttribute("class", "downscale");
|
||||
document.documentElement.removeAttribute("class");
|
||||
}
|
||||
|
||||
// Kick off the image load:
|
||||
image.src = "moz-icon://bogus-unrecognized-icon?size=100";
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
body { margin: 0; }
|
||||
.downscale {
|
||||
transform-origin: 0 0;
|
||||
transform: scale(0.9);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onload="beginTest()">
|
||||
<canvas id="canvas" height="100px" width="100px"></canvas>
|
||||
</body>
|
||||
</html>
|
19
image/test/reftest/downscaling/downscale-moz-icon-1.html
Normal file
19
image/test/reftest/downscaling/downscale-moz-icon-1.html
Normal file
@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<!-- Any copyright is dedicated to the Public Domain.
|
||||
- http://creativecommons.org/publicdomain/zero/1.0/ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Testcase for downscaling moz-icon images (bug 1261964)</title>
|
||||
<style>
|
||||
body { margin: 0; }
|
||||
.downscale {
|
||||
transform-origin: 0 0;
|
||||
transform: scale(0.9);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<img class="downscale" src="moz-icon://bogus-unrecognized-icon?size=100">
|
||||
</body>
|
||||
</html>
|
@ -87,6 +87,8 @@ fuzzy(20,999) != downscale-2c.html?205,53,bottom about:blank
|
||||
fuzzy(20,999) != downscale-2d.html?205,53,bottom about:blank
|
||||
fuzzy(20,999) fails-if(OSX>=1008&&!skiaContent) != downscale-2e.html?205,53,bottom about:blank
|
||||
|
||||
fuzzy(28,3386) == downscale-moz-icon-1.html downscale-moz-icon-1-ref.html
|
||||
|
||||
== downscale-png.html?16,16,interlaced downscale-png.html?16,16,normal
|
||||
== downscale-png.html?24,24,interlaced downscale-png.html?24,24,normal
|
||||
|
||||
@ -168,6 +170,8 @@ fuzzy(20,999) != downscale-2d.html?205,53,bottom about:blank
|
||||
fuzzy(20,999) != downscale-2e.html?205,53,bottom about:blank
|
||||
fuzzy(20,999) != downscale-2f.html?205,53,bottom about:blank
|
||||
|
||||
fuzzy(36,4439) == downscale-moz-icon-1.html downscale-moz-icon-1-ref.html
|
||||
|
||||
== downscale-png.html?16,16,interlaced downscale-png.html?16,16,normal
|
||||
== downscale-png.html?24,24,interlaced downscale-png.html?24,24,normal
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user