| <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> |
| <canvas id="webgl-canvas"></canvas> |
| "A lost webglCanvasContext should not be able to set xr compatibility", |
| return navigator.xr.test.simulateDeviceConnection(TRACKED_IMMERSIVE_DEVICE) |
| webglCanvas = document.getElementById('webgl-canvas'); |
| gl = webglCanvas.getContext('webgl'); |
| return gl.makeXRCompatible(); |
| gl.getExtension('WEBGL_lose_context').loseContext(); |
| return promise_rejects_dom(t, 'InvalidStateError', gl.makeXRCompatible()); |