getallscreensmedia-exposure.tentative.https.window.js (765B)
1 async_test(t => { 2 const i = document.createElement('iframe'); 3 i.src = "/common/blank.html"; 4 i.onload = t.step_func_done(_ => { 5 assert_equals('undefined', typeof i.contentWindow.navigator.mediaDevices.getAllScreensMedia); 6 }); 7 document.body.appendChild(i); 8 }, "No CSP, no exposure."); 9 10 async_test(t => { 11 const i = document.createElement('iframe'); 12 i.src = "/content-security-policy/support/echo-policy.py?policy=" + 13 encodeURIComponent("script-src 'none'; object-src 'none'; base-uri 'none'; require-trusted-types-for 'script'"); 14 i.onload = t.step_func_done(_ => { 15 assert_equals("undefined", typeof i.contentWindow.navigator.mediaDevices.getAllScreensMedia); 16 }); 17 document.body.appendChild(i); 18 }, "Strict CSP + TT, no exposure.");