Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / media / video-canvas-alpha.html
blob9ee14545c4718eca888e94a6cd7802e6e3716b91
1 <html>
2 <head>
3 <script src="media-file.js"></script>
5 <script>
6 if (window.testRunner) {
7 testRunner.waitUntilDone();
10 function onLoad() {
11 video = document.getElementsByTagName('video')[0];
12 video.src = findMediaFile("video", "content/test");
14 canvas = document.getElementsByTagName('canvas')[0];
15 ctx = canvas.getContext('2d');
17 video.load();
18 video.addEventListener("canplay", function (e) {
19 ctx.globalAlpha = 0.5;
20 ctx.drawImage(video, 0, 0);
22 if (window.testRunner) {
23 testRunner.notifyDone();
25 });
27 </script>
28 </head>
29 <body onload="onLoad();">
30 <video></video><canvas width="320px" height="240px" style="position:relative;left:-100px;"> </canvas>
31 </body>
32 </html>