1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/reftests/webm-video/canvas-1a.xhtml Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,29 @@ 1.4 +<?xml version="1.0" encoding="UTF-8"?> 1.5 +<svg xmlns="http://www.w3.org/2000/svg" 1.6 + xmlns:xlink="http://www.w3.org/1999/xlink" 1.7 + version="1.1" class="reftest-wait"> 1.8 +<!-- use an empty g to force filters.svg to load before onload --> 1.9 +<use xlink:href="../filters.svg#empty" /> 1.10 +<foreignObject filter="url(../filters.svg#ThresholdRGB)" x="0" y="0" height="100%" width="100%"> 1.11 +<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"> 1.12 +<body> 1.13 +<canvas id="canvas" width="200" height="200"></canvas> 1.14 +<script> 1.15 +var video = document.createElement("video"); 1.16 +video.src = "black140x100.webm"; 1.17 +video.load(); 1.18 +function draw() { 1.19 + var canvas = document.getElementById("canvas"); 1.20 + var ctx = canvas.getContext("2d"); 1.21 + try { 1.22 + ctx.drawImage(video, 0, 0, video.videoWidth, video.videoHeight); 1.23 + } catch (e) { 1.24 + } 1.25 + document.documentElement.removeAttribute("class"); 1.26 +} 1.27 +video.addEventListener("loadeddata", draw, false); 1.28 +</script> 1.29 +</body> 1.30 +</html> 1.31 +</foreignObject> 1.32 +</svg>