mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Fix test timing for all tests using xr_promise_test (#33715)
* Ensure all xr_promise_test calls wait for DOMContentLoaded when necessary. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Update webxr test expectations. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Update manifest. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
parent
af61b1a107
commit
3eee02869a
12 changed files with 28 additions and 33 deletions
2
tests/wpt/meta/MANIFEST.json
vendored
2
tests/wpt/meta/MANIFEST.json
vendored
|
@ -500723,7 +500723,7 @@
|
||||||
[]
|
[]
|
||||||
],
|
],
|
||||||
"webxr_util.js": [
|
"webxr_util.js": [
|
||||||
"824aee5700a15d518a113bbbcaab7bdf92d187e2",
|
"ab8f7c80c31fc7bc827bd61abf13e095e53b48cd",
|
||||||
[]
|
[]
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
2
tests/wpt/meta/webxr/__dir__.ini
vendored
2
tests/wpt/meta/webxr/__dir__.ini
vendored
|
@ -1 +1 @@
|
||||||
prefs: [dom.webxr.test: true, dom.webgl2.enabled: true]
|
prefs: [dom.webxr.test: true, dom.webgl2.enabled: true, dom.webxr.layers.enabled: true]
|
|
@ -1,7 +1,7 @@
|
||||||
[depth_sensing_cpu_dataUnavailable.https.html]
|
[depth_sensing_cpu_dataUnavailable.https.html]
|
||||||
|
expected: ERROR
|
||||||
[Ensures depth data is not available when cleared in the controller, `cpu-optimized` - webgl]
|
[Ensures depth data is not available when cleared in the controller, `cpu-optimized` - webgl]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Ensures depth data is not available when cleared in the controller, `cpu-optimized` - webgl2]
|
[Ensures depth data is not available when cleared in the controller, `cpu-optimized` - webgl2]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[depth_sensing_cpu_inactiveFrame.https.html]
|
[depth_sensing_cpu_inactiveFrame.https.html]
|
||||||
|
expected: ERROR
|
||||||
[Ensures getDepthInformation() throws when not run in an active frame, `cpu-optimized` - webgl]
|
[Ensures getDepthInformation() throws when not run in an active frame, `cpu-optimized` - webgl]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Ensures getDepthInformation() throws when not run in an active frame, `cpu-optimized` - webgl2]
|
[Ensures getDepthInformation() throws when not run in an active frame, `cpu-optimized` - webgl2]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[depth_sensing_cpu_incorrectUsage.https.html]
|
[depth_sensing_cpu_incorrectUsage.https.html]
|
||||||
|
expected: ERROR
|
||||||
[Ensures XRWebGLDepthInformation is not obtainable in `cpu-optimized` usage mode - webgl]
|
[Ensures XRWebGLDepthInformation is not obtainable in `cpu-optimized` usage mode - webgl]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Ensures XRWebGLDepthInformation is not obtainable in `cpu-optimized` usage mode - webgl2]
|
[Ensures XRWebGLDepthInformation is not obtainable in `cpu-optimized` usage mode - webgl2]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[depth_sensing_cpu_staleView.https.html]
|
[depth_sensing_cpu_staleView.https.html]
|
||||||
|
expected: ERROR
|
||||||
[Ensures getDepthInformation() throws when run with stale XRView, `cpu-optimized` - webgl]
|
[Ensures getDepthInformation() throws when run with stale XRView, `cpu-optimized` - webgl]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Ensures getDepthInformation() throws when run with stale XRView, `cpu-optimized` - webgl2]
|
[Ensures getDepthInformation() throws when run with stale XRView, `cpu-optimized` - webgl2]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[depth_sensing_gpu_dataUnavailable.https.html]
|
[depth_sensing_gpu_dataUnavailable.https.html]
|
||||||
|
expected: ERROR
|
||||||
[Ensures depth data is not available when cleared in the controller, `gpu-optimized` - webgl]
|
[Ensures depth data is not available when cleared in the controller, `gpu-optimized` - webgl]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Ensures depth data is not available when cleared in the controller, `gpu-optimized` - webgl2]
|
[Ensures depth data is not available when cleared in the controller, `gpu-optimized` - webgl2]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[depth_sensing_gpu_staleView.https.html]
|
[depth_sensing_gpu_staleView.https.html]
|
||||||
|
expected: ERROR
|
||||||
[Ensures getDepthInformation() throws when not run with stale XRView, `gpu-optimized` - webgl]
|
[Ensures getDepthInformation() throws when not run with stale XRView, `gpu-optimized` - webgl]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Ensures getDepthInformation() throws when not run with stale XRView, `gpu-optimized` - webgl2]
|
[Ensures getDepthInformation() throws when not run with stale XRView, `gpu-optimized` - webgl2]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
[xrWebGLBinding_getReflectionCubeMap.https.html]
|
[xrWebGLBinding_getReflectionCubeMap.https.html]
|
||||||
[Test that getReflectionCubeMap returns or throws appropriately without a reflection map. - webgl]
|
[Test that getReflectionCubeMap returns or throws appropriately without a reflection map. - webgl]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Test that getReflectionCubeMap returns or throws appropriately without a reflection map. - webgl2]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
[render_state_update.https.html]
|
|
||||||
expected: ERROR
|
|
|
@ -1,7 +1,7 @@
|
||||||
[xrWebGLLayer_constructor.https.html]
|
[xrWebGLLayer_constructor.https.html]
|
||||||
|
expected: ERROR
|
||||||
[Ensure that XRWebGLLayer's constructor throws appropriate errors using webgl2]
|
[Ensure that XRWebGLLayer's constructor throws appropriate errors using webgl2]
|
||||||
expected: FAIL
|
expected: NOTRUN
|
||||||
|
|
||||||
[Ensure that XRWebGLLayer's constructor throws appropriate errors using webgl]
|
[Ensure that XRWebGLLayer's constructor throws appropriate errors using webgl]
|
||||||
expected: FAIL
|
expected: TIMEOUT
|
||||||
|
|
||||||
|
|
33
tests/wpt/tests/webxr/resources/webxr_util.js
vendored
33
tests/wpt/tests/webxr/resources/webxr_util.js
vendored
|
@ -13,6 +13,8 @@
|
||||||
// override this.
|
// override this.
|
||||||
var xr_debug = function(name, msg) {};
|
var xr_debug = function(name, msg) {};
|
||||||
|
|
||||||
|
let loaded = new Promise(resolve => document.addEventListener('DOMContentLoaded', resolve));
|
||||||
|
|
||||||
function xr_promise_test(name, func, properties, glContextType, glContextProperties) {
|
function xr_promise_test(name, func, properties, glContextType, glContextProperties) {
|
||||||
promise_test(async (t) => {
|
promise_test(async (t) => {
|
||||||
if (glContextType === 'webgl2') {
|
if (glContextType === 'webgl2') {
|
||||||
|
@ -60,6 +62,7 @@ function xr_promise_test(name, func, properties, glContextType, glContextPropert
|
||||||
let canvas = null;
|
let canvas = null;
|
||||||
if (glContextType) {
|
if (glContextType) {
|
||||||
canvas = document.createElement('canvas');
|
canvas = document.createElement('canvas');
|
||||||
|
await loaded;
|
||||||
document.body.appendChild(canvas);
|
document.body.appendChild(canvas);
|
||||||
gl = canvas.getContext(glContextType, glContextProperties);
|
gl = canvas.getContext(glContextType, glContextProperties);
|
||||||
}
|
}
|
||||||
|
@ -161,22 +164,20 @@ function xr_session_promise_test(
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', () => {
|
xr_promise_test(
|
||||||
xr_promise_test(
|
name + ' - webgl',
|
||||||
name + ' - webgl',
|
runTest,
|
||||||
runTest,
|
properties,
|
||||||
properties,
|
'webgl',
|
||||||
'webgl',
|
{alpha: false, antialias: false, ...glcontextProperties}
|
||||||
{alpha: false, antialias: false, ...glcontextProperties}
|
);
|
||||||
);
|
xr_promise_test(
|
||||||
xr_promise_test(
|
name + ' - webgl2',
|
||||||
name + ' - webgl2',
|
runTest,
|
||||||
runTest,
|
properties,
|
||||||
properties,
|
'webgl2',
|
||||||
'webgl2',
|
{alpha: false, antialias: false, ...glcontextProperties}
|
||||||
{alpha: false, antialias: false, ...glcontextProperties}
|
);
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue