blob: 887f693f0d793de3f19e0b2813532642f7d431e3 [file] [log] [blame]
<!DOCTYPE html>
<style>
canvas {
background-color: gray;
width: 100px;
height: 100px;
}
</style>
<p>Test passes if a green square inside a gray square is shown without distortion.</p>
<div>
<canvas width='100' height='100'></canvas>
</div>
<script>
function paintCanvas(canvas)
{
var ctx = canvas.getContext('2d');
ctx.fillStyle = 'green';
ctx.fillRect(35, 35, 30, 30);
}
paintCanvas(document.querySelector('canvas'));
</script>