Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / canvas / toDataURL-alpha.html
blob8a451e43a4aea4733565eabec3430663f274009e
1 <!DOCTYPE html>
2 <html xmlns="http://www.w3.org/1999/xhtml">
3 <head>
4 <title>canvas toDataURL alpha png bug</title>
5 <script type="text/javascript">
6 if (window.testRunner)
7 testRunner.dumpAsTextWithPixelResults();
9 function load() {
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("");
15 </script>
16 </head>
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>
21 </body>
22 </html>