Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / canvas / drawImage-with-globalAlpha.html
blob0e6a2b83df7d9d636f25223ed40da53004da2192
1 <html>
2 <head></head>
3 <body>
4 There should be a green square, followed by 6 squares of shades of green from white to full green.<br>
5 <canvas id="canvas" width="700" height="100" ></canvas>
6 <script>
7 if (window.testRunner)
8 testRunner.dumpAsTextWithPixelResults();
10 var canvas = document.getElementById("canvas");
11 var context = canvas.getContext("2d");
12 context.fillStyle = 'green';
13 context.fillRect(0,0,100,100);
14 var context2 = canvas.getContext("2d");
15 context2.globalAlpha = 0.0;
16 context2.drawImage(canvas, 0, 0, 100, 100, 100, 0, 100, 100);
17 context2.globalAlpha = 0.2;
18 context2.drawImage(canvas, 0, 0, 100, 100, 200, 0, 100, 100);
19 context2.globalAlpha = 0.4;
20 context2.drawImage(canvas, 0, 0, 100, 100, 300, 0, 100, 100);
21 context2.globalAlpha = 0.6;
22 context2.drawImage(canvas, 0, 0, 100, 100, 400, 0, 100, 100);
23 context2.globalAlpha = 0.8;
24 context2.drawImage(canvas, 0, 0, 100, 100, 500, 0, 100, 100);
25 context2.globalAlpha = 1.0;
26 context2.drawImage(canvas, 0, 0, 100, 100, 600, 0, 100, 100);
27 </script>
28 </body>
29 </html>