mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1582294 - Add reftest for media element capture with an alpha channel. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D93750
This commit is contained in:
parent
88943b46a7
commit
420e2b99a6
@ -35,6 +35,7 @@ random == poster-12.html poster-ref-blue140x100.html
|
||||
random-if(winWidget) random-if(cocoaWidget) == bug686957.html bug686957-ref.html # bug 922951 for OS X
|
||||
== webm-alpha.html webm-alpha-ref.html
|
||||
fuzzy(0-5,0-111556) == webm-alpha-2.html webm-alpha-2-ref.html
|
||||
== webm-alpha-capture.html webm-alpha-ref.html
|
||||
|
||||
# Tests for <video src> with 'object-fit' & 'object-position':
|
||||
# These tests should be very similar to tests in our w3c-css/submitted/images3
|
||||
|
22
layout/reftests/webm-video/webm-alpha-capture.html
Normal file
22
layout/reftests/webm-video/webm-alpha-capture.html
Normal file
@ -0,0 +1,22 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html class="reftest-wait">
|
||||
<meta charset="utf-8">
|
||||
<title>Test that if a WebM video has an alpha channel, it is displayed correctly when captured.</title>
|
||||
<script>
|
||||
async function runTest() {
|
||||
const v = document.createElement("video");
|
||||
document.body.appendChild(v);
|
||||
const vout = document.createElement("video");
|
||||
document.body.appendChild(vout);
|
||||
v.preload = "auto";
|
||||
v.src = "webm-alpha.webm";
|
||||
await new Promise(r => v.onloadeddata = r);
|
||||
vout.srcObject = v.mozCaptureStream();
|
||||
v.play();
|
||||
await new Promise(r => vout.onloadeddata = r);
|
||||
document.documentElement.removeAttribute("class");
|
||||
}
|
||||
</script>
|
||||
<body style="background:grey;" onload="runTest()">
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user