Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 2 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /webxr/render_state_vertical_fov_immersive.https.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/webxr_util.js"></script>
<script src="resources/webxr_test_constants.js"></script>
<script>
let testName = "inlineVerticalFieldOfView is set appropriately on immersively sessions";
let fakeDeviceInitParams = TRACKED_IMMERSIVE_DEVICE;
let testFunction = function(session, fakeDeviceController, t) {
return new Promise((resolve, reject) => {
// inlineVerticalFieldOfView should be null for immersive sessions;
t.step(() => {
assert_equals(session.renderState.inlineVerticalFieldOfView, null);
});
// Trying to set it should throw an exception
try {
session.updateRenderState({
inlineVerticalFieldOfView: 1.0
});
t.step(() => {
assert_unreached("Should not be able to set inlineVerticalFieldOfView on immersive sessions");
});
} catch(err) {
t.step(() => {
assert_equals(err.name, "InvalidStateError");
});
}
resolve();
});
};
xr_session_promise_test(
testName, testFunction, fakeDeviceInitParams, 'immersive-vr');
</script>