Bug 925611 - Add reftests. r=tn

This commit is contained in:
Seth Fowler 2014-08-12 14:05:27 -07:00
parent 126022ad5a
commit ce94866115
11 changed files with 305 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<!-- Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ -->
<html reftest-zoom="1.0" class="reftest-wait">
<head>
<script>
function snapshot() {
document.documentElement.removeAttribute('class');
}
</script>
</head>
<!-- NOTE: Using setTimeout to wait for high-quality downscaled version of
image to be ready, because there's nothing better we can do. If we fix
Bug 1006883, we can do away with this setTimeout.
For now, the setTimeout is just here to increase the likelihood that we
actually test the high-quality downscaled version of the image. If the
setTimeout happens to fire before the high-quality downscaled rendering is
ready, then this the test will pass without testing what it's trying to
test, which is fine as long as that's rare. -->
<body style="margin: 0px" onload="setTimeout(snapshot, 50)">
<script>
var args = location.search.substring(1).split(',');
var image = document.createElement('img');
image.width = args[0];
image.height = args[1];
image.src = 'black-border-' + args[2] + '.png';
document.body.appendChild(image);
</script>
</body>
</html>

View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<!-- Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ -->
<html reftest-zoom="0.9" class="reftest-wait">
<head>
<script>
function snapshot() {
document.documentElement.removeAttribute('class');
}
</script>
</head>
<!-- NOTE: Using setTimeout to wait for high-quality downscaled version of
image to be ready, because there's nothing better we can do. If we fix
Bug 1006883, we can do away with this setTimeout.
For now, the setTimeout is just here to increase the likelihood that we
actually test the high-quality downscaled version of the image. If the
setTimeout happens to fire before the high-quality downscaled rendering is
ready, then this the test will pass without testing what it's trying to
test, which is fine as long as that's rare. -->
<body style="margin: 0px" onload="setTimeout(snapshot, 50)">
<script>
var args = location.search.substring(1).split(',');
var image = document.createElement('img');
image.width = args[0];
image.height = args[1];
image.src = 'black-border-' + args[2] + '.png';
document.body.appendChild(image);
</script>
</body>
</html>

View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<!-- Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ -->
<html reftest-zoom="0.8" class="reftest-wait">
<head>
<script>
function snapshot() {
document.documentElement.removeAttribute('class');
}
</script>
</head>
<!-- NOTE: Using setTimeout to wait for high-quality downscaled version of
image to be ready, because there's nothing better we can do. If we fix
Bug 1006883, we can do away with this setTimeout.
For now, the setTimeout is just here to increase the likelihood that we
actually test the high-quality downscaled version of the image. If the
setTimeout happens to fire before the high-quality downscaled rendering is
ready, then this the test will pass without testing what it's trying to
test, which is fine as long as that's rare. -->
<body style="margin: 0px" onload="setTimeout(snapshot, 50)">
<script>
var args = location.search.substring(1).split(',');
var image = document.createElement('img');
image.width = args[0];
image.height = args[1];
image.src = 'black-border-' + args[2] + '.png';
document.body.appendChild(image);
</script>
</body>
</html>

View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<!-- Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ -->
<html reftest-zoom="0.67" class="reftest-wait">
<head>
<script>
function snapshot() {
document.documentElement.removeAttribute('class');
}
</script>
</head>
<!-- NOTE: Using setTimeout to wait for high-quality downscaled version of
image to be ready, because there's nothing better we can do. If we fix
Bug 1006883, we can do away with this setTimeout.
For now, the setTimeout is just here to increase the likelihood that we
actually test the high-quality downscaled version of the image. If the
setTimeout happens to fire before the high-quality downscaled rendering is
ready, then this the test will pass without testing what it's trying to
test, which is fine as long as that's rare. -->
<body style="margin: 0px" onload="setTimeout(snapshot, 50)">
<script>
var args = location.search.substring(1).split(',');
var image = document.createElement('img');
image.width = args[0];
image.height = args[1];
image.src = 'black-border-' + args[2] + '.png';
document.body.appendChild(image);
</script>
</body>
</html>

View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<!-- Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ -->
<html reftest-zoom="0.5" class="reftest-wait">
<head>
<script>
function snapshot() {
document.documentElement.removeAttribute('class');
}
</script>
</head>
<!-- NOTE: Using setTimeout to wait for high-quality downscaled version of
image to be ready, because there's nothing better we can do. If we fix
Bug 1006883, we can do away with this setTimeout.
For now, the setTimeout is just here to increase the likelihood that we
actually test the high-quality downscaled version of the image. If the
setTimeout happens to fire before the high-quality downscaled rendering is
ready, then this the test will pass without testing what it's trying to
test, which is fine as long as that's rare. -->
<body style="margin: 0px" onload="setTimeout(snapshot, 50)">
<script>
var args = location.search.substring(1).split(',');
var image = document.createElement('img');
image.width = args[0];
image.height = args[1];
image.src = 'black-border-' + args[2] + '.png';
document.body.appendChild(image);
</script>
</body>
</html>

