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
.drawImage(newImage
, 10, 10, 80, 80);
16 domImage
.parentNode
.removeChild(domImage
);
20 <body onload='runTest()'
>
21 Test for crbug.com/
227481: This test passes if there is a green square with a blue circle in the top-left corner.
<br/>
22 <canvas width=
"100px" height=
"100px"></canvas>
23 <img style=
"width: 30px;" 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>" >