blob: 186b85f4a0c36861f8661e9317c6b531f69944d8 [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( (magicWindowOnlyDevice) => {
magicWindowOnlyDevice.supportsSession({ exclusive: true }).then( () => {
t.step( () => {
assert_unreached("supportsSession unexpectedly allowed exclusive");
});
}, () => {
// Expected result. Test complete.
t.done();
});
}, (err) => {
t.step( () => {
assert_unreached("requestDevice rejected");
});
});
}, [fakeDisplays["FakeMagicWindowOnly"]],
"supportsSession rejects when exclusive session is not supported on device");
</script>