Bug 617152. Part 2: Fix SVG-as-image tests. r=dholbert
authorRobert O'Callahan <robert@ocallahan.org>
Mon, 20 Dec 2010 14:37:40 +1300
changeset 59484 07451ea7a0ca7fc3704a4d953a30c56bfa24a6b3
parent 59483 f1ac5add876dcc639fe7b5eff6186514df88e356
child 59485 19f780daecd08ee01ebc9a56b51de56c31a2e78d
push id1
push usershaver@mozilla.com
push dateTue, 04 Jan 2011 17:58:04 +0000
reviewersdholbert
bugs617152
milestone2.0b9pre
Bug 617152. Part 2: Fix SVG-as-image tests. r=dholbert
layout/reftests/svg/as-image/canvas-drawImage-simple-1a.html
layout/reftests/svg/as-image/img-height-meet-1-ref.html
layout/reftests/svg/as-image/img-height-meet-1.html
layout/reftests/svg/as-image/img-height-meet-2-ref.html
layout/reftests/svg/as-image/img-height-meet-2.html
layout/reftests/svg/as-image/img-height-slice-1-ref.html
layout/reftests/svg/as-image/img-height-slice-1.html
layout/reftests/svg/as-image/img-height-slice-2-ref.html
layout/reftests/svg/as-image/img-height-slice-2.html
layout/reftests/svg/as-image/img-width-meet-1-ref.html
layout/reftests/svg/as-image/img-width-meet-1.html
layout/reftests/svg/as-image/img-width-meet-2-ref.html
layout/reftests/svg/as-image/img-width-meet-2.html
layout/reftests/svg/as-image/img-width-slice-1-ref.html
layout/reftests/svg/as-image/img-width-slice-1.html
layout/reftests/svg/as-image/img-width-slice-2-ref.html
layout/reftests/svg/as-image/img-width-slice-2.html
layout/reftests/svg/as-image/img-widthAndHeight-meet-1-ref.html
layout/reftests/svg/as-image/img-widthAndHeight-meet-1.html
layout/reftests/svg/as-image/img-widthAndHeight-meet-2-ref.html
layout/reftests/svg/as-image/img-widthAndHeight-meet-2.html
layout/reftests/svg/as-image/img-widthAndHeight-slice-1-ref.html
layout/reftests/svg/as-image/img-widthAndHeight-slice-1.html
layout/reftests/svg/as-image/img-widthAndHeight-slice-2-ref.html
layout/reftests/svg/as-image/img-widthAndHeight-slice-2.html
layout/reftests/svg/as-image/reftest.list
layout/reftests/svg/as-image/svg-image-util.css
--- a/layout/reftests/svg/as-image/canvas-drawImage-simple-1a.html
+++ b/layout/reftests/svg/as-image/canvas-drawImage-simple-1a.html
@@ -1,23 +1,22 @@
-<html class="reftest-wait">
+<html>
   <head>
     <script type="text/javascript">
       function go() {
         var canvas = document.getElementById("canvas");
         var ctx = canvas.getContext("2d");
         var image = document.getElementById("image");
 
         // Draw some orange
         ctx.fillStyle = "orange";
         ctx.fillRect(0, 0, 100, 100);
 
         // Draw the SVG image on top of our red
         ctx.drawImage(image, 0, 0);
-        document.documentElement.removeAttribute("class");
       }
     </script>
   </head>
   <body onload="go()">
     <canvas id="canvas" width="200" height="200"></canvas>
     <img id="image" src="lime100x100.svg" style="display: none">
 </body>
 </html>
--- a/layout/reftests/svg/as-image/img-height-meet-1-ref.html
+++ b/layout/reftests/svg/as-image/img-height-meet-1-ref.html
@@ -1,21 +1,19 @@
-<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",
         meetOrSlice: "meet"
       };
 
       appendSVGArrayWithParams(svgParams, "embed");
-      document.documentElement.removeAttribute("class");
-    }
   </script>
-</head>
-<body onload="main()">
   <!-- Body gets populated by script -->
 </body>
 </html>
--- a/layout/reftests/svg/as-image/img-height-meet-1.html
+++ b/layout/reftests/svg/as-image/img-height-meet-1.html
@@ -1,21 +1,19 @@
-<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",
         meetOrSlice: "meet"
       };
 
       appendSVGArrayWithParams(svgParams, "img");
-      document.documentElement.removeAttribute("class");
-    }
   </script>
-</head>
-<body onload="main()">
   <!-- Body gets populated by script -->
 </body>
 </html>
--- a/layout/reftests/svg/as-image/img-height-meet-2-ref.html
+++ b/layout/reftests/svg/as-image/img-height-meet-2-ref.html
@@ -1,21 +1,19 @@
-<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",
         meetOrSlice: "meet"
       };
 
       appendSVGArrayWithParams(svgParams, "embed");
-      document.documentElement.removeAttribute("class");
-    }
   </script>
-</head>
-<body onload="main()">
   <!-- Body gets populated by script -->
 </body>
 </html>
--- a/layout/reftests/svg/as-image/img-height-meet-2.html
+++ b/layout/reftests/svg/as-image/img-height-meet-2.html
@@ -1,21 +1,19 @@
-<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",
         meetOrSlice: "meet"
       };
 
       appendSVGArrayWithParams(svgParams, "img");
-      document.documentElement.removeAttribute("class");
-    }
   </script>
-</head>
-<body onload="main()">
   <!-- Body gets populated by script -->
 </body>
 </html>
--- a/layout/reftests/svg/as-image/img-height-slice-1-ref.html
+++ b/layout/reftests/svg/as-image/img-height-slice-1-ref.html
@@ -1,21 +1,19 @@
-<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",
         meetOrSlice: "slice"
       };
 
       appendSVGArrayWithParams(svgParams, "embed");
-      document.documentElement.removeAttribute("class");
-    }
   </script>
-</head>
-<body onload="main()">
   <!-- Body gets populated by script -->
 </body>
 </html>
--- a/layout/reftests/svg/as-image/img-height-slice-1.html
+++ b/layout/reftests/svg/as-image/img-height-slice-1.html
@@ -1,21 +1,19 @@
-<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",
         meetOrSlice: "slice"
       };
 
       appendSVGArrayWithParams(svgParams, "img");
-      document.documentElement.removeAttribute("class");
-    }
   </script>
-</head>
-<body onload="main()">
   <!-- Body gets populated by script -->
 </body>
 </html>
--- a/layout/reftests/svg/as-image/img-height-slice-2-ref.html
+++ b/layout/reftests/svg/as-image/img-height-slice-2-ref.html
@@ -1,21 +1,19 @@
-<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",
         meetOrSlice: "slice"
       };
 
       appendSVGArrayWithParams(svgParams, "embed");
-      document.documentElement.removeAttribute("class");
-    }
   </script>
-</head>
-<body onload="main()">
   <!-- Body gets populated by script -->
 </body>
 </html>
--- a/layout/reftests/svg/as-image/img-height-slice-2.html
+++ b/layout/reftests/svg/as-image/img-height-slice-2.html
@@ -1,21 +1,19 @@
-<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",
         meetOrSlice: "slice"
       };
 
       appendSVGArrayWithParams(svgParams, "img");
-      document.documentElement.removeAttribute("class");
-    }
   </script>
-</head>
-<body onload="main()">
   <!-- Body gets populated by script -->
 </body>
 </html>
--- a/layout/reftests/svg/as-image/img-width-meet-1-ref.html
+++ b/layout/reftests/svg/as-image/img-width-meet-1-ref.html
@@ -1,21 +1,19 @@
-<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",
         meetOrSlice: "meet"
       };
 
       appendSVGArrayWithParams(svgParams, "embed");
-      document.documentElement.removeAttribute("class");
-    }
   </script>
-</head>
-<body onload="main()">
   <!-- Body gets populated by script -->
 </body>
 </html>
--- a/layout/reftests/svg/as-image/img-width-meet-1.html
+++ b/layout/reftests/svg/as-image/img-width-meet-1.html
@@ -1,21 +1,19 @@
-<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",
         meetOrSlice: "meet"
       };
 
       appendSVGArrayWithParams(svgParams, "img");
