https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 5423d8eda208d09132bddd79710ef3e716746218 authored by Mike Pennisi on 12 September 2018, 23:30:20 UTC
Demonstrate on downstream fork
Tip revision: 5423d8e
navigator_xr_requestDevice.https.html
<!DOCTYPE html>
<body>
  <script src=/resources/testharness.js></script>
  <script src=/resources/testharnessreport.js></script>
  <script src="resources/webxr_util.js"></script>

  <script>
    xr_promise_test("navigator.xr.requestDevice returns a device", (t) => {
      return XRTest.simulateDeviceConnection({ supportsImmersive: true })
        .then( (controller) => { return navigator.xr.requestDevice() })
        .then( (device) => {
          t.step(() => {
            assert_true(device != null);
            assert_true(device instanceof XRDevice);
          });
        });
    });
  </script>
</body>
back to top