View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<!-- Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ -->
<html reftest-zoom="0.3" class="reftest-wait">
<head>
<script>
function snapshot() {
document.documentElement.removeAttribute('class');
}
</script>
</head>
<!-- NOTE: Using setTimeout to wait for high-quality downscaled version of
image to be ready, because there's nothing better we can do. If we fix
Bug 1006883, we can do away with this setTimeout.
For now, the setTimeout is just here to increase the likelihood that we
actually test the high-quality downscaled version of the image. If the
setTimeout happens to fire before the high-quality downscaled rendering is
ready, then this the test will pass without testing what it's trying to
test, which is fine as long as that's rare. -->
<body style="margin: 0px" onload="setTimeout(snapshot, 50)">
<script>
var args = location.search.substring(1).split(',');
var image = document.createElement('img');
image.width = args[0];
image.height = args[1];
image.src = 'black-border-' + args[2] + '.png';
document.body.appendChild(image);
</script>
</body>
</html>

View File

@ -4,6 +4,14 @@
# as long as it's barely noticable visually. When necessary, this can be
# explicitly allowed via 'fuzzy'/'fuzzy-if' annotations.
#
# Many of these tests check primarily that we don't lose rows or columns of
# pixels when downscaling by making sure that the result isn't too similar to
# about:blank. A small amount of fuzziness is used to ensure that the tests
# don't pass because of very slight deviations; passing tests should be
# substantially different from about:blank. This fuzziness should *not* be
# removed as doing so would make the tests pass in situations where they
# shouldn't.
#
# IMPORTANT: For robustness, each test should be listed *twice* in this
# manifest -- once with the high quality downscaling pref disabled, and once
# with this pref enabled. The pref is set via "default-preferences", so
@ -19,6 +27,61 @@ default-preferences pref(image.high_quality_downscaling.enabled,false)
fuzzy-if(cocoaWidget,106,31) == downscale-1.html downscale-1-ref.html
fuzzy(5,999) random != downscale-2a.html?203,52,left about:blank
fuzzy(5,999) random != downscale-2b.html?203,52,left about:blank
fuzzy(5,999) random != downscale-2c.html?203,52,left about:blank
fuzzy(5,999) random != downscale-2d.html?203,52,left about:blank
fuzzy(5,999) random != downscale-2e.html?203,52,left about:blank
fuzzy(5,999) random != downscale-2f.html?203,52,left about:blank
fuzzy(5,999) random != downscale-2a.html?205,53,left about:blank
fuzzy(5,999) random != downscale-2b.html?205,53,left about:blank
fuzzy(5,999) random != downscale-2c.html?205,53,left about:blank
fuzzy(5,999) random != downscale-2d.html?205,53,left about:blank
fuzzy(5,999) random != downscale-2e.html?205,53,left about:blank
fuzzy(5,999) random != downscale-2f.html?205,53,left about:blank
fuzzy(5,999) random != downscale-2a.html?203,52,right about:blank
fuzzy(5,999) random != downscale-2b.html?203,52,right about:blank
fuzzy(5,999) random != downscale-2c.html?203,52,right about:blank
fuzzy(5,999) random != downscale-2d.html?203,52,right about:blank
fuzzy(5,999) random != downscale-2e.html?203,52,right about:blank
fuzzy(5,999) random != downscale-2f.html?203,52,right about:blank
fuzzy(5,999) random != downscale-2a.html?205,53,right about:blank
fuzzy(5,999) random != downscale-2b.html?205,53,right about:blank
fuzzy(5,999) random != downscale-2c.html?205,53,right about:blank
fuzzy(5,999) random != downscale-2d.html?205,53,right about:blank
fuzzy(5,999) random != downscale-2e.html?205,53,right about:blank
fuzzy(5,999) random != downscale-2f.html?205,53,right about:blank
fuzzy(5,999) random != downscale-2a.html?203,52,top about:blank
fuzzy(5,999) random != downscale-2b.html?203,52,top about:blank
fuzzy(5,999) random != downscale-2c.html?203,52,top about:blank
fuzzy(5,999) random != downscale-2d.html?203,52,top about:blank
fuzzy(5,999) random != downscale-2e.html?203,52,top about:blank
fuzzy(5,999) random != downscale-2f.html?203,52,top about:blank
fuzzy(5,999) random != downscale-2a.html?205,53,top about:blank
fuzzy(5,999) random != downscale-2b.html?205,53,top about:blank
fuzzy(5,999) random != downscale-2c.html?205,53,top about:blank
fuzzy(5,999) random != downscale-2d.html?205,53,top about:blank
fuzzy(5,999) random != downscale-2e.html?205,53,top about:blank
fuzzy(5,999) random != downscale-2f.html?205,53,top about:blank
fuzzy(5,999) random != downscale-2a.html?203,52,bottom about:blank
fuzzy(5,999) random != downscale-2b.html?203,52,bottom about:blank
fuzzy(5,999) random != downscale-2c.html?203,52,bottom about:blank
fuzzy(5,999) random != downscale-2d.html?203,52,bottom about:blank
fuzzy(5,999) random != downscale-2e.html?203,52,bottom about:blank
fuzzy(5,999) random != downscale-2f.html?203,52,bottom about:blank
fuzzy(5,999) random != downscale-2a.html?205,53,bottom about:blank
fuzzy(5,999) random != downscale-2b.html?205,53,bottom about:blank
fuzzy(5,999) random != downscale-2c.html?205,53,bottom about:blank
fuzzy(5,999) random != downscale-2d.html?205,53,bottom about:blank
fuzzy(5,999) random != downscale-2e.html?205,53,bottom about:blank
fuzzy(5,999) random != downscale-2f.html?205,53,bottom about:blank
# RUN TESTS WITH HIGH QUALITY DOWNSCALING ENABLED:
# ================================================
@ -26,3 +89,59 @@ fuzzy-if(cocoaWidget,106,31) == downscale-1.html downscale-1-ref.html
default-preferences pref(image.high_quality_downscaling.enabled,true)
fuzzy(31,127) == downscale-1.html downscale-1-ref.html
fuzzy(5,999) random != downscale-2a.html?203,52,left about:blank
fuzzy(5,999) random != downscale-2b.html?203,52,left about:blank
fuzzy(5,999) random != downscale-2c.html?203,52,left about:blank
fuzzy(5,999) random != downscale-2d.html?203,52,left about:blank
fuzzy(5,999) random != downscale-2e.html?203,52,left about:blank
fuzzy(5,999) random != downscale-2f.html?203,52,left about:blank
fuzzy(5,999) random != downscale-2a.html?205,53,left about:blank
fuzzy(5,999) random != downscale-2b.html?205,53,left about:blank
fuzzy(5,999) random != downscale-2c.html?205,53,left about:blank
fuzzy(5,999) random != downscale-2d.html?205,53,left about:blank
fuzzy(5,999) random != downscale-2e.html?205,53,left about:blank
fuzzy(5,999) random != downscale-2f.html?205,53,left about:blank
fuzzy(5,999) random != downscale-2a.html?203,52,right about:blank
fuzzy(5,999) random != downscale-2b.html?203,52,right about:blank
fuzzy(5,999) random != downscale-2c.html?203,52,right about:blank
fuzzy(5,999) random != downscale-2d.html?203,52,right about:blank
fuzzy(5,999) random != downscale-2e.html?203,52,right about:blank
fuzzy(5,999) random != downscale-2f.html?203,52,right about:blank
fuzzy(5,999) random != downscale-2a.html?205,53,right about:blank
fuzzy(5,999) random != downscale-2b.html?205,53,right about:blank
fuzzy(5,999) random != downscale-2c.html?205,53,right about:blank
fuzzy(5,999) random != downscale-2d.html?205,53,right about:blank
fuzzy(5,999) random != downscale-2e.html?205,53,right about:blank
fuzzy(5,999) random != downscale-2f.html?205,53,right about:blank
fuzzy(5,999) random != downscale-2a.html?203,52,top about:blank
fuzzy(5,999) random != downscale-2b.html?203,52,top about:blank
fuzzy(5,999) random != downscale-2c.html?203,52,top about:blank
fuzzy(5,999) random != downscale-2d.html?203,52,top about:blank
fuzzy(5,999) random != downscale-2e.html?203,52,top about:blank
fuzzy(5,999) random != downscale-2f.html?203,52,top about:blank
fuzzy(5,999) random != downscale-2a.html?205,53,top about:blank
fuzzy(5,999) random != downscale-2b.html?205,53,top about:blank
fuzzy(5,999) random != downscale-2c.html?205,53,top about:blank
fuzzy(5,999) random != downscale-2d.html?205,53,top about:blank
fuzzy(5,999) random != downscale-2e.html?205,53,top about:blank
fuzzy(5,999) random != downscale-2f.html?205,53,top about:blank
fuzzy(5,999) random != downscale-2a.html?203,52,bottom about:blank
fuzzy(5,999) random != downscale-2b.html?203,52,bottom about:blank
fuzzy(5,999) random != downscale-2c.html?203,52,bottom about:blank
fuzzy(5,999) random != downscale-2d.html?203,52,bottom about:blank
fuzzy(5,999) random != downscale-2e.html?203,52,bottom about:blank
fuzzy(5,999) random != downscale-2f.html?203,52,bottom about:blank
fuzzy(5,999) random != downscale-2a.html?205,53,bottom about:blank
fuzzy(5,999) random != downscale-2b.html?205,53,bottom about:blank
fuzzy(5,999) random != downscale-2c.html?205,53,bottom about:blank
fuzzy(5,999) random != downscale-2d.html?205,53,bottom about:blank
fuzzy(5,999) random != downscale-2e.html?205,53,bottom about:blank
fuzzy(5,999) random != downscale-2f.html?205,53,bottom about:blank