blob: 535b0bcbbc282ee5aaa7500cbd3a35ba21fed3d4 [file] [log] [blame]
<!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(
"supportsSession resolves when non-immersive options supported",
(t) => {
return XRTest.simulateDeviceConnection({ supportsImmersive:true })
.then( (controller) => { return navigator.xr.requestDevice() })
.then( (device) => {
// Non-immersive sessions without a outputContext should not be supported.
promise_rejects(t, 'NotSupportedError', device.supportsSession());
// Non-immersive sessions with an outputContext should be supported.
return device.supportsSession({
outputContext: getOutputContext()
});
});
});
</script>
</body>