Files
sousa-gecko/testing/web-platform/tests/webxr/historical.html
T
Marcos Cáceres 0aec464ff0 Bug 2021672 [wpt PR 58320] - Remove old WebVR tests + add historical test, a=testonly
Automatic update from web-platform-tests
Remove old WebVR tests  + add historical test (#58320)
--

wpt-commits: e9f6f5f87ac736204c584a4d275e35a675d93360
wpt-pr: 58320
2026-03-16 10:12:03 +00:00

57 lines
1.7 KiB
HTML

<!doctype html>
<title>Historical WebVR features must be removed</title>
<link rel="help" href="https://immersive-web.github.io/webxr/" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
// WebVR was deprecated in favor of WebXR. These APIs should no longer exist.
// See: https://immersive-web.github.io/webvr/spec/1.1/
function isInterfaceRemoved(name) {
test(function () {
assert_false(name in window);
assert_equals(window[name], undefined);
}, "Historical WebVR features must be removed: " + name);
}
var removedInterfaces = [
"VRDisplay",
"VRDisplayCapabilities",
"VRDisplayEvent",
"VREyeParameters",
"VRFrameData",
"VRPose",
"VRStageParameters",
];
removedInterfaces.forEach(isInterfaceRemoved);
function isRemovedFromNavigator(name) {
test(function () {
assert_false(name in navigator);
assert_equals(navigator[name], undefined);
}, "Historical WebVR navigator member must be removed: " + name);
}
var navigatorRemoved = ["getVRDisplays", "activeVRDisplays", "vrEnabled"];
navigatorRemoved.forEach(isRemovedFromNavigator);
function isRemovedFromWindow(name) {
test(function () {
assert_false(name in window);
assert_equals(window[name], undefined);
}, "Historical WebVR window event handler must be removed: " + name);
}
var windowRemoved = [
"onvrdisplayactivate",
"onvrdisplayblur",
"onvrdisplayconnect",
"onvrdisplaydeactivate",
"onvrdisplaydisconnect",
"onvrdisplayfocus",
"onvrdisplaypresentchange",
];
windowRemoved.forEach(isRemovedFromWindow);
</script>