blob: 4a657d8d326f725ac90cd2e76035b4fdf85f5fd7 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<title>Detached use of navigator.xr</title>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
</head>
<body>
<iframe sandbox="allow-same-origin" id="subframe"></iframe>
<script>
promise_test(t => {
var nav_xr = window.frames[0].navigator.xr;
document.getElementById("subframe").remove();
return promise_rejects(t, "InvalidStateError", nav_xr.requestDevice());
}, "Check that navigator.xr.requestDevice rejects on a detached navigator.");
</script>
</body>
</html>