Bug 617152. Part 2: Fix SVG-as-image tests. r=dholbert

This commit is contained in:
Robert O'Callahan 2010-12-20 14:37:40 +13:00
parent ebe65f2b40
commit 5824056067
27 changed files with 111 additions and 162 deletions

View File

@ -1,4 +1,4 @@
<html class="reftest-wait">
<html>
<head>
<script type="text/javascript">
function go() {
@ -12,7 +12,6 @@
// Draw the SVG image on top of our red
ctx.drawImage(image, 0, 0);
document.documentElement.removeAttribute("class");
}
</script>
</head>

View File

@ -1,9 +1,11 @@
<html class="reftest-wait">
<!DOCTYPE HTML>
<html>
<head>
<link rel="stylesheet" type="text/css" href="svg-image-util.css" />
<script src="svg-image-util.js"></script>
</head>
<body>
<script>
function main() {
var svgParams = {
viewBox: [0, 0, 20, 40],
height : "20px",
@ -11,11 +13,7 @@
};
appendSVGArrayWithParams(svgParams, "embed");
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body onload="main()">
<!-- Body gets populated by script -->
</body>
</html>

View File

@ -1,9 +1,11 @@
<html class="reftest-wait">
<!DOCTYPE HTML>
<html>
<head>
<link rel="stylesheet" type="text/css" href="svg-image-util.css" />
<script src="svg-image-util.js"></script>
</head>
<body>
<script>
function main() {
var svgParams = {
viewBox: [0, 0, 20, 40],
height : "20px",
@ -11,11 +13,7 @@
};
appendSVGArrayWithParams(svgParams, "img");
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body onload="main()">
<!-- Body gets populated by script -->
</body>
</html>

View File

@ -1,9 +1,11 @@
<html class="reftest-wait">
<!DOCTYPE HTML>
<html>
<head>
<link rel="stylesheet" type="text/css" href="svg-image-util.css" />
<script src="svg-image-util.js"></script>
</head>
<body>
<script>
function main() {
var svgParams = {
viewBox: [0, 0, 40, 20],
height : "2em",
@ -11,11 +13,7 @@
};
appendSVGArrayWithParams(svgParams, "embed");
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body onload="main()">
<!-- Body gets populated by script -->
</body>
</html>

View File

@ -1,9 +1,11 @@
<html class="reftest-wait">
<!DOCTYPE HTML>
<html>
<head>
<link rel="stylesheet" type="text/css" href="svg-image-util.css" />
<script src="svg-image-util.js"></script>
</head>
<body>
<script>
function main() {
var svgParams = {
viewBox: [0, 0, 40, 20],
height : "2em",
@ -11,11 +13,7 @@
};
appendSVGArrayWithParams(svgParams, "img");
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body onload="main()">
<!-- Body gets populated by script -->
</body>
</html>

View File

@ -1,9 +1,11 @@
<html class="reftest-wait">
<!DOCTYPE HTML>
<html>
<head>
<link rel="stylesheet" type="text/css" href="svg-image-util.css" />
<script src="svg-image-util.js"></script>
</head>
<body>
<script>
function main() {
var svgParams = {
viewBox: [0, 0, 20, 40],
height : "20px",
@ -11,11 +13,7 @@
};
appendSVGArrayWithParams(svgParams, "embed");
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body onload="main()">
<!-- Body gets populated by script -->
</body>
</html>

View File

@ -1,9 +1,11 @@
<html class="reftest-wait">
<!DOCTYPE HTML>
<html>
<head>
<link rel="stylesheet" type="text/css" href="svg-image-util.css" />
<script src="svg-image-util.js"></script>
</head>
<body>
<script>
function main() {
var svgParams = {
viewBox: [0, 0, 20, 40],
height : "20px",
@ -11,11 +13,7 @@
};
appendSVGArrayWithParams(svgParams, "img");
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body onload="main()">
<!-- Body gets populated by script -->
</body>
</html>

View File

@ -1,9 +1,11 @@
<html class="reftest-wait">
<!DOCTYPE HTML>
<html>
<head>
<link rel="stylesheet" type="text/css" href="svg-image-util.css" />
<script src="svg-image-util.js"></script>
</head>
<body>
<script>
function main() {
var svgParams = {
viewBox: [0, 0, 40, 20],
height : "2em",
@ -11,11 +13,7 @@
};
appendSVGArrayWithParams(svgParams, "embed");
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body onload="main()">
<!-- Body gets populated by script -->
</body>
</html>

View File

@ -1,9 +1,11 @@
<html class="reftest-wait">
<!DOCTYPE HTML>
<html>
<head>
<link rel="stylesheet" type="text/css" href="svg-image-util.css" />
<script src="svg-image-util.js"></script>
</head>
<body>
<script>
function main() {
var svgParams = {
viewBox: [0, 0, 40, 20],
height : "2em",
@ -11,11 +13,7 @@
};
appendSVGArrayWithParams(svgParams, "img");
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body onload="main()">
<!-- Body gets populated by script -->
</body>
</html>

View File

@ -1,9 +1,11 @@
<html class="reftest-wait">
<!DOCTYPE HTML>
<html>
<head>
<link rel="stylesheet" type="text/css" href="svg-image-util.css" />
<script src="svg-image-util.js"></script>
</head>
<body>
<script>
function main() {
var svgParams = {
viewBox: [0, 0, 20, 40],
width : "20px",
@ -11,11 +13,7 @@
};
appendSVGArrayWithParams(svgParams, "embed");
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body onload="main()">
<!-- Body gets populated by script -->
</body>
</html>

View File

@ -1,9 +1,11 @@
<html class="reftest-wait">
<!DOCTYPE HTML>
<html>
<head>
<link rel="stylesheet" type="text/css" href="svg-image-util.css" />
<script src="svg-image-util.js"></script>
</head>
<body>
<script>
function main() {
var svgParams = {
viewBox: [0, 0, 20, 40],
width : "20px",
@ -11,11 +13,7 @@
};
appendSVGArrayWithParams(svgParams, "img");
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body onload="main()">
<!-- Body gets populated by script -->
</body>
</html>

View File

@ -1,9 +1,11 @@
<html class="reftest-wait">
<!DOCTYPE HTML>
<html>
<head>
<link rel="stylesheet" type="text/css" href="svg-image-util.css" />
<script src="svg-image-util.js"></script>
</head>
<body>
<script>
function main() {
var svgParams = {
viewBox: [0, 0, 40, 20],
width : "2em",
@ -11,11 +13,7 @@
};
appendSVGArrayWithParams(svgParams, "embed");
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body onload="main()">
<!-- Body gets populated by script -->
</body>
</html>

View File

@ -1,9 +1,11 @@
<html class="reftest-wait">
<!DOCTYPE HTML>
<html>
<head>
<link rel="stylesheet" type="text/css" href="svg-image-util.css" />
<script src="svg-image-util.js"></script>
</head>
<body>
<script>
function main() {
var svgParams = {
viewBox: [0, 0, 40, 20],
width : "2em",
@ -11,11 +13,7 @@
};
appendSVGArrayWithParams(svgParams, "img");
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body onload="main()">
<!-- Body gets populated by script -->
</body>
</html>

View File

@ -1,9 +1,11 @@
<html class="reftest-wait">
<!DOCTYPE HTML>
<html>
<head>
<link rel="stylesheet" type="text/css" href="svg-image-util.css" />
<script src="svg-image-util.js"></script>
</head>
<body>
<script>
function main() {
var svgParams = {
viewBox: [0, 0, 20, 40],
width : "20px",
@ -11,11 +13,7 @@
};
appendSVGArrayWithParams(svgParams, "embed");
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body onload="main()">
<!-- Body gets populated by script -->
</body>
</html>

View File

@ -1,9 +1,11 @@
<html class="reftest-wait">
<!DOCTYPE HTML>
<html>
<head>
<link rel="stylesheet" type="text/css" href="svg-image-util.css" />
<script src="svg-image-util.js"></script>
</head>
<body>
<script>
function main() {
var svgParams = {
viewBox: [0, 0, 20, 40],
width : "20px",
@ -11,11 +13,7 @@
};
appendSVGArrayWithParams(svgParams, "img");
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body onload="main()">
<!-- Body gets populated by script -->
</body>
</html>

View File

@ -1,9 +1,11 @@
<html class="reftest-wait">
<!DOCTYPE HTML>
<html>
<head>
<link rel="stylesheet" type="text/css" href="svg-image-util.css" />
<script src="svg-image-util.js"></script>
</head>
<body>
<script>
function main() {
var svgParams = {
viewBox: [0, 0, 40, 20],
width : "2em",
@ -11,11 +13,7 @@
};
appendSVGArrayWithParams(svgParams, "embed");
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body onload="main()">
<!-- Body gets populated by script -->
</body>
</html>

View File

@ -1,9 +1,11 @@
<html class="reftest-wait">
<!DOCTYPE HTML>
<html>
<head>
<link rel="stylesheet" type="text/css" href="svg-image-util.css" />
<script src="svg-image-util.js"></script>
</head>
<body>
<script>
function main() {
var svgParams = {
viewBox: [0, 0, 40, 20],
width : "2em",
@ -11,11 +13,7 @@
};
appendSVGArrayWithParams(svgParams, "img");
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body onload="main()">
<!-- Body gets populated by script -->
</body>
</html>

View File

@ -1,9 +1,11 @@
<html class="reftest-wait">
<!DOCTYPE HTML>
<html>
<head>
<link rel="stylesheet" type="text/css" href="svg-image-util.css" />
<script src="svg-image-util.js"></script>
</head>
<body>
<script>
function main() {
var svgParams = {
viewBox: [0, 0, 20, 40],
height : "20px",
@ -12,11 +14,7 @@
};
appendSVGArrayWithParams(svgParams, "embed");
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body onload="main()">
<!-- Body gets populated by script -->
</body>
</html>

View File

@ -1,9 +1,11 @@
<html class="reftest-wait">
<!DOCTYPE HTML>
<html>
<head>
<link rel="stylesheet" type="text/css" href="svg-image-util.css" />
<script src="svg-image-util.js"></script>
</head>
<body>
<script>
function main() {
var svgParams = {
viewBox: [0, 0, 20, 40],
height : "20px",
@ -12,11 +14,7 @@
};
appendSVGArrayWithParams(svgParams, "img");
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body onload="main()">
<!-- Body gets populated by script -->
</body>
</html>

View File

@ -1,9 +1,11 @@
<html class="reftest-wait">
<!DOCTYPE HTML>
<html>
<head>
<link rel="stylesheet" type="text/css" href="svg-image-util.css" />
<script src="svg-image-util.js"></script>
</head>
<body>
<script>
function main() {
var svgParams = {
viewBox: [0, 0, 40, 20],
height : "2em",
@ -12,11 +14,7 @@
};
appendSVGArrayWithParams(svgParams, "embed");
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body onload="main()">
<!-- Body gets populated by script -->
</body>
</html>

View File

@ -1,9 +1,11 @@
<html class="reftest-wait">
<!DOCTYPE HTML>
<html>
<head>
<link rel="stylesheet" type="text/css" href="svg-image-util.css" />
<script src="svg-image-util.js"></script>
</head>
<body>
<script>
function main() {
var svgParams = {
viewBox: [0, 0, 40, 20],
height : "2em",
@ -12,11 +14,7 @@
};
appendSVGArrayWithParams(svgParams, "img");
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body onload="main()">
<!-- Body gets populated by script -->
</body>
</html>

View File

@ -1,9 +1,11 @@
<html class="reftest-wait">
<!DOCTYPE HTML>
<html>
<head>
<link rel="stylesheet" type="text/css" href="svg-image-util.css" />
<script src="svg-image-util.js"></script>
</head>
<body>
<script>
function main() {
var svgParams = {
viewBox: [0, 0, 20, 40],
height : "20px",
@ -12,11 +14,7 @@
};
appendSVGArrayWithParams(svgParams, "embed");
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body onload="main()">
<!-- Body gets populated by script -->
</body>
</html>

View File

@ -1,9 +1,11 @@
<html class="reftest-wait">
<!DOCTYPE HTML>
<html>
<head>
<link rel="stylesheet" type="text/css" href="svg-image-util.css" />
<script src="svg-image-util.js"></script>
</head>
<body>
<script>
function main() {
var svgParams = {
viewBox: [0, 0, 20, 40],
height : "20px",
@ -12,11 +14,7 @@
};
appendSVGArrayWithParams(svgParams, "img");
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body onload="main()">
<!-- Body gets populated by script -->
</body>
</html>

View File

@ -1,9 +1,11 @@
<html class="reftest-wait">
<!DOCTYPE HTML>
<html>
<head>
<link rel="stylesheet" type="text/css" href="svg-image-util.css" />
<script src="svg-image-util.js"></script>
</head>
<body>
<script>
function main() {
var svgParams = {
viewBox: [0, 0, 40, 20],
height : "2em",
@ -12,11 +14,7 @@
};
appendSVGArrayWithParams(svgParams, "embed");
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body onload="main()">
<!-- Body gets populated by script -->
</body>
</html>

View File

@ -1,9 +1,11 @@
<html class="reftest-wait">
<!DOCTYPE HTML>
<html>
<head>
<link rel="stylesheet" type="text/css" href="svg-image-util.css" />
<script src="svg-image-util.js"></script>
</head>
<body>
<script>
function main() {
var svgParams = {
viewBox: [0, 0, 40, 20],
height : "2em",
@ -12,11 +14,7 @@
};
appendSVGArrayWithParams(svgParams, "img");
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body onload="main()">
<!-- Body gets populated by script -->
</body>
</html>

View File

@ -60,22 +60,20 @@ random-if(gtk2Widget) == img-anim-1.html lime100x100-ref.html # bug 612214
== img-content-outside-viewBox-1.html img-content-outside-viewBox-1-ref.html
random == img-dyn-1.html img-dyn-1-ref.html # Bug 596478
# XXXdholbert Some of the tests below fail on Windows 7 right now. Marking them
# random-on-windows right now while I investigate.
== img-widthAndHeight-meet-1.html img-widthAndHeight-meet-1-ref.html
== img-widthAndHeight-meet-2.html img-widthAndHeight-meet-2-ref.html
random-if(winWidget) == img-widthAndHeight-slice-1.html img-widthAndHeight-slice-1-ref.html
random-if(winWidget) == img-widthAndHeight-slice-2.html img-widthAndHeight-slice-2-ref.html
random-if(d2d) == img-widthAndHeight-meet-1.html img-widthAndHeight-meet-1-ref.html
random-if(d2d) == img-widthAndHeight-meet-2.html img-widthAndHeight-meet-2-ref.html
random-if(d2d) == img-widthAndHeight-slice-1.html img-widthAndHeight-slice-1-ref.html
random-if(d2d) == img-widthAndHeight-slice-2.html img-widthAndHeight-slice-2-ref.html
random-if(winWidget) == img-height-meet-1.html img-height-meet-1-ref.html
== img-height-meet-2.html img-height-meet-2-ref.html
random-if(winWidget) == img-height-slice-1.html img-height-slice-1-ref.html
== img-height-slice-2.html img-height-slice-2-ref.html
random-if(d2d) == img-height-meet-1.html img-height-meet-1-ref.html
random-if(d2d) == img-height-meet-2.html img-height-meet-2-ref.html
random-if(d2d) == img-height-slice-1.html img-height-slice-1-ref.html
random-if(d2d) == img-height-slice-2.html img-height-slice-2-ref.html
random-if(winWidget) == img-width-meet-1.html img-width-meet-1-ref.html
== img-width-meet-2.html img-width-meet-2-ref.html
random-if(winWidget) == img-width-slice-1.html img-width-slice-1-ref.html
== img-width-slice-2.html img-width-slice-2-ref.html
random-if(d2d) == img-width-meet-1.html img-width-meet-1-ref.html
random-if(d2d) == img-width-meet-2.html img-width-meet-2-ref.html
random-if(d2d) == img-width-slice-1.html img-width-slice-1-ref.html
random-if(d2d) == img-width-slice-2.html img-width-slice-2-ref.html
== list-simple-1.html list-simple-1-ref.html

View File

@ -1,3 +1,3 @@
body { margin: 0px; }
img { background: purple; border: 5px solid green}
embed { background: purple; border: 5px solid green}
img { background: purple; border: 5px solid green; vertical-align:top; }
embed { background: purple; border: 5px solid green; vertical-align:top; }