blob: 3b49a96cb856198a03457461676e09852f3a9679 [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, 100, 100, 0, 0, 100, 100);
if (window.testRunner)
testRunner.notifyDone();
};
image.src = '../css/resources/greenbox-100px.png';
</script>
</body>
</html>