test_resistFingerprinting.html (1358B)
1 <html> 2 <head> 3 <title></title> 4 <script src="/tests/SimpleTest/SimpleTest.js"></script> 5 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 6 </head> 7 <body> 8 <script type="module"> 9 add_task(async () => { 10 const gTestcases = [ 11 { 12 resistFingerprinting : false, 13 expectedSupport : false, 14 }, 15 { 16 resistFingerprinting : true, 17 expectedSupport : true, 18 }, 19 ]; 20 21 for (var t of gTestcases) { 22 // We should be able to test `VideoDecoder`, but that isn't implemented for now 23 // Bug 1968022 24 for (let side of [VideoEncoder]) { 25 await SpecialPowers.pushPrefEnv(({ 26 set: [["privacy.resistFingerprinting", t.resistFingerprinting]]})); 27 // This test will need to change if the test machine can encode av1 in 28 // hardware, but this isn't the case right now. 29 let av1_supported_hw = await side.isConfigSupported({ 30 codec: "av01.0.08M.08", 31 width: 1280, 32 height: 720, 33 hardwareAcceleration: "prefer-hardware", 34 }); 35 36 is(av1_supported_hw.supported, t.expectedSupport, 37 `AV1 hardware ${side == VideoEncoder ? "encoding" : "decoding"} 38 ${t.supported ? " is" : "isn't"} supported 39 ${t.resistFingerprinting ? " with" : " without"} resistfingerprinting`); 40 } 41 } 42 }); 43 </script> 44 </body> 45 </html>