1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/reftests/svg/as-image/canvas-drawImage-scale-2b.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,26 @@ 1.4 +<html class="reftest-wait"> 1.5 + <head> 1.6 + <script type="text/javascript"> 1.7 + function go() { 1.8 + var canvas = document.getElementById("canvas"); 1.9 + var ctx = canvas.getContext("2d"); 1.10 + 1.11 + // Draw some orange 1.12 + ctx.fillStyle = "orange"; 1.13 + ctx.fillRect(0, 0, 200, 200); 1.14 + 1.15 + // Instantiate an image. Once it has loaded, draw it & take snapshot. 1.16 + var image = new Image(); 1.17 + image.onload = function() { 1.18 + ctx.scale(2, 2); 1.19 + ctx.drawImage(image, 0, 0); 1.20 + document.documentElement.removeAttribute("class"); 1.21 + } 1.22 + image.src ="squaredCircle-viewBox-100x100.svg"; 1.23 + } 1.24 + </script> 1.25 + </head> 1.26 + <body onload="go()"> 1.27 + <canvas id="canvas" width="200" height="200"></canvas> 1.28 +</body> 1.29 +</html>