mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Update web-platform-tests to revision 3f3849c5d05f9350fad0b06d3bb3ae30d7e18d14
This commit is contained in:
parent
9a7e2663e8
commit
f767403c00
310 changed files with 8134 additions and 895 deletions
|
@ -28,14 +28,18 @@ function xr_session_promise_test(
|
|||
name, func, fakeDeviceInit, sessionMode, sessionInit, properties) {
|
||||
let testDeviceController;
|
||||
let testSession;
|
||||
let sessionObjects = {};
|
||||
|
||||
const webglCanvas = document.getElementsByTagName('canvas')[0];
|
||||
// We can't use assert_true here because it causes the wpt testharness to treat
|
||||
// this as a test page and not as a test.
|
||||
if (!webglCanvas) {
|
||||
promise_test(async (t) => {
|
||||
Promise.reject('xr_session_promise_test requires a canvas on the page!');
|
||||
}, name, properties);
|
||||
}
|
||||
let gl = webglCanvas.getContext('webgl', {alpha: false, antialias: false});
|
||||
sessionObjects.gl = gl;
|
||||
|
||||
xr_promise_test(
|
||||
name,
|
||||
|
@ -75,7 +79,8 @@ function xr_session_promise_test(
|
|||
session.updateRenderState({
|
||||
baseLayer: glLayer
|
||||
});
|
||||
resolve(func(session, testDeviceController, t));
|
||||
sessionObjects.glLayer = glLayer;
|
||||
resolve(func(session, testDeviceController, t, sessionObjects));
|
||||
})
|
||||
.catch((err) => {
|
||||
reject(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue