2 <html xmlns=
"http://www.w3.org/1999/xhtml">
4 <title>canvas toDataURL alpha png bug
</title>
5 <script type=
"text/javascript">
7 testRunner
.dumpAsTextWithPixelResults();
10 var context
= document
.getElementById("c").getContext("2d");
11 context
.fillStyle
= "rgba(200, 255, 200, 0.7)";
12 context
.fillRect(0, 0, context
.canvas
.width
, context
.canvas
.height
);
13 document
.getElementById("d").style
.backgroundImage
= ["url(", context
.canvas
.toDataURL("image/png"), ")"].join("");
17 <body onload=
"load()">
18 <p>The test passes if both boxes below have the same color.
</p>
19 <canvas id=
"c" width=
"200" height=
"100"></canvas>
20 <div id=
"d" style=
"width:200px;height:100px"></div>