mirror of
https://github.com/servo/servo.git
synced 2025-08-23 06:15:35 +01:00
Update web-platform-tests to revision 6b6163867ad474d977778a3f19c378a05a4851dc
This commit is contained in:
parent
3ebd42caa3
commit
498854a0e4
49 changed files with 587 additions and 173 deletions
|
@ -0,0 +1,25 @@
|
|||
<!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>
|
Loading…
Add table
Add a link
Reference in a new issue