Commit 327a5024 authored by Alex Cooper's avatar Alex Cooper Committed by Commit Bot

Fix xrWebGLLayer_constructor test

xrWebGLLayer_constructor was mistakenly updated to require user
activation though the spec does not explicitly require it in this case
since the inline session does not request any features.  Even were it
to require this, the way that it was structured caused there to not be
a promise set when the ".then" was caused, giving a script error.

This change essentially reverts WPT Commit 16d4388, and was discussed
with Mozilla when deciding which way to fix it.

Bug: 1007304
Change-Id: I824f63cb172aed5928c55224b31c00803b5ddaa2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1822821
Commit-Queue: Jacob DeWitt <jacde@chromium.org>
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Auto-Submit: Alexander Cooper <alcooper@chromium.org>
Reviewed-by: default avatarJacob DeWitt <jacde@chromium.org>
Cr-Commit-Position: refs/heads/master@{#699467}
parent ae6f7cb2
This is a testharness.js-based test.
FAIL Ensure that XRWebGLLayer's constructor throws appropriate errors promise_test: Unhandled rejection with value: object "TypeError: Cannot read property 'then' of undefined"
Harness: the test ran to completion.
......@@ -17,11 +17,8 @@ xr_promise_test("Ensure that XRWebGLLayer's constructor throws appropriate error
let gl = webglCanvas.getContext('webgl', glAttributes);
return navigator.xr.test.simulateDeviceConnection(TRACKED_IMMERSIVE_DEVICE)
.then(() => {
let sessionPromise;
navigator.xr.test.simulateUserActivation(function() {
sessionPromise = navigator.xr.requestSession('inline');
});
return sessionPromise.then((session) => {
return navigator.xr.requestSession('inline')
.then((session) => {
try {
let webglLayerIncompatible = new XRWebGLLayer(session, gl);
} catch (err) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment