blob: 0eb78a4e048eeca146ae04d365f44965743682d3 [file] [log] [blame]
<!DOCTYPE HTML>
<link rel="stylesheet" href="resources/svg_tests.css">
<script src="resources/svg_canvas_helper.js"></script>
<script>
if (window.testRunner)
testRunner.waitUntilDone();
</script>
<h2><a href="http://www.w3.org/html/wg/drafts/srcset/w3c-srcset">srcset</a> testcases for SVG</h2>
<div class="test">
<h3>Canvas PNG without explicit dimensions - 1x</h3>
<div class="expected">expected<br/>
<img id="png5" src="" srcset="resources/srcset.png" width="200" height="100">
</div>
<div class="actual">actual<br/>
<canvas id="canvas3"></canvas>
</div>
This test should show a PNG image drawn into a canvas. The canvas and image should look the same and both should be 200x100.<br/>
<br clear="all"/>
</div>
<div class="test">
<h3>Canvas PNG without explicit dimensions - 2x</h3>
<div class="expected">expected<br/>
<img id="png6" src="" srcset="resources/srcset.png" width="100" height="50">
</div>
<div class="actual">actual<br/>
<canvas id="canvas4"></canvas>
</div>
This test should show an SVG image drawn into a canvas. The canvas and image should look the same and both should be 100x50.<br/>
<br clear="all"/>
</div>
<script>
window.addEventListener('load', function(){
drawCanvas('png5', 'canvas3', 200, 100);
drawCanvas('png6', 'canvas4', 100, 50);
if (window.testRunner)
testRunner.notifyDone();
});
</script>
<script src="resources/print_img_failure.js"></script>