<!DOCTYPE html>
<html>
<body>
    This test passes if there are two green boxes and no crash.
    <div style="width: 100px; height: 100px; background: url(resources/100px-green-rect.svg);"></div>
    <br/>
    <canvas id="canvas" width="100" height="100"></canvas>
    <script>
        if (window.testRunner) {
            testRunner.dumpAsText();
            testRunner.waitUntilDone();
        }

        var svg = new Image();
        svg.src = 'resources/100px-green-rect.svg';

        svg.onload = function() {
            var canvas = document.getElementById('canvas');
            canvas.getContext('2d').drawImage(svg, 0, 0);

            if (window.testRunner)
                testRunner.notifyDone();
        };
    </script>
</body>
</html>
