Skip to content

Commit cd9f0ff

Browse files
committed
Bug 1554285 [wpt PR 17003] - End XRSession when data provider is disconnected., 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 <billorrchromium.org> Reviewed-by: Alexander Cooper <alcooperchromium.org> Commit-Queue: Jacob DeWitt <jacdechromium.org> Cr-Commit-Position: refs/heads/master{#663821} -- wp5At-commits: 060d986f6ced5d596805b23ca9382d0105cb2524 wpt-pr: 17003 UltraBlame original commit: 9c482b1370ed9a9a38c23fe4ab7b7dfb2267062e
1 parent 307dedf commit cd9f0ff

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

testing/web-platform/tests/resources/chromium/webxr-test.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -340,12 +340,15 @@ class MockRuntime {
340340
this.environmentProviderBinding_.close();
341341
}
342342

343+
closeDataProvider() {
344+
this.dataProviderBinding_.close();
345+
}
346+
343347
updateSessionGeometry(frame_size, display_rotation) {
344348

345349

346350
}
347351

348-
349352

350353
requestRuntimeSession(sessionOptions) {
351354
return this.runtimeSupportsSession(sessionOptions).then((result) => {
@@ -366,7 +369,7 @@ class MockRuntime {
366369

367370
let dataProviderPtr = new device.mojom.XRFrameDataProviderPtr();
368371
let dataProviderRequest = mojo.makeRequest(dataProviderPtr);
369-
let dataProviderBinding = new mojo.Binding(
372+
this.dataProviderBinding_ = new mojo.Binding(
370373
device.mojom.XRFrameDataProvider, this, dataProviderRequest);
371374

372375
let clientRequest = mojo.makeRequest(this.sessionClient_);

0 commit comments

Comments
 (0)