Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test gets skipped with pattern: os == 'android'
- Manifest: dom/media/webcodecs/test/mochitest.toml
<html>
<head>
<title></title>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<script type="module">
add_task(async () => {
const gTestcases = [
{
resistFingerprinting : false,
expectedSupport : false,
},
{
resistFingerprinting : true,
expectedSupport : true,
},
];
for (var t of gTestcases) {
// We should be able to test `VideoDecoder`, but that isn't implemented for now
for (let side of [VideoEncoder]) {
await SpecialPowers.pushPrefEnv(({
set: [["privacy.resistFingerprinting", t.resistFingerprinting]]}));
// This test will need to change if the test machine can encode av1 in
// hardware, but this isn't the case right now.
let av1_supported_hw = await side.isConfigSupported({
codec: "av01.0.08M.08",
width: 1280,
height: 720,
hardwareAcceleration: "prefer-hardware",
});
is(av1_supported_hw.supported, t.expectedSupport,
`AV1 hardware ${side == VideoEncoder ? "encoding" : "decoding"}
${t.supported ? " is" : "isn't"} supported
${t.resistFingerprinting ? " with" : " without"} resistfingerprinting`);
}
}
});
</script>
</body>
</html>