diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 11:44:51 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 11:44:51 +0000 |
commit | 9e3c08db40b8916968b9f30096c7be3f00ce9647 (patch) | |
tree | a68f146d7fa01f0134297619fbe7e33db084e0aa /layout/reftests/ogg-video | |
parent | Initial commit. (diff) | |
download | thunderbird-9e3c08db40b8916968b9f30096c7be3f00ce9647.tar.xz thunderbird-9e3c08db40b8916968b9f30096c7be3f00ce9647.zip |
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/reftests/ogg-video')
61 files changed, 680 insertions, 0 deletions
diff --git a/layout/reftests/ogg-video/444-1-ref.html b/layout/reftests/ogg-video/444-1-ref.html new file mode 100644 index 0000000000..08e4df28ee --- /dev/null +++ b/layout/reftests/ogg-video/444-1-ref.html @@ -0,0 +1,20 @@ +<!DOCTYPE HTML> +<html class="reftest-wait"> +<body> +<video id="v1" style="position:absolute; left:0; top:0"></video> +<!-- hide bottom of video --> +<div style="position:absolute; top:120px; left:0; right:0; bottom:0; background:black"></div> +<script> +function doTest() { + // Set source now so that the loadeddata event can't fire before + // this function runs. + v1.src = "seek420.ogv"; + v1.play(); + v1.addEventListener("loadeddata", function() { + setTimeout(function() { + document.documentElement.removeAttribute('class'); + }, 50); + }); +} +document.addEventListener("MozReftestInvalidate", doTest); +</script> diff --git a/layout/reftests/ogg-video/444-1.html b/layout/reftests/ogg-video/444-1.html new file mode 100644 index 0000000000..02e7b3ddb8 --- /dev/null +++ b/layout/reftests/ogg-video/444-1.html @@ -0,0 +1,20 @@ +<!DOCTYPE HTML> +<html class="reftest-wait"> +<body> +<video id="v1" style="position:absolute; left:0; top:0"></video> +<!-- hide bottom of video --> +<div style="position:absolute; top:120px; left:0; right:0; bottom:0; background:black"></div> +<script> +function doTest() { + // Set source now so that the loadeddata event can't fire before + // this function runs. + v1.src = "seek444.ogv"; + v1.play(); + v1.addEventListener("loadeddata", function() { + setTimeout(function() { + document.documentElement.removeAttribute('class'); + }, 50); + }); +} +document.addEventListener("MozReftestInvalidate", doTest); +</script> diff --git a/layout/reftests/ogg-video/aspect-ratio-1-ref.html b/layout/reftests/ogg-video/aspect-ratio-1-ref.html new file mode 100644 index 0000000000..93391ed83c --- /dev/null +++ b/layout/reftests/ogg-video/aspect-ratio-1-ref.html @@ -0,0 +1,6 @@ +<!DOCTYPE HTML> +<html> +<body style="background:white;"> +<div style="width:140px; height:100px; position:relative; left:100px; top:100px; background:black;"></div> +</body> +</html> diff --git a/layout/reftests/ogg-video/aspect-ratio-1a.xhtml b/layout/reftests/ogg-video/aspect-ratio-1a.xhtml new file mode 100644 index 0000000000..c70d3248f5 --- /dev/null +++ b/layout/reftests/ogg-video/aspect-ratio-1a.xhtml @@ -0,0 +1,14 @@ +<?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 style="background:white;"> +<video src="black140x100.ogv" style="width:340px; height:100px; position:relative; top:100px;"></video> +</body> +</html> +</foreignObject> +</svg> diff --git a/layout/reftests/ogg-video/aspect-ratio-1b.xhtml b/layout/reftests/ogg-video/aspect-ratio-1b.xhtml new file mode 100644 index 0000000000..b59352b516 --- /dev/null +++ b/layout/reftests/ogg-video/aspect-ratio-1b.xhtml @@ -0,0 +1,14 @@ +<?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 style="background:white;"> +<video src="black140x100.ogv" style="width:140px; height:300px; position:relative; left:100px;"></video> +</body> +</html> +</foreignObject> +</svg> diff --git a/layout/reftests/ogg-video/aspect-ratio-2-ref.html b/layout/reftests/ogg-video/aspect-ratio-2-ref.html new file mode 100644 index 0000000000..4f78ab4d2f --- /dev/null +++ b/layout/reftests/ogg-video/aspect-ratio-2-ref.html @@ -0,0 +1,6 @@ +<!DOCTYPE HTML> +<html> +<body style="background:white;"> +<div style="width:280px; height:200px; position:relative; left:200px; top:200px; background:black;"></div> +</body> +</html> diff --git a/layout/reftests/ogg-video/aspect-ratio-2a.xhtml b/layout/reftests/ogg-video/aspect-ratio-2a.xhtml new file mode 100644 index 0000000000..f708ec90af --- /dev/null +++ b/layout/reftests/ogg-video/aspect-ratio-2a.xhtml @@ -0,0 +1,14 @@ +<?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 style="background:white;"> +<video src="black140x100.ogv" style="width:680px; height:200px; position:relative; top:200px;"></video> +</body> +</html> +</foreignObject> +</svg> diff --git a/layout/reftests/ogg-video/aspect-ratio-2b.xhtml b/layout/reftests/ogg-video/aspect-ratio-2b.xhtml new file mode 100644 index 0000000000..e7469031a8 --- /dev/null +++ b/layout/reftests/ogg-video/aspect-ratio-2b.xhtml @@ -0,0 +1,14 @@ +<?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 style="background:white;"> +<video src="black140x100.ogv" style="width:280px; height:600px; position:relative; left:200px;"></video> +</body> +</html> +</foreignObject> +</svg> diff --git a/layout/reftests/ogg-video/aspect-ratio-3-ref.xhtml b/layout/reftests/ogg-video/aspect-ratio-3-ref.xhtml new file mode 100644 index 0000000000..73662654f8 --- /dev/null +++ b/layout/reftests/ogg-video/aspect-ratio-3-ref.xhtml @@ -0,0 +1,14 @@ +<?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 style="background:white;"> +<video src="black140x100.ogv" style="width:280px; height:200px;"></video> +</body> +</html> +</foreignObject> +</svg> diff --git a/layout/reftests/ogg-video/aspect-ratio-3a.xhtml b/layout/reftests/ogg-video/aspect-ratio-3a.xhtml new file mode 100644 index 0000000000..3c253e8f81 --- /dev/null +++ b/layout/reftests/ogg-video/aspect-ratio-3a.xhtml @@ -0,0 +1,14 @@ +<?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 style="background:white;"> +<video src="black140x100.ogv" width="280"></video> +</body> +</html> +</foreignObject> +</svg> diff --git a/layout/reftests/ogg-video/aspect-ratio-3b.xhtml b/layout/reftests/ogg-video/aspect-ratio-3b.xhtml new file mode 100644 index 0000000000..cc6ec4c750 --- /dev/null +++ b/layout/reftests/ogg-video/aspect-ratio-3b.xhtml @@ -0,0 +1,14 @@ +<?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 style="background:white;"> +<video src="black140x100.ogv" height="200"></video> +</body> +</html> +</foreignObject> +</svg> diff --git a/layout/reftests/ogg-video/basic-1-ref.html b/layout/reftests/ogg-video/basic-1-ref.html new file mode 100644 index 0000000000..aca3dcb9ca --- /dev/null +++ b/layout/reftests/ogg-video/basic-1-ref.html @@ -0,0 +1,6 @@ +<!DOCTYPE HTML> +<html> +<body style="background:white;"> +<div style="width:140px; height:100px; background:black;"></div> +</body> +</html> diff --git a/layout/reftests/ogg-video/basic-1.xhtml b/layout/reftests/ogg-video/basic-1.xhtml new file mode 100644 index 0000000000..4899dc29f7 --- /dev/null +++ b/layout/reftests/ogg-video/basic-1.xhtml @@ -0,0 +1,14 @@ +<?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 style="background:white;"> +<video src="black140x100.ogv"></video> +</body> +</html> +</foreignObject> +</svg> diff --git a/layout/reftests/ogg-video/black100x100-aspect3to2.ogv b/layout/reftests/ogg-video/black100x100-aspect3to2.ogv Binary files differnew file mode 100644 index 0000000000..81fe51ffb3 --- /dev/null +++ b/layout/reftests/ogg-video/black100x100-aspect3to2.ogv diff --git a/layout/reftests/ogg-video/black140x100.ogv b/layout/reftests/ogg-video/black140x100.ogv Binary files differnew file mode 100644 index 0000000000..ab146ebe28 --- /dev/null +++ b/layout/reftests/ogg-video/black140x100.ogv diff --git a/layout/reftests/ogg-video/black29x19offset.ogv b/layout/reftests/ogg-video/black29x19offset.ogv Binary files differnew file mode 100644 index 0000000000..b515ebd1f3 --- /dev/null +++ b/layout/reftests/ogg-video/black29x19offset.ogv diff --git a/layout/reftests/ogg-video/blue140x100.png b/layout/reftests/ogg-video/blue140x100.png Binary files differnew file mode 100644 index 0000000000..f4c3973fcc --- /dev/null +++ b/layout/reftests/ogg-video/blue140x100.png diff --git a/layout/reftests/ogg-video/blue250x200.png b/layout/reftests/ogg-video/blue250x200.png Binary files differnew file mode 100644 index 0000000000..5eb0b52511 --- /dev/null +++ b/layout/reftests/ogg-video/blue250x200.png diff --git a/layout/reftests/ogg-video/canvas-1a.xhtml b/layout/reftests/ogg-video/canvas-1a.xhtml new file mode 100644 index 0000000000..9f115e785f --- /dev/null +++ b/layout/reftests/ogg-video/canvas-1a.xhtml @@ -0,0 +1,29 @@ +<?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" class="reftest-wait"> +<!-- 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="200" height="200"></canvas> +<script> +var video = document.createElement("video"); +video.src = "black140x100.ogv"; +video.load(); +function draw() { + 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"); +} +video.addEventListener("loadeddata", draw, false); +</script> +</body> +</html> +</foreignObject> +</svg> diff --git a/layout/reftests/ogg-video/canvas-1b.xhtml b/layout/reftests/ogg-video/canvas-1b.xhtml new file mode 100644 index 0000000000..4524593e9e --- /dev/null +++ b/layout/reftests/ogg-video/canvas-1b.xhtml @@ -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="200" height="200"></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="black140x100.ogv" onloadeddata="draw()" style="opacity:0"></video> +</body> +</html> +</foreignObject> +</svg> diff --git a/layout/reftests/ogg-video/clipping-1-ref.html b/layout/reftests/ogg-video/clipping-1-ref.html new file mode 100644 index 0000000000..67782811c5 --- /dev/null +++ b/layout/reftests/ogg-video/clipping-1-ref.html @@ -0,0 +1,9 @@ +<!DOCTYPE HTML> +<html> +<body style="background:white"> +<div style="position:absolute; left:0; top:0; width:200px; height:600px;"> + <video src="black140x100.ogv" style="width:400px; margin-left:-100px;"></video> +</div> +<div style="position:absolute; left:200px; top:0; background:white; width:200px; height:600px;"></div> +</body> +</html> diff --git a/layout/reftests/ogg-video/clipping-1a.html b/layout/reftests/ogg-video/clipping-1a.html new file mode 100644 index 0000000000..cfae72cedd --- /dev/null +++ b/layout/reftests/ogg-video/clipping-1a.html @@ -0,0 +1,8 @@ +<!DOCTYPE HTML> +<html> +<body style="background:white"> +<div style="overflow:hidden; position:absolute; left:0; top:0; width:200px; height:600px;"> + <video src="black140x100.ogv" style="width:400px; margin-left:-100px;"></video> +</div> +</body> +</html> diff --git a/layout/reftests/ogg-video/empty-1-ref.html b/layout/reftests/ogg-video/empty-1-ref.html new file mode 100644 index 0000000000..fcc7693202 --- /dev/null +++ b/layout/reftests/ogg-video/empty-1-ref.html @@ -0,0 +1,5 @@ +<!DOCTYPE HTML> +<html> +<body style="background:white;"> +</body> +</html> diff --git a/layout/reftests/ogg-video/empty-1a.html b/layout/reftests/ogg-video/empty-1a.html new file mode 100644 index 0000000000..fc1421a810 --- /dev/null +++ b/layout/reftests/ogg-video/empty-1a.html @@ -0,0 +1,6 @@ +<!DOCTYPE HTML> +<html> +<body style="background:white;"> +<video src="black140x100.ogv" style="width:0"></video> +</body> +</html> diff --git a/layout/reftests/ogg-video/empty-1b.html b/layout/reftests/ogg-video/empty-1b.html new file mode 100644 index 0000000000..9dd17dbbaa --- /dev/null +++ b/layout/reftests/ogg-video/empty-1b.html @@ -0,0 +1,6 @@ +<!DOCTYPE HTML> +<html> +<body style="background:white;"> +<video src="black140x100.ogv" style="height:0"></video> +</body> +</html> diff --git a/layout/reftests/ogg-video/encoded-aspect-ratio-1-ref.html b/layout/reftests/ogg-video/encoded-aspect-ratio-1-ref.html new file mode 100644 index 0000000000..d9c0054eb5 --- /dev/null +++ b/layout/reftests/ogg-video/encoded-aspect-ratio-1-ref.html @@ -0,0 +1,19 @@ +<!DOCTYPE HTML> +<html> +<body style="background:white;"> +<div style="background-color: black; width: 150px; height: 100px; position: absolute; left: 10px; top: 10px;"></div> + +<!-- Left side vertical. --> +<div style="position: absolute; left: 9px; top: 9px; width: 2px; height: 102px; z-index: 2; background: red;"></div> + +<!-- Right side vertical. --> +<div style="position: absolute; left: 159px; top: 9px; width: 2px; height: 102px; z-index: 2; background: red;"></div> + +<!-- Top horizontal bar. --> +<div style="position: absolute; left: 9px; top: 9px; width: 152px; height: 2px; z-index: 2; background: red;"></div> + +<!-- Bottom horizontal bar. --> +<div style="position: absolute; left: 9px; top: 109px; width: 152px; height: 2px; z-index: 2; background: red;"></div> + +</body> +</html> diff --git a/layout/reftests/ogg-video/encoded-aspect-ratio-1.html b/layout/reftests/ogg-video/encoded-aspect-ratio-1.html new file mode 100644 index 0000000000..238fdbfe8d --- /dev/null +++ b/layout/reftests/ogg-video/encoded-aspect-ratio-1.html @@ -0,0 +1,29 @@ +<!DOCTYPE HTML> +<html> +<body style="background:white;"> +<!-- + Test if video displays correctly with a 3:2 aspect ratio. + It should display at w=150 h=100. + On some Linux systems, the scaling to preserve the aspect ratio can sample + the pixels outside visible region. This results in a thin grey line down + some sides of the scaled picture. We add red bars over the edges to + overwrite such happenings, to make the test reliable. +--> +<video src="black100x100-aspect3to2.ogv" + style="position:absolute; left: 10px; top: 10px; z-index: 1;"> +</video> + +<!-- Left side vertical. --> +<div style="position: absolute; left: 9px; top: 9px; width: 2px; height: 102px; z-index: 2; background: red;"></div> + +<!-- Right side vertical. --> +<div style="position: absolute; left: 159px; top: 9px; width: 2px; height: 102px; z-index: 2; background: red;"></div> + +<!-- Top horizontal bar. --> +<div style="position: absolute; left: 9px; top: 9px; width: 152px; height: 2px; z-index: 2; background: red;"></div> + +<!-- Bottom horizontal bar. --> +<div style="position: absolute; left: 9px; top: 109px; width: 152px; height: 2px; z-index: 2; background: red;"></div> + +</body> +</html> diff --git a/layout/reftests/ogg-video/green70x30.png b/layout/reftests/ogg-video/green70x30.png Binary files differnew file mode 100644 index 0000000000..b2bf32762d --- /dev/null +++ b/layout/reftests/ogg-video/green70x30.png diff --git a/layout/reftests/ogg-video/object-aspect-ratio-1a.xhtml b/layout/reftests/ogg-video/object-aspect-ratio-1a.xhtml new file mode 100644 index 0000000000..29fd619fd7 --- /dev/null +++ b/layout/reftests/ogg-video/object-aspect-ratio-1a.xhtml @@ -0,0 +1,14 @@ +<?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 style="background:white;"> +<object data="black140x100.ogv" style="width:340px; height:100px; position:relative; top:100px;"></object> +</body> +</html> +</foreignObject> +</svg> diff --git a/layout/reftests/ogg-video/object-aspect-ratio-1b.xhtml b/layout/reftests/ogg-video/object-aspect-ratio-1b.xhtml new file mode 100644 index 0000000000..ea1f02ff74 --- /dev/null +++ b/layout/reftests/ogg-video/object-aspect-ratio-1b.xhtml @@ -0,0 +1,14 @@ +<?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 style="background:white;"> +<object data="black140x100.ogv" style="width:140px; height:300px; position:relative; left:100px;"></object> +</body> +</html> +</foreignObject> +</svg> diff --git a/layout/reftests/ogg-video/object-aspect-ratio-2a.xhtml b/layout/reftests/ogg-video/object-aspect-ratio-2a.xhtml new file mode 100644 index 0000000000..36b4cc0c1e --- /dev/null +++ b/layout/reftests/ogg-video/object-aspect-ratio-2a.xhtml @@ -0,0 +1,14 @@ +<?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 style="background:white;"> +<object data="black140x100.ogv" style="width:680px; height:200px; position:relative; top:200px;"></object> +</body> +</html> +</foreignObject> +</svg> diff --git a/layout/reftests/ogg-video/object-aspect-ratio-2b.xhtml b/layout/reftests/ogg-video/object-aspect-ratio-2b.xhtml new file mode 100644 index 0000000000..d557921d2f --- /dev/null +++ b/layout/reftests/ogg-video/object-aspect-ratio-2b.xhtml @@ -0,0 +1,14 @@ +<?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 style="background:white;"> +<object data="black140x100.ogv" style="width:280px; height:600px; position:relative; left:200px;"></object> +</body> +</html> +</foreignObject> +</svg> diff --git a/layout/reftests/ogg-video/offset-1-ref.html b/layout/reftests/ogg-video/offset-1-ref.html new file mode 100644 index 0000000000..61a1dc83a7 --- /dev/null +++ b/layout/reftests/ogg-video/offset-1-ref.html @@ -0,0 +1,6 @@ +<!DOCTYPE HTML> +<html> +<body style="background:white;"> +<div style="width:29px; height:29px; background:black;"></div> +</body> +</html> diff --git a/layout/reftests/ogg-video/offset-1.xhtml b/layout/reftests/ogg-video/offset-1.xhtml new file mode 100644 index 0000000000..3504734907 --- /dev/null +++ b/layout/reftests/ogg-video/offset-1.xhtml @@ -0,0 +1,14 @@ +<?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 style="background:white;"> +<video src="black29x19offset.ogv"></video> +</body> +</html> +</foreignObject> +</svg> diff --git a/layout/reftests/ogg-video/poster-1.html b/layout/reftests/ogg-video/poster-1.html new file mode 100644 index 0000000000..15e3cb5462 --- /dev/null +++ b/layout/reftests/ogg-video/poster-1.html @@ -0,0 +1,7 @@ +<!DOCTYPE HTML> +<html> +<body style="background:white;"> +<!-- Ensure video element displays at poster size when video's intrinsic size isn't available. --> +<video preload="none" src="black140x100.ogv" poster="blue250x200.png"></video> +</body> +</html> diff --git a/layout/reftests/ogg-video/poster-10.html b/layout/reftests/ogg-video/poster-10.html new file mode 100644 index 0000000000..546b96a46f --- /dev/null +++ b/layout/reftests/ogg-video/poster-10.html @@ -0,0 +1,18 @@ +<!DOCTYPE HTML> +<html class="reftest-wait"> +<!-- Test: Create video, add poster, load. Should display poster. --> +<script> +function runTest() { + var v = document.createElement('video'); + v.addEventListener('loadeddata', function(){setTimeout(function(){document.documentElement.className = '';}, 0);}); + v.id = 'v'; + v.src = "black140x100.ogv"; + v.poster = "blue250x200.png"; + v.preload = "auto"; + document.body.appendChild(v); +} + +</script> +<body style="background:white;" onload="runTest();"> +</body> +</html> diff --git a/layout/reftests/ogg-video/poster-11.html b/layout/reftests/ogg-video/poster-11.html new file mode 100644 index 0000000000..a2f186a4bb --- /dev/null +++ b/layout/reftests/ogg-video/poster-11.html @@ -0,0 +1,29 @@ +<!DOCTYPE HTML> +<html class="reftest-wait"> +<!-- Test: Create video, load. Add poster frame, load again, poster should show. --> +<script> +function runTest() { + var v = document.createElement('video'); + + var endTest = function() { + setTimeout(function(){document.documentElement.className = '';}, 0); + }; + + var addPoster = function() { + v.removeEventListener('loadeddata', addPoster); + v.poster = "blue140x100.png"; + v.addEventListener('loadeddata', endTest); + v.load(); + }; + + v.addEventListener('loadeddata', addPoster); + v.id = 'v'; + v.src = "black140x100.ogv"; + v.preload = "auto"; + document.body.appendChild(v); +} + +</script> +<body style="background:white;" onload="runTest();"> +</body> +</html> diff --git a/layout/reftests/ogg-video/poster-12.html b/layout/reftests/ogg-video/poster-12.html new file mode 100644 index 0000000000..49b6dbfebf --- /dev/null +++ b/layout/reftests/ogg-video/poster-12.html @@ -0,0 +1,38 @@ +<!DOCTYPE HTML> +<html class="reftest-wait"> +<!-- Test: Create video, load, play. Add poster frame, load again, poster should show. --> +<script> +function runTest() { + var v = document.createElement('video'); + + var endTest = function() { + setTimeout(function(){document.documentElement.className = '';}, 0); + }; + + var play = + function() { + v.removeEventListener('loadeddata', play); + v.play(); + } + + var addPoster = function() { + v.removeEventListener('playing', addPoster); + v.poster = "blue140x100.png"; + v.addEventListener('loadeddata', endTest); + v.load(); + }; + + v.addEventListener('loadeddata', + play); + v.addEventListener('playing', + addPoster); + v.id = 'v'; + v.src = "black140x100.ogv"; + v.preload = "auto"; + document.body.appendChild(v); +} + +</script> +<body style="background:white;" onload="runTest();"> +</body> +</html> diff --git a/layout/reftests/ogg-video/poster-13.html b/layout/reftests/ogg-video/poster-13.html new file mode 100644 index 0000000000..79c3b8c582 --- /dev/null +++ b/layout/reftests/ogg-video/poster-13.html @@ -0,0 +1,8 @@ +<!DOCTYPE HTML> +<html> +<body style="background:white;"> +<!-- Test that poster is resized, maintaining its aspect ratio. --> +<video src="black140x100.ogv" poster="blue250x200.png" style="width: 288px; height: 216px;"></video> + +</body> +</html> diff --git a/layout/reftests/ogg-video/poster-15.html b/layout/reftests/ogg-video/poster-15.html new file mode 100644 index 0000000000..01c25b660e --- /dev/null +++ b/layout/reftests/ogg-video/poster-15.html @@ -0,0 +1,13 @@ +<!DOCTYPE HTML> +<html> +<!-- Test that poster is correctly laid out inside borders. Also test that + poster frames smaller than video don't have the video frame drawn behind + them etc. --> +<body style="background:white;"> +<video src="black140x100.ogv" + poster="green70x30.png" + preload="none" + style="border: solid blue 2px;"> +</video> +</body> +</html> diff --git a/layout/reftests/ogg-video/poster-2.html b/layout/reftests/ogg-video/poster-2.html new file mode 100644 index 0000000000..28b38f398c --- /dev/null +++ b/layout/reftests/ogg-video/poster-2.html @@ -0,0 +1,7 @@ +<!DOCTYPE HTML> +<html> +<body style="background:white;"> +<!-- Test if poster frame with invalid poster displays video frame. --> +<video src="black140x100.ogv" poster="not-a-valid-file"></video> +</body> +</html> diff --git a/layout/reftests/ogg-video/poster-3.html b/layout/reftests/ogg-video/poster-3.html new file mode 100644 index 0000000000..ae12c1b65d --- /dev/null +++ b/layout/reftests/ogg-video/poster-3.html @@ -0,0 +1,11 @@ +<!DOCTYPE HTML> +<html class="reftest-wait"> +<body style="background:white;"> +<!-- Test if poster hides after playing with autoplay. --> +<video src="black140x100.ogv" + poster="blue250x200.png" + preload="auto" + autoplay + onplaying="setTimeout(function(){document.documentElement.className = '';},0);"></video> +</body> +</html> diff --git a/layout/reftests/ogg-video/poster-4.html b/layout/reftests/ogg-video/poster-4.html new file mode 100644 index 0000000000..85453638c8 --- /dev/null +++ b/layout/reftests/ogg-video/poster-4.html @@ -0,0 +1,14 @@ +<!DOCTYPE HTML> +<html class="reftest-wait"> +<body style="background:white;" + onload="setTimeout(function(){document.documentElement.className = '';}, 0);"> +<!-- Test if we show video frame after removing valid poster. --> +<video src="black140x100.ogv" + preload="auto" + id="v" + poster="blue250x200.png"></video> +<script type="text/javascript"> + document.getElementById('v').poster = ''; +</script> +</body> +</html> diff --git a/layout/reftests/ogg-video/poster-5.html b/layout/reftests/ogg-video/poster-5.html new file mode 100644 index 0000000000..94049c92d7 --- /dev/null +++ b/layout/reftests/ogg-video/poster-5.html @@ -0,0 +1,13 @@ +<!DOCTYPE HTML> +<html class="reftest-wait"> +<body style="background:white;"> +<!-- Test to ensure that changing the poster after video has painted its first + frame doesn't render the poster. The video frame should not change to the + poster, since it's already painted its first video frame. --> +<video src="black140x100.ogv" + preload="auto" + id="v" + autoplay + onended="document.getElementById('v').poster = 'blue250x200.png'; setTimeout(function(){document.documentElement.className = '';},0);"></video> +</body> +</html> diff --git a/layout/reftests/ogg-video/poster-6.html b/layout/reftests/ogg-video/poster-6.html new file mode 100644 index 0000000000..c9ae5b88f5 --- /dev/null +++ b/layout/reftests/ogg-video/poster-6.html @@ -0,0 +1,12 @@ +<!DOCTYPE HTML> +<html class="reftest-wait"> +<body style="background:white;"> +<!-- Test that poster frame should hide after completing a seek. --> +<video src="black140x100.ogv" + preload="auto" + id="v" + onloadeddata="var v = document.getElementById('v'); v.currentTime = v.duration;" + onseeked="setTimeout(function(){document.documentElement.className = '';}, 0);" + poster="blue250x200.png"></video> +</body> +</html> diff --git a/layout/reftests/ogg-video/poster-7.html b/layout/reftests/ogg-video/poster-7.html new file mode 100644 index 0000000000..4c3e002d37 --- /dev/null +++ b/layout/reftests/ogg-video/poster-7.html @@ -0,0 +1,14 @@ +<!DOCTYPE HTML> +<html class="reftest-wait"> +<body style="background:white;" + onload="setTimeout(function(){document.documentElement.className = '';}, 0);"> +<!-- Test that poster frame changes when you change the poster attribute. --> +<video src="black140x100.ogv" + preload="none" + id="v" + poster="blue250x200.png"></video> +<script type="text/javascript"> + document.getElementById('v').poster = 'red140x100.png'; +</script> +</body> +</html> diff --git a/layout/reftests/ogg-video/poster-8.html b/layout/reftests/ogg-video/poster-8.html new file mode 100644 index 0000000000..c9e1fa37a0 --- /dev/null +++ b/layout/reftests/ogg-video/poster-8.html @@ -0,0 +1,12 @@ +<!DOCTYPE HTML> +<html class="reftest-wait"> +<body style="background:white;"> +<!-- Test if poster hides after playing with play() call. --> +<video src="black140x100.ogv" + poster="blue250x200.png" + id="v" + preload="auto" + onloadeddata="document.getElementById('v').play();" + onplaying="setTimeout(function(){document.documentElement.className = '';}, 0);"></video> +</body> +</html> diff --git a/layout/reftests/ogg-video/poster-ref-black140x100.html b/layout/reftests/ogg-video/poster-ref-black140x100.html new file mode 100644 index 0000000000..98f1a4cba7 --- /dev/null +++ b/layout/reftests/ogg-video/poster-ref-black140x100.html @@ -0,0 +1,6 @@ +<!DOCTYPE HTML> +<html> +<body style="background:white;"> +<video src="black140x100.ogv" preload="auto"></video> +</body> +</html> diff --git a/layout/reftests/ogg-video/poster-ref-blue125x100.html b/layout/reftests/ogg-video/poster-ref-blue125x100.html new file mode 100644 index 0000000000..90795ae911 --- /dev/null +++ b/layout/reftests/ogg-video/poster-ref-blue125x100.html @@ -0,0 +1,6 @@ +<!DOCTYPE HTML> +<html> +<body style="background:white;"> +<img src="blue140x100.png" alt="poster" style="position: absolute; height: 100px; width: 125px; left: 16px"> +</body> +</html> diff --git a/layout/reftests/ogg-video/poster-ref-blue140x100.html b/layout/reftests/ogg-video/poster-ref-blue140x100.html new file mode 100644 index 0000000000..66540b8e85 --- /dev/null +++ b/layout/reftests/ogg-video/poster-ref-blue140x100.html @@ -0,0 +1,6 @@ +<!DOCTYPE HTML> +<html> +<body style="background:white;"> +<img src="blue140x100.png" alt="poster"> +</body> +</html> diff --git a/layout/reftests/ogg-video/poster-ref-blue250x200.html b/layout/reftests/ogg-video/poster-ref-blue250x200.html new file mode 100644 index 0000000000..050d53dfb3 --- /dev/null +++ b/layout/reftests/ogg-video/poster-ref-blue250x200.html @@ -0,0 +1,6 @@ +<!DOCTYPE HTML> +<html> +<body style="background:white;"> +<img src="blue250x200.png" alt="poster"> +</body> +</html> diff --git a/layout/reftests/ogg-video/poster-ref-blue400x300.html b/layout/reftests/ogg-video/poster-ref-blue400x300.html new file mode 100644 index 0000000000..8c32ff715d --- /dev/null +++ b/layout/reftests/ogg-video/poster-ref-blue400x300.html @@ -0,0 +1,8 @@ +<!DOCTYPE HTML> +<html> +<body style="background:white;"> +<img src="blue250x200.png" style="position: relative; width: 270px; height: 216px; left: 9px;"> +</body> +</html> + + diff --git a/layout/reftests/ogg-video/poster-ref-green70x30.html b/layout/reftests/ogg-video/poster-ref-green70x30.html new file mode 100644 index 0000000000..f979220a6a --- /dev/null +++ b/layout/reftests/ogg-video/poster-ref-green70x30.html @@ -0,0 +1,6 @@ +<!DOCTYPE HTML> +<html> +<body style="background:white;"> +<img src="green70x30.png" alt="poster" style="border: solid blue 2px;"> +</body> +</html> diff --git a/layout/reftests/ogg-video/poster-ref-red140x100.html b/layout/reftests/ogg-video/poster-ref-red140x100.html new file mode 100644 index 0000000000..3ac08d29e2 --- /dev/null +++ b/layout/reftests/ogg-video/poster-ref-red140x100.html @@ -0,0 +1,6 @@ +<!DOCTYPE HTML> +<html> +<body style="background:white;"> +<img src="red140x100.png" alt="poster"> +</body> +</html> diff --git a/layout/reftests/ogg-video/red140x100.png b/layout/reftests/ogg-video/red140x100.png Binary files differnew file mode 100644 index 0000000000..20250771f3 --- /dev/null +++ b/layout/reftests/ogg-video/red140x100.png diff --git a/layout/reftests/ogg-video/red160x120.png b/layout/reftests/ogg-video/red160x120.png Binary files differnew file mode 100644 index 0000000000..21737a0e8e --- /dev/null +++ b/layout/reftests/ogg-video/red160x120.png diff --git a/layout/reftests/ogg-video/reftest.list b/layout/reftests/ogg-video/reftest.list new file mode 100644 index 0000000000..fa3d68587c --- /dev/null +++ b/layout/reftests/ogg-video/reftest.list @@ -0,0 +1,35 @@ +# NOTE: bug 1084564 covers "fails"/"skip" annotations for android below: +fuzzy(0-255,0-5000) == 444-1.html 444-1-ref.html +fails-if(Android) == aspect-ratio-1a.xhtml aspect-ratio-1-ref.html +fails-if(Android) == aspect-ratio-1b.xhtml aspect-ratio-1-ref.html +fails-if(Android) skip-if(gtkWidget) == aspect-ratio-2a.xhtml aspect-ratio-2-ref.html +fails-if(Android) skip-if(gtkWidget) == aspect-ratio-2b.xhtml aspect-ratio-2-ref.html +== aspect-ratio-3a.xhtml aspect-ratio-3-ref.xhtml +== aspect-ratio-3b.xhtml aspect-ratio-3-ref.xhtml +fails-if(Android) random-if(layersGPUAccelerated) == encoded-aspect-ratio-1.html encoded-aspect-ratio-1-ref.html +fails-if(Android) == basic-1.xhtml basic-1-ref.html +== canvas-1a.xhtml basic-1-ref.html +fails-if(Android) == canvas-1b.xhtml basic-1-ref.html +== clipping-1a.html clipping-1-ref.html +== empty-1a.html empty-1-ref.html +== empty-1b.html empty-1-ref.html +#these is skipped because we hang on the htmlparser tests when this is ran +random == object-aspect-ratio-1a.xhtml aspect-ratio-1-ref.html +random == object-aspect-ratio-1b.xhtml aspect-ratio-1-ref.html +== offset-1.xhtml offset-1-ref.html +random == object-aspect-ratio-2a.xhtml aspect-ratio-2-ref.html +random == object-aspect-ratio-2b.xhtml aspect-ratio-2-ref.html +fuzzy-if(winWidget,0-1,0-56000) fuzzy-if(cocoaWidget,0-1,0-56000) == zoomed-1.xhtml zoomed-1-ref.html # bug 778995 for fuzzy +== poster-1.html poster-ref-blue250x200.html +== poster-2.html poster-ref-black140x100.html +== poster-3.html poster-ref-black140x100.html +== poster-4.html poster-ref-black140x100.html +== poster-5.html poster-ref-black140x100.html +== poster-6.html poster-ref-black140x100.html +== poster-7.html poster-ref-red140x100.html +== poster-8.html poster-ref-black140x100.html +random == poster-10.html poster-ref-blue125x100.html +random == poster-11.html poster-ref-blue140x100.html +random == poster-12.html poster-ref-blue140x100.html +== poster-13.html poster-ref-blue400x300.html +== poster-15.html poster-ref-green70x30.html diff --git a/layout/reftests/ogg-video/seek420.ogv b/layout/reftests/ogg-video/seek420.ogv Binary files differnew file mode 100644 index 0000000000..2221cfef42 --- /dev/null +++ b/layout/reftests/ogg-video/seek420.ogv diff --git a/layout/reftests/ogg-video/seek444.ogv b/layout/reftests/ogg-video/seek444.ogv Binary files differnew file mode 100644 index 0000000000..a2453afeae --- /dev/null +++ b/layout/reftests/ogg-video/seek444.ogv diff --git a/layout/reftests/ogg-video/zoomed-1-ref.html b/layout/reftests/ogg-video/zoomed-1-ref.html new file mode 100644 index 0000000000..01929db7e7 --- /dev/null +++ b/layout/reftests/ogg-video/zoomed-1-ref.html @@ -0,0 +1,6 @@ +<!DOCTYPE HTML> +<html> +<body style="background:white; margin:0;"> +<div style="width:280px; height:200px; background:#010101;"></div> +</body> +</html> diff --git a/layout/reftests/ogg-video/zoomed-1.xhtml b/layout/reftests/ogg-video/zoomed-1.xhtml new file mode 100644 index 0000000000..e68e1290f4 --- /dev/null +++ b/layout/reftests/ogg-video/zoomed-1.xhtml @@ -0,0 +1,15 @@ +<?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" reftest-zoom="2" + width="50%" height="50%"> +<!-- use an empty g to force filters.svg to load before onload --> +<use xlink:href="../filters.svg#empty" /> +<foreignObject x="0" y="0" height="100%" width="100%"> +<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"> +<body style="background:white; margin:0"> +<video src="black140x100.ogv"></video> +</body> +</html> +</foreignObject> +</svg> |