web-usb.https.html (797B)
1 <!DOCTYPE html> 2 <script src="/common/utils.js"></script> 3 <script src="/resources/testharness.js"></script> 4 <script src="/resources/testharnessreport.js"></script> 5 <script src="/speculation-rules/prerender/resources/utils.js"></script> 6 <script src="/speculation-rules/prerender/resources/deferred-promise-utils.js"></script> 7 <script> 8 9 const params = new URLSearchParams(location.search); 10 11 // The main test page (restriction-web-usb.https.html) loads the initiator 12 // page, then the initiator page will prerender itself with the `prerendering` 13 // parameter. 14 if (!params.has('prerendering')) { 15 loadInitiatorPage(); 16 } else { 17 const prerenderEventCollector = new PrerenderEventCollector(); 18 prerenderEventCollector.start( 19 navigator.usb.getDevices(), 'navigator.usb.getDevices'); 20 } 21 22 </script>