Skip to content

Commit

Permalink
Bug 1248323: P3. Add test for NV12/YUV422 readback. r=me
Browse files Browse the repository at this point in the history
reftest is disabled on windows due to localized try readback errors that can't be reproduced.

MozReview-Commit-ID: 379PZsRE5d6
  • Loading branch information
mattwoodrow committed Feb 25, 2015
1 parent d8282dc commit a265375
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 0 deletions.
19 changes: 19 additions & 0 deletions layout/reftests/mp4-video/canvas-1-ref.xhtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
version="1.1">
<!-- use an empty g to force filters.svg to load before onload -->
<use xlink:href="../filters.svg#empty" />
<foreignObject filter="url(../filters.svg#ThresholdRGB)" x="0" y="0" height="100%" width="100%">
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<body>
<script>
function done() {
document.documentElement.removeAttribute("class");
}
</script>
<video id="video" src="short.mp4" onloadeddata="done()"/>
</body>
</html>
</foreignObject>
</svg>
27 changes: 27 additions & 0 deletions layout/reftests/mp4-video/canvas-1.xhtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
version="1.1">
<!-- use an empty g to force filters.svg to load before onload -->
<use xlink:href="../filters.svg#empty" />
<foreignObject filter="url(../filters.svg#ThresholdRGB)" x="0" y="0" height="100%" width="100%">
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<body>
<canvas id="canvas" width="320" height="240"></canvas>
<script>
function draw() {
var video = document.getElementById("video");
var canvas = document.getElementById("canvas");
var ctx = canvas.getContext("2d");
try {
ctx.drawImage(video, 0, 0, video.videoWidth, video.videoHeight);
} catch (e) {
}
document.documentElement.removeAttribute("class");
}
</script>
<video id="video" src="short.mp4" onloadeddata="draw()" style="opacity:0"></video>
</body>
</html>
</foreignObject>
</svg>
1 change: 1 addition & 0 deletions layout/reftests/mp4-video/reftest.list
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
skip-if(B2G||Mulet||winWidget) == canvas-1.xhtml canvas-1-ref.xhtml
Binary file added layout/reftests/mp4-video/short.mp4
Binary file not shown.
3 changes: 3 additions & 0 deletions layout/reftests/reftest.list
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,9 @@ skip-if(!B2G&&browserIsRemote) include ogg-video/reftest.list
# webm-video/
skip-if(!B2G&&browserIsRemote) include webm-video/reftest.list

# mp4-video/
skip-if(!B2G&&browserIsRemote) include mp4-video/reftest.list

# parser/
include ../../parser/htmlparser/tests/reftest/reftest.list

Expand Down

0 comments on commit a265375

Please sign in to comment.