6 var context
= document
.getElementsByTagName('canvas')[0].getContext('2d');
7 var forceLayout
= document
.body
.offsetWidth
;
9 var domImage
= document
.getElementsByTagName('img')[0];
10 context
.drawImage(domImage
, 10, 10, 80, 80);
12 var newImage
= new Image();
13 newImage
.src
= domImage
.src
;
14 context
.fillStyle
= context
.createPattern(newImage
, 'repeat');
15 context
.fillRect(10, 10, 180, 80);
17 domImage
.parentNode
.removeChild(domImage
);
21 <body onload='runTest()'
>
22 Test for crbug.com/
227481: This test passes if there is a green rectangle with a two blue circles.
<br/>
23 <canvas width=
"200px" height=
"100px"></canvas>
24 <img style=
"width: 50px;" src=
"data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100'><rect width='100' height='100' fill='green' /><circle cx='30' cy='30' r='15' fill='blue'/></svg>" >