-      document.documentElement.removeAttribute("class");
-    }
   </script>
-</head>
-<body onload="main()">
   <!-- Body gets populated by script -->
 </body>
 </html>
--- a/layout/reftests/svg/as-image/img-width-meet-2-ref.html
+++ b/layout/reftests/svg/as-image/img-width-meet-2-ref.html
@@ -1,21 +1,19 @@
-<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",
         meetOrSlice: "meet"
       };
 
       appendSVGArrayWithParams(svgParams, "embed");
-      document.documentElement.removeAttribute("class");
-    }
   </script>
-</head>
-<body onload="main()">
   <!-- Body gets populated by script -->
 </body>
 </html>
--- a/layout/reftests/svg/as-image/img-width-meet-2.html
+++ b/layout/reftests/svg/as-image/img-width-meet-2.html
@@ -1,21 +1,19 @@
-<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",
         meetOrSlice: "meet"
       };
 
       appendSVGArrayWithParams(svgParams, "img");
-      document.documentElement.removeAttribute("class");
-    }
   </script>
-</head>
-<body onload="main()">
   <!-- Body gets populated by script -->
 </body>
 </html>
--- a/layout/reftests/svg/as-image/img-width-slice-1-ref.html
+++ b/layout/reftests/svg/as-image/img-width-slice-1-ref.html
@@ -1,21 +1,19 @@
-<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",
         meetOrSlice: "slice"
       };
 
       appendSVGArrayWithParams(svgParams, "embed");
-      document.documentElement.removeAttribute("class");
-    }
   </script>
-</head>
-<body onload="main()">
   <!-- Body gets populated by script -->
 </body>
 </html>
--- a/layout/reftests/svg/as-image/img-width-slice-1.html
+++ b/layout/reftests/svg/as-image/img-width-slice-1.html
@@ -1,21 +1,19 @@
-<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",
         meetOrSlice: "slice"
       };
 
       appendSVGArrayWithParams(svgParams, "img");
-      document.documentElement.removeAttribute("class");
-    }
   </script>
-</head>
-<body onload="main()">
   <!-- Body gets populated by script -->
 </body>
 </html>
--- a/layout/reftests/svg/as-image/img-width-slice-2-ref.html
+++ b/layout/reftests/svg/as-image/img-width-slice-2-ref.html
@@ -1,21 +1,19 @@
-<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",
         meetOrSlice: "slice"
       };
 
       appendSVGArrayWithParams(svgParams, "embed");
-      document.documentElement.removeAttribute("class");
-    }
   </script>
-</head>
-<body onload="main()">
   <!-- Body gets populated by script -->
 </body>
 </html>
--- a/layout/reftests/svg/as-image/img-width-slice-2.html
+++ b/layout/reftests/svg/as-image/img-width-slice-2.html
@@ -1,21 +1,19 @@
-<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",
         meetOrSlice: "slice"
       };
 
       appendSVGArrayWithParams(svgParams, "img");
-      document.documentElement.removeAttribute("class");
-    }
   </script>
-</head>
-<body onload="main()">
   <!-- Body gets populated by script -->
 </body>
 </html>
--- a/layout/reftests/svg/as-image/img-widthAndHeight-meet-1-ref.html
+++ b/layout/reftests/svg/as-image/img-widthAndHeight-meet-1-ref.html
@@ -1,22 +1,20 @@
-<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",
         width :   "20px",
         meetOrSlice: "meet"
       };
 
       appendSVGArrayWithParams(svgParams, "embed");
-      document.documentElement.removeAttribute("class");
-    }
   </script>
-</head>
-<body onload="main()">
   <!-- Body gets populated by script -->
 </body>
 </html>
--- a/layout/reftests/svg/as-image/img-widthAndHeight-meet-1.html
+++ b/layout/reftests/svg/as-image/img-widthAndHeight-meet-1.html
@@ -1,22 +1,20 @@
-<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",
         width :   "20px",
         meetOrSlice: "meet"
       };
 
       appendSVGArrayWithParams(svgParams, "img");
-      document.documentElement.removeAttribute("class");
-    }
   </script>
-</head>
-<body onload="main()">
   <!-- Body gets populated by script -->
 </body>
 </html>
--- a/layout/reftests/svg/as-image/img-widthAndHeight-meet-2-ref.html
+++ b/layout/reftests/svg/as-image/img-widthAndHeight-meet-2-ref.html
@@ -1,22 +1,20 @@
-<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",
         width :   "2em",
         meetOrSlice: "meet"
       };
 
       appendSVGArrayWithParams(svgParams, "embed");
-      document.documentElement.removeAttribute("class");
-    }
   </script>
-</head>
-<body onload="main()">
   <!-- Body gets populated by script -->
 </body>
 </html>
--- a/layout/reftests/svg/as-image/img-widthAndHeight-meet-2.html
+++ b/layout/reftests/svg/as-image/img-widthAndHeight-meet-2.html
@@ -1,22 +1,20 @@
-<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",
         width :   "2em",
         meetOrSlice: "meet"
       };
 
       appendSVGArrayWithParams(svgParams, "img");
-      document.documentElement.removeAttribute("class");
-    }
   </script>
-</head>
-<body onload="main()">
   <!-- Body gets populated by script -->
 </body>
 </html>
--- a/layout/reftests/svg/as-image/img-widthAndHeight-slice-1-ref.html
+++ b/layout/reftests/svg/as-image/img-widthAndHeight-slice-1-ref.html
@@ -1,22 +1,20 @@
-<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",
         width :   "20px",
         meetOrSlice: "slice"
       };
 
       appendSVGArrayWithParams(svgParams, "embed");
-      document.documentElement.removeAttribute("class");
-    }
   </script>
-</head>
-<body onload="main()">
   <!-- Body gets populated by script -->
 </body>
 </html>
--- a/layout/reftests/svg/as-image/img-widthAndHeight-slice-1.html
+++ b/layout/reftests/svg/as-image/img-widthAndHeight-slice-1.html
@@ -1,22 +1,20 @@
-<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",
         width :   "20px",
         meetOrSlice: "slice"
       };
 
       appendSVGArrayWithParams(svgParams, "img");
-      document.documentElement.removeAttribute("class");
-    }
   </script>
-</head>
-<body onload="main()">
   <!-- Body gets populated by script -->
 </body>
 </html>
--- a/layout/reftests/svg/as-image/img-widthAndHeight-slice-2-ref.html
+++ b/layout/reftests/svg/as-image/img-widthAndHeight-slice-2-ref.html
@@ -1,22 +1,20 @@
-<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",
         width :   "2em",
         meetOrSlice: "slice"
       };
 
       appendSVGArrayWithParams(svgParams, "embed");
-      document.documentElement.removeAttribute("class");
-    }
   </script>
-</head>
-<body onload="main()">
   <!-- Body gets populated by script -->
 </body>
 </html>
--- a/layout/reftests/svg/as-image/img-widthAndHeight-slice-2.html
+++ b/layout/reftests/svg/as-image/img-widthAndHeight-slice-2.html
@@ -1,22 +1,20 @@
-<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",
         width :   "2em",
         meetOrSlice: "slice"
       };
 
       appendSVGArrayWithParams(svgParams, "img");
-      document.documentElement.removeAttribute("class");
-    }
   </script>
-</head>
-<body onload="main()">
   <!-- Body gets populated by script -->
 </body>
 </html>
--- a/layout/reftests/svg/as-image/reftest.list
+++ b/layout/reftests/svg/as-image/reftest.list
@@ -55,32 +55,30 @@ fails == canvas-drawImage-slice-1b.html 
 # NOTE: The reference cases in this test triggers 72 assertions (bug 563481)
 asserts(72) == img-and-image-1.html img-and-image-1-ref.svg
  
 # More complex <img> tests
 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
 
 == svg-image-simple-1.svg lime100x100.svg
 == svg-image-simple-2.svg lime100x100.svg
 == svg-image-simple-3.svg lime100x100.svg
 
 # tests for <svg> files that include themselves as an <image>
--- a/layout/reftests/svg/as-image/svg-image-util.css
+++ b/layout/reftests/svg/as-image/svg-image-util.css
@@ -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; }