tor-browser

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

xrDevice_isSessionSupported_immersive-ar.https.html (1185B)


      1 <!DOCTYPE html>
      2 <body>
      3  <script src=/resources/testharness.js></script>
      4  <script src=/resources/testharnessreport.js></script>
      5  <script src="../resources/webxr_util.js"></script>
      6  <script src="../resources/webxr_test_constants.js"></script>
      7  <script>
      8    xr_promise_test(
      9      "isSessionSupported resolves to true for immersive-ar on a supported device",
     10      (t) => {
     11        return navigator.xr.test.simulateDeviceConnection(IMMERSIVE_AR_DEVICE)
     12          .then( (controller) => {
     13            return navigator.xr.isSessionSupported('immersive-ar').then((supported) => {
     14              t.step(() => {
     15                assert_true(supported);
     16              });
     17            });
     18          });
     19      });
     20 
     21    xr_promise_test(
     22      "isSessionSupported resolves to false for immersive-ar on an unsupported device",
     23      (t) => {
     24        return navigator.xr.test.simulateDeviceConnection(TRACKED_IMMERSIVE_DEVICE)
     25          .then( (controller) => {
     26            return navigator.xr.isSessionSupported('immersive-ar').then((supported) => {
     27              t.step(() => {
     28                assert_false(supported);
     29              });
     30            });
     31          });
     32      });
     33 </script>
     34 </body>