blob: 493dd7ab25f45301b4a6419a99c1d42c94daf357 [file] [log] [blame]
<!DOCTYPE html>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script src="../vr/resources/fake-vr-displays.js"></script>
<script src="file:///gen/layout_test_data/mojo/public/js/mojo_bindings.js"></script>
<script src="file:///gen/device/vr/vr_service.mojom.js"></script>
<script src="../vr/resources/mock-vr-service.js"></script>
<script src="../vr/resources/test-constants.js"></script>
<script>
let fakeDisplays = fakeVRDisplays();
vr_test( (t) => {
return navigator.xr.requestDevice().then( (device) => {
device.supportsSession().then( () => {
t.step( () => {
assert_unreached("supportsSession unexpectedly allowed non-exclusive session without an output context");
});
}).catch( () => {
// Expected result, test is finished.
t.done();
});
}, (err) => {
t.step( () => {
assert_unreached("requestDevice rejected");
});
});
}, [fakeDisplays["Pixel"]],
"supportsSession properly identifies supported non-exclusive sessions");
</script>