blob: 58b08828f5e13124aa7df68ec33eb7bb6e58b679 [file] [log] [blame]
<!doctype html>
<!--
Used to test that the promise returned by WebXR's requestSession does not get
resolved or rejected while the DON flow is active.
-->
<html>
<head>
<link rel="stylesheet" type="text/css" href="../resources/webxr_e2e.css">
</head>
<body>
<canvas id="webgl-canvas"></canvas>
<script src="../../../../../../third_party/blink/web_tests/resources/testharness.js"></script>
<script src="../resources/webxr_e2e.js"></script>
<script src="../resources/webxr_boilerplate.js"></script>
<script>
function onImmersiveRequestWithDon() {
navigator.xr.requestSession({mode: 'immersive-vr'}).then( (session) => {
assert_unreached("requestSession promise resolved");
}, () => {
assert_unreached("requestSession promise rejected");
});
window.setTimeout( () => { done(); }, 2000);
}
webglCanvas.onclick = onImmersiveRequestWithDon;
</script>
</body>
</html>