webvr-enabled-by-feature-policy-attribute.https.sub.html (909B)
1 <!DOCTYPE html> 2 <body> 3 <script src=/resources/testharness.js></script> 4 <script src=/resources/testharnessreport.js></script> 5 <script src=/feature-policy/resources/featurepolicy.js></script> 6 <script> 7 'use strict'; 8 var same_origin_src = '/feature-policy/resources/feature-policy-webvr.html'; 9 var cross_origin_src = 'https://{{domains[www]}}:{{ports[https][0]}}' + 10 same_origin_src; 11 var header = 'Feature-Policy allow="vr" attribute'; 12 13 async_test(t => { 14 test_feature_availability( 15 'navigator.getVRDisplays()', t, same_origin_src, 16 expect_feature_available_default, 'vr'); 17 }, header + ' allows same-origin iframe'); 18 19 async_test(t => { 20 test_feature_availability( 21 'navigator.getVRDisplays()', t, cross_origin_src, 22 expect_feature_available_default, 'vr'); 23 }, header + ' allows cross-origin iframe'); 24 </script> 25 </body>