blob: b3dd6542899b4c1b212e565ceb0574d7163726d9 [file] [log] [blame]
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>canvas toDataURL alpha png bug</title>
<script type="text/javascript">
if (window.testRunner)
testRunner.dumpAsText(true);
function load() {
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("");
}
</script>
</head>
<body onload="load()">
<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>
</body>
</html>