tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

reject_opaque_origin.https.html (543B)


      1 <!DOCTYPE html>
      2 
      3 <script src="/resources/testharness.js"></script>
      4 <script src="/resources/testharnessreport.js"></script>
      5 <script>
      6  'use strict';
      7 
      8  promise_test(async (t) => {
      9    await promise_rejects_dom(
     10        t, 'SecurityError', navigator.usb.requestDevice({filters:[]}),
     11        'requestDevice() should throw a SecurityError DOMException when ' +
     12        'called from a context where the top-level document has an opaque ' +
     13        'origin.');
     14  }, 'Calls to USB APIs from an origin with opaque top origin get blocked.');
     15 </script>