Bug 627776: Rewrite reftests for bug 621253 to fix randomorange. r=roc a=tests

--HG--
rename : layout/reftests/bugs/621253-1.xhtml => layout/reftests/bugs/621253-helper-externalFilter.xhtml
rename : layout/reftests/bugs/621253-1-ref.xhtml => layout/reftests/bugs/621253-helper-internalFilter.xhtml
This commit is contained in:
Daniel Holbert 2011-01-30 20:58:18 -08:00
parent 0c3dfa07cd
commit c02d941ac2
12 changed files with 143 additions and 40 deletions

View File

@ -0,0 +1,20 @@
<html class="reftest-wait"
reftest-zoom="0.5">
<head>
<script>
function doTest() {
var iframe = document.getElementsByTagName("iframe")[0];
iframe.setAttribute("onload", "snapshot()");
iframe.contentWindow.location.reload();
}
function snapshot() {
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body onload="doTest()" style="margin: 0">
<iframe src="621253-helper-externalFilter.xhtml"
style="border: 0; overflow: hidden"></iframe>
</body>
</html>

View File

@ -1,9 +0,0 @@
<?xml version="1.0"?>
<svg xmlns="http://www.w3.org/2000/svg">
<filter id="greyscale">
<feColorMatrix values="0.5 0.5 0.5 0 0
0.5 0.5 0.5 0 0
0.5 0.5 0.5 0 0
0 0 0 1 0"/>
</filter>
</svg>

Before

Width:  |  Height:  |  Size: 292 B

View File

@ -0,0 +1,20 @@
<html class="reftest-wait"
reftest-zoom="0.5">
<head>
<script>
function doTest() {
var iframe = document.getElementsByTagName("iframe")[0];
iframe.setAttribute("onload", "snapshot()");
iframe.contentWindow.location.reload();
}
function snapshot() {
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body onload="doTest()" style="margin: 0">
<iframe src="621253-helper-internalFilter.xhtml"
style="border: 0; overflow: hidden"></iframe>
</body>
</html>

View File

@ -0,0 +1,9 @@
<html>
<body style="margin: 0">
<div style="background: black;
width: 25px; height: 25px"></div>
<!-- XXXdholbert The above div should actually be 50x50 instead of 25x25, but
bug 541270 makes our testcases render smaller than they should. Once
that bug is fixed, we need a s/25px/50px/ in this file. -->
</body>
</html>

View File

@ -1,20 +0,0 @@
<?xml version="1.0"?>
<html xmlns="http://www.w3.org/1999/xhtml"
reftest-zoom="0.5">
<body style="margin: 0px">
<svg xmlns="http://www.w3.org/2000/svg" style="display: block; height: 0px">
<defs>
<filter id="greyscale">
<feColorMatrix values="0.5 0.5 0.5 0 0
0.5 0.5 0.5 0 0
0.5 0.5 0.5 0 0
0 0 0 1 0"/>
</filter>
</defs>
</svg>
<div style="filter: url(#greyscale);
background: lime;
height: 100px; width: 100px">
</div>
</body>
</html>

View File

@ -1,10 +0,0 @@
<?xml version="1.0"?>
<html xmlns="http://www.w3.org/1999/xhtml"
reftest-zoom="0.5">
<body style="margin: 0px">
<div style="filter: url(621253-1-helper.svg#greyscale);
background: lime;
height: 100px; width: 100px">
</div>
</body>
</html>

View File

@ -0,0 +1,20 @@
<html class="reftest-wait"
reftest-zoom="1.5">
<head>
<script>
function doTest() {
var iframe = document.getElementsByTagName("iframe")[0];
iframe.setAttribute("onload", "snapshot()");
iframe.contentWindow.location.reload();
}
function snapshot() {
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body onload="doTest()" style="margin: 0">
<iframe src="621253-helper-externalFilter.xhtml"
style="border: 0; overflow: hidden"></iframe>
</body>
</html>

View File

@ -0,0 +1,20 @@
<html class="reftest-wait"
reftest-zoom="1.5">
<head>
<script>
function doTest() {
var iframe = document.getElementsByTagName("iframe")[0];
iframe.setAttribute("onload", "snapshot()");
iframe.contentWindow.location.reload();
}
function snapshot() {
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body onload="doTest()" style="margin: 0">
<iframe src="621253-helper-internalFilter.xhtml"
style="border: 0; overflow: hidden"></iframe>
</body>
</html>

View File

@ -0,0 +1,6 @@
<html>
<body style="margin: 0">
<div style="background: black;
width: 150px; height: 150px"></div>
</body>
</html>

View File

@ -0,0 +1,14 @@
<?xml version="1.0"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<body style="margin: 0px">
<div style="filter: url(../filters.svg#NonWhiteToBlack);
background: lime;
height: 100px; width: 100px">
</div>
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- use an empty g to force filters.svg to load before onload -->
<use xlink:href="../filters.svg#empty" />
</svg>
</body>
</html>

View File

@ -0,0 +1,30 @@
<?xml version="1.0"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<body style="margin: 0px">
<svg xmlns="http://www.w3.org/2000/svg" style="display: block; height: 0px">
<defs>
<!-- Copied verbatim from layout/reftests/filters.svg: -->
<filter id="NonWhiteToBlack" x="0%" y="0%" width="100%" height="100%">
<feComponentTransfer>
<feFuncR type="linear" slope="-1" intercept="1" />
<feFuncG type="linear" slope="-1" intercept="1" />
<feFuncB type="linear" slope="-1" intercept="1" />
</feComponentTransfer>
<feColorMatrix type="matrix" values="255 255 255 0 0
255 255 255 0 0
255 255 255 0 0
0 0 0 1 0" />
<feComponentTransfer>
<feFuncR type="linear" slope="-1" intercept="1" />
<feFuncG type="linear" slope="-1" intercept="1" />
<feFuncB type="linear" slope="-1" intercept="1" />
</feComponentTransfer>
</filter>
</defs>
</svg>
<div style="filter: url(#NonWhiteToBlack);
background: lime;
height: 100px; width: 100px">
</div>
</body>
</html>

View File

@ -1568,7 +1568,10 @@ HTTP(..) != 615121-2.html 615121-2-notref.html
== 617242-1.html 617242-1-ref.html
!= 618071.html 618071-notref.html
== 619117-1.html 619117-1-ref.html
== 621253-1.xhtml 621253-1-ref.xhtml
HTTP(..) == 621253-1-externalFilter.html 621253-1-ref.html # XXX update reference case after bug 541270 is fixed
== 621253-1-internalFilter.html 621253-1-ref.html # XXX update reference case after bug 541270 is fixed
HTTP(..) == 621253-2-externalFilter.html 621253-2-ref.html
== 621253-2-internalFilter.html 621253-2-ref.html
HTTP(..) == 619511-1.html 619511-1-ref.html
random-if(winWidget) == 621918-1.svg 621918-1-ref.svg # 1-pixel diacritic positioning discrepancy in rotated text (may depend on platform fonts)
random-if(winWidget) HTTP(..) == 621918-2.svg 621918-2-ref.svg # same 1px issue as above, and HTTP(..) for filters.svg, used to mask antialiasing issues where glyphs touch