blob: 80c4b07740cc3ccd28279d3a6dcaf45f04a436d1 [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<p>Tests that the source rect is clipped when outside the image rect.</p>
<canvas id='target' width='100px' height='100px;'></canvas>
<script>
if (window.testRunner)
testRunner.waitUntilDone();
var image = new Image();
image.onload = function () {
target.getContext('2d').drawImage(image, 50, 50, 50, 50, 0, 0, 50, 50);
if (window.testRunner)
testRunner.notifyDone();
};
image.src = '../css/resources/greenbox-100px.png';
</script>
</body>
</html>