Skip to content

Commit

Permalink
Bug 1581210 [wpt PR 19051] - Do not allow XR session on non user-acti…
Browse files Browse the repository at this point in the history
…vated events, a=testonly

Automatic update from web-platform-tests
Do not allow XR session on non user-activated events

--

wpt-commits: 16d4388ac859c189b42f765ca18013ee1bf50737
wpt-pr: 19051
  • Loading branch information
paulrouget authored and moz-wptsync-bot committed Sep 24, 2019
1 parent 6a58bd3 commit 4219ef5
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@
let gl = webglCanvas.getContext('webgl', glAttributes);
return navigator.xr.test.simulateDeviceConnection(TRACKED_IMMERSIVE_DEVICE)
.then(() => {
return navigator.xr.requestSession('inline')
.then((session) => {
let sessionPromise;
navigator.xr.test.simulateUserActivation(function() {
sessionPromise = navigator.xr.requestSession('inline');
});
return sessionPromise.then((session) => {
try {
let webglLayerIncompatible = new XRWebGLLayer(session, gl);
} catch (err) {
Expand Down

0 comments on commit 4219ef5

Please sign in to comment.