autoplay-allowed-by-feature-policy-attribute.https.sub.html (1273B)
1 <!DOCTYPE html> 2 <body> 3 <script src=/resources/testharness.js></script> 4 <script src=/resources/testharnessreport.js></script> 5 <script src=/resources/testdriver.js></script> 6 <script src=/resources/testdriver-vendor.js></script> 7 <script src=/common/media.js></script> 8 <script src=/feature-policy/resources/featurepolicy.js></script> 9 <script src=/feature-policy/resources/autoplay.js></script> 10 <script> 11 'use strict'; 12 const same_origin_src = '/feature-policy/resources/feature-policy-autoplay.html'; 13 const cross_origin_src = 'https://{{domains[www]}}:{{ports[https][0]}}' + 14 same_origin_src; 15 const feature_name = 'Feature policy "autoplay"'; 16 const header = 'allow="autoplay" attribute'; 17 18 async_test(t => { 19 simulateGesture(t, () => { 20 test_feature_availability( 21 'autoplay', t, same_origin_src, 22 expect_feature_available_default, 'autoplay'); 23 }); 24 }, feature_name + ' can be enabled in same-origin iframe using ' + header); 25 26 async_test(t => { 27 simulateGesture(t, () => { 28 test_feature_availability( 29 'autoplay', t, cross_origin_src, 30 expect_feature_available_default, 'autoplay'); 31 }); 32 }, feature_name + ' can be enabled in cross-origin iframe using ' + header); 33 </script> 34 </body>