mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-10 21:28:04 +02:00
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
25 lines
988 B
HTML
25 lines
988 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("An XR-compatible webglCanvasContext can be created",
|
|
(t) => {
|
|
return XRTest.simulateDeviceConnection({ supportsImmersive:true })
|
|
.then( (controller) => {
|
|
webglCanvas = document.getElementById('webgl-canvas');
|
|
gl = webglCanvas.getContext('webgl', {xrCompatible: true});
|
|
assert_true(gl.getContextAttributes().xrCompatible);
|
|
|
|
// Check that an offscreen context behaves no different.
|
|
let offscreenCanvas = document.createElement('canvas');
|
|
let offscreenGl = webglCanvas.getContext(
|
|
'webgl', {xrCompatible: true});
|
|
assert_true(offscreenGl.getContextAttributes().xrCompatible);
|
|
});
|
|
});
|
|
|
|
</script>
|
|
</body>
|