| <!DOCTYPE html> |
| <script src="../resources/testharness.js"></script> |
| <script src="../resources/testharnessreport.js"></script> |
| <script src="file:///gen/layout_test_data/mojo/public/js/mojo_bindings.js"></script> |
| <script src="file:///gen/device/vr/public/mojom/vr_service.mojom.js"></script> |
| <script src="../xr/resources/xr-device-mocking.js"></script> |
| <script src="../xr/resources/xr-test-utils.js"></script> |
| <script src="../xr/resources/test-constants.js"></script> |
| <script> |
| let fakeDevices = fakeXRDevices(); |
| |
| promise_test( (t) => { |
| setFakeDevices([fakeDevices["FakeGooglePixelPhone"]]); |
| return navigator.xr.requestDevice().then( (device) => { |
| // Non-exclusive sessions without a outputContext should not be supported. |
| promise_rejects(t, 'NotSupportedError', device.supportsSession()); |
| |
| // Non-exclusive sessions with an outputContexted should be supported. |
| return device.supportsSession({ |
| outputContext: getOutputContext() |
| }); |
| }); |
| }, "supportsSession properly identifies supported non-exclusive sessions"); |
| |
| </script> |