Bug 784573 - Reftest for azure/cairo transform problem. r=joe

This commit is contained in:
Anthony Jones 2012-09-03 17:49:33 -04:00
parent 223dd80132
commit 16cab51b48
4 changed files with 69 additions and 8 deletions

View File

@ -14740,14 +14740,8 @@ isPixel(ctx, 0,25, 0,255,0,255, 0);
isPixel(ctx, 50,25, 0,255,0,255, 0);
isPixel(ctx, 99,25, 0,255,0,255, 0);
isPixel(ctx, 0,49, 0,255,0,255, 0);
if (IsAzureEnabled() && IsAzureCairo()) {
// Bug 764108
todo_isPixel(ctx, 50,49, 0,255,0,255, 0);
todo_isPixel(ctx, 99,49, 0,255,0,255, 0);
} else {
isPixel(ctx, 50,49, 0,255,0,255, 0);
isPixel(ctx, 99,49, 0,255,0,255, 0);
}
isPixel(ctx, 50,49, 0,255,0,255, 0);
isPixel(ctx, 99,49, 0,255,0,255, 0);
}
</script>

View File

@ -0,0 +1,28 @@
<!DOCTYPE html>
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
-->
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p><canvas width="100" height="100" id="c"></canvas></p>
<script type="text/javascript">
var c = document.getElementById('c').getContext('2d');
c.shadowColor = '#f00';
c.shadowBlur = 4;
c.lineWidth = 2;
c.moveTo(80, 40);
c.lineTo(50, 70);
c.lineTo(20, 40);
c.lineTo(50, 10);
c.closePath();
c.stroke();
</script>
</body>
</html>

View File

@ -0,0 +1,36 @@
<!DOCTYPE html>
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/licenses/publicdomain/
This tests that paths are stored in device space. This means that changing
the transform does not move the points already drawn.
-->
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p><canvas width="100" height="100" id="c"></canvas></p>
<script type="text/javascript">
var c = document.getElementById('c').getContext('2d');
c.shadowColor = '#f00';
c.shadowBlur = 4;
c.lineWidth = 2;
c.translate(50, 40);
var d = 30;
c.beginPath();
c.moveTo(d, 0);
for (var n = 0; n < 3; n++) {
c.rotate(3.14159 / 2);
c.lineTo(d, 0);
}
c.closePath();
c.stroke();
</script>
</body>
</html>

View File

@ -82,3 +82,6 @@ fails-if(/Mac\x20OS\x20X\x2010\.[56]/.test(http.oscpu)) == 672646-alpha-radial-g
== transformed-path.html transformed-path.html
== 749467-1.html 749467-1-ref.html
# You get a little bit of rounding fuzz on OSX from transforming the paths between user space and device space
fuzzy-if(azureQuartz,2,113) fuzzy-if(d2d,12,17) == 784573-1.html 784573-1-ref.html