encrypted-media-report-only.https.html (966B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <script src='/resources/testharness.js'></script> 5 <script src='/resources/testharnessreport.js'></script> 6 </head> 7 <body> 8 <script> 9 var check_report_format = ([reports, observer]) => { 10 let report = reports[0]; 11 assert_equals(report.type, "permissions-policy-violation"); 12 assert_equals(report.body.featureId, "encrypted-media"); 13 assert_equals(report.body.disposition, "report"); 14 }; 15 16 promise_test(async t => { 17 const report = new Promise(resolve => { 18 new ReportingObserver((reports, observer) => resolve([reports, observer]), 19 {types: ['permissions-policy-violation']}).observe(); 20 }); 21 await navigator.requestMediaKeySystemAccess("org.w3.clearkey", 22 [{ 23 initDataTypes: ["webm"], 24 videoCapabilities: [{contentType: 'video/webm;codecs="vp8"'}], 25 }]); 26 check_report_format(await report); 27 }, "Encrypted Media report only mode"); 28 </script> 29 </body> 30 </html>