https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 3fee9e181e7c97c517c0b36b6387c04e74a02181 authored by Andy Paicu on 02 October 2018, 04:21:46 UTC
Fixed securityviolationevent not containing the full src and path
Tip revision: 3fee9e1
xrSession_device.https.html
<!DOCTYPE html>
<body>
  <script src=/resources/testharness.js></script>
  <script src=/resources/testharnessreport.js></script>
  <script src="resources/webxr_util.js"></script>
  <canvas></canvas>

  <script>
    xr_promise_test("Requested session has device set",
     (t) => {
      return XRTest.simulateDeviceConnection({ supportsImmersive:true })
        .then( (controller) => { return navigator.xr.requestDevice() })
        .then( (device) => new Promise((resolve) => {
          XRTest.simulateUserActivation( () => {
            resolve(device.requestSession({ immersive: true }).then( (session) => {
              assert_true(session.immersive);
              assert_equals(session.device, device);
            }));
          });
        }));
    });
  </script>
</body>

back to top