4 background-color: gray;
10 <p>Test passes if a green square inside an orange rectanlge is shown up without a distortion.
12 <canvas width=
"200" height=
"400"></canvas>
15 function paintCanvas(canvas
)
17 var ctx
= canvas
.getContext('2d');
18 ctx
.fillStyle
= 'orange';
19 ctx
.fillRect(0, 0, canvas
.width
, canvas
.height
);
21 ctx
.fillStyle
= 'green';
22 var squarWidth
= canvas
.width
/ 2;
23 ctx
.fillRect(50, 150, squarWidth
, squarWidth
);
26 paintCanvas(document
.querySelector('canvas'));