https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 64da316928b38f3dbd2231dbfb0f7f776170a106 authored by Brad Werth on 11 April 2018, 09:35:18 UTC
Part 9: Fix wpt reftest shape-image-025.html to make every frame of the animated GIF use a green box in the lower-left quadrant.
Tip revision: 64da316
usb-allowed-by-feature-policy-attribute.https.sub.html
<!DOCTYPE html>
<body>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=/feature-policy/resources/featurepolicy.js></script>
<script>
'use strict';
var same_origin_src = '/feature-policy/resources/feature-policy-usb.html';
var cross_origin_src = 'https://{{domains[www]}}:{{ports[https][0]}}' +
  same_origin_src;
var feature_name = 'Feature policy "usb"';
var header = 'allow="usb" attribute';

async_test(t => {
  test_feature_availability(
      'usb.getDevices()', t, same_origin_src,
      expect_feature_available_default, 'usb');
}, feature_name + ' can be enabled in same-origin iframe using ' + header);

async_test(t => {
  test_feature_availability(
      'usb.getDevices()', t, cross_origin_src,
      expect_feature_available_default, 'usb');
}, feature_name + ' can be enabled in cross-origin iframe using ' + header);
</script>
</body>
back to top