Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / svg / as-image / svg-canvas-draw-image-detached.html
blobf57719696707303a3f6bbe860d26e9360da2bf46
1 <!DOCTYPE html>
2 <html>
3 <body>
4 This test passes if there are two green boxes and no crash.
5 <div style="width: 100px; height: 100px; background: url(resources/100px-green-rect.svg);"></div>
6 <br/>
7 <canvas id="canvas" width="100" height="100"></canvas>
8 <script>
9 if (window.testRunner) {
10 testRunner.dumpAsText();
11 testRunner.waitUntilDone();
14 var svg = new Image();
15 svg.src = 'resources/100px-green-rect.svg';
17 svg.onload = function() {
18 var canvas = document.getElementById('canvas');
19 canvas.getContext('2d').drawImage(svg, 0, 0);
21 if (window.testRunner)
22 testRunner.notifyDone();
24 </script>
25 </body>
26 </html>