| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <title>canvas toDataURL alpha png bug</title> |
| <script type="text/javascript"> |
| testRunner.dumpAsText(true); |
| var context = document.getElementById("c").getContext("2d"); |
| context.fillStyle = "rgba(200, 255, 200, 0.7)"; |
| context.fillRect(0, 0, context.canvas.width, context.canvas.height); |
| document.getElementById("d").style.backgroundImage = ["url(", context.canvas.toDataURL("image/png"), ")"].join(""); |
| <p>The test passes if both boxes below have the same color.</p> |
| <canvas id="c" width="200" height="100"></canvas> |
| <div id="d" style="width:200px;height:100px"></div> |