Skip to content

Commit

Permalink
Bug 1554285 [wpt PR 17003] - End XRSession when data provider is disc…
Browse files Browse the repository at this point in the history
…onnected., a=testonly

Automatic update from web-platform-tests
End XRSession when data provider is disconnected.

There are slightly different code paths to handle the disconnect for
immersive and non-immersive sessions. There can only be one immersive
session, but there can be multiple non-immersive sessions and they all
use the same magic window provider as their data provider.

Bug: 937906
Change-Id: I71f05fa2d854c2654744e818d407e4b94a2fd95e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1628269
Reviewed-by: Bill Orr <[email protected]>
Reviewed-by: Alexander Cooper <[email protected]>
Commit-Queue: Jacob DeWitt <[email protected]>
Cr-Commit-Position: refs/heads/master@{#663821}

--

wp5At-commits: 060d986f6ced5d596805b23ca9382d0105cb2524
wpt-pr: 17003
  • Loading branch information
Jacob DeWitt authored and jgraham committed Jun 19, 2019
1 parent 8c33c48 commit 619d80c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions testing/web-platform/tests/resources/chromium/webxr-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,12 +340,15 @@ class MockRuntime {
this.environmentProviderBinding_.close();
}

closeDataProvider() {
this.dataProviderBinding_.close();
}

updateSessionGeometry(frame_size, display_rotation) {
// This function must exist to ensure that calls to it do not crash, but we
// do not have any use for this data at present.
}


// Utility function
requestRuntimeSession(sessionOptions) {
return this.runtimeSupportsSession(sessionOptions).then((result) => {
Expand All @@ -366,7 +369,7 @@ class MockRuntime {

let dataProviderPtr = new device.mojom.XRFrameDataProviderPtr();
let dataProviderRequest = mojo.makeRequest(dataProviderPtr);
let dataProviderBinding = new mojo.Binding(
this.dataProviderBinding_ = new mojo.Binding(
device.mojom.XRFrameDataProvider, this, dataProviderRequest);

let clientRequest = mojo.makeRequest(this.sessionClient_);
Expand Down

0 comments on commit 619d80c

Please sign in to comment.