gecko-dev/testing/web-platform/tests/webxr/webGLCanvasContext_makecompatible_contextlost.https.html
Brandon Jones 23b084bb34 Bug 1517906 [wpt PR 14725] - Removed XRDevice from WebGL context compatibility, a=testonly
Automatic update from web-platform-tests
Removed XRDevice from WebGL context compatibility

This is the first step to removing XRDevice entirely.

Bug: 916287
Change-Id: Ie5f86738632636927a822c6ccbecba3202446d41
Reviewed-on: https://chromium-review.googlesource.com/c/1383391
Reviewed-by: Brian Sheedy <bsheedy@chromium.org>
Reviewed-by: Miguel Casas <mcasas@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#620114}

--

wpt-commits: cda00eb55db44c80e012349cca0a6201804c5df7
wpt-pr: 14725
2019-02-07 21:49:47 +00:00

22 lines
768 B
HTML

<!DOCTYPE html>
<body>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src="resources/webxr_util.js"></script>
<canvas id="webgl-canvas"></canvas>
<script>
xr_promise_test(
"A lost webglCanvasContext should not be able to set xr compatibility",
(t) => {
return XRTest.simulateDeviceConnection({ supportsImmersive:true })
.then( (controller) => {
webglCanvas = document.getElementById('webgl-canvas');
gl = webglCanvas.getContext('webgl', {xrCompatible: true});
gl.getExtension('WEBGL_lose_context').loseContext();
return promise_rejects(t, 'InvalidStateError', gl.makeXRCompatible());
});
});
</script>
</body>