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