blob: b2e52affedee41f6eb2ad4f999fd31b65c881cc6 [file] [log] [blame]
<!DOCTYPE html>
<title>Detached use of navigator.xr()</title>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<iframe sandbox="allow-same-origin" id="subframe"></iframe>
//This test ensures that if a navigator.xr gets called on a detached navigator the renderer does not crash.
test(function() {
var nav = window.frames[0].navigator;
// If all goes well, nav.xr should just be null, otherwise the renderer will crash.
assert_equals(nav.xr, null);
}, "navigator.xr does not crash");