Closed Bug 1593328 Opened 5 years ago Closed 5 years ago

[wpt-sync] Sync PR 20051 - WebXR: refactor session shutdown handling

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox72 fixed)

RESOLVED FIXED
mozilla72
Tracking Status
firefox72 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 20051 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/20051
Details from upstream follow.

Klaus Weidner <klausw@chromium.org> wrote:

WebXR: refactor session shutdown handling

While investigating a flaky test, one of the issues found was that a session
'end' event is triggered directly after issuing the session.end() call, without
waiting for device-side session teardown to proceed. As a result, requesting a
new session could fail due to the device side thinking there's already an
active immersive session.

According to https://immersive-web.github.io/webxr/#ended and discussions with
Brandon, expected behavior is that the 'end' event and end().then promise
resolution should be delayed if needed to ensure that a new session can
be started at that time.

This CL adds a "ended but not yet shut down" state to XRSession, and adds
a new ShutdownSession call to isolated_xr_service's XRRuntime, to enable
the expected delay. In case of mojo communication errors, the shutdown
happens immediately.

Also update WebXrTestFramework's enterSessionWithUserGesture to detect
and retry clicks that aren't delivered after session end transitions, and
remove sleeps that were previously added to work around flakiness in WebXR
VR consent tests.

Change-Id: I6d48b259677c92bac323db0e10803a48718d4a33
Bug: 1014159, 998307

Reviewed-on: https://chromium-review.googlesource.com/1874824
WPT-Export-Revision: df8488c846b9ddeb818162a6ce7c6ea4b71f1c45

Test result changes from PR not available.
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/cc6c9ac18eb3 [wpt PR 20051] - WebXR: refactor session shutdown handling, a=testonly
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
You need to log in before you can comment on or make changes to this bug.