Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

supportsSession() -> isSessionSupported() #25770

Merged
merged 1 commit into from Feb 15, 2020
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

supportsSession() -> isSessionSupported()

  • Loading branch information
Manishearth committed Feb 15, 2020
commit 54c8cac1cd4bec197b42b3a15304fac81d0e2c30
@@ -6,7 +6,7 @@
[SecureContext, Exposed=Window, Pref="dom.webxr.enabled"]
interface XR: EventTarget {
// Methods
Promise<void> supportsSession(XRSessionMode mode);
Promise<boolean> isSessionSupported(XRSessionMode mode);
Promise<XRSession> requestSession(XRSessionMode mode, optional XRSessionInit parameters = {});

// Events
@@ -113,8 +113,8 @@ impl Into<SessionMode> for XRSessionMode {
}

impl XRMethods for XR {
/// https://immersive-web.github.io/webxr/#dom-xr-supportssessionmode
fn SupportsSession(&self, mode: XRSessionMode) -> Rc<Promise> {
/// https://immersive-web.github.io/webxr/#dom-xr-issessionsupported
fn IsSessionSupported(&self, mode: XRSessionMode) -> Rc<Promise> {
// XXXManishearth this should select an XR device first
let promise = Promise::new(&self.global());
let mut trusted = Some(TrustedPromise::new(promise.clone()));
@@ -141,10 +141,11 @@ impl XRMethods for XR {
return;
};
if let Ok(()) = message {
let _ = task_source.queue_with_canceller(trusted.resolve_task(()), &canceller);
let _ =
task_source.queue_with_canceller(trusted.resolve_task(true), &canceller);
} else {
let _ = task_source
.queue_with_canceller(trusted.reject_task(Error::NotSupported), &canceller);
let _ =
task_source.queue_with_canceller(trusted.resolve_task(false), &canceller);
};
}),
);
@@ -1,7 +1,4 @@
[xrDevice_isSessionSupported_immersive-ar.https.html]
[isSessionSupported resolves to true for immersive-ar on a supported device]
expected: FAIL

[isSessionSupported resolves to false for immersive-ar on an unsupported device]
expected: FAIL

@@ -116,18 +116,15 @@
[XRSession interface: operation end()]
expected: FAIL

[XR interface: operation isSessionSupported(XRSessionMode)]
expected: FAIL

[XR interface: calling isSessionSupported(XRSessionMode) on navigator.xr with too few arguments must throw TypeError]
expected: FAIL

[XR interface: navigator.xr must inherit property "isSessionSupported(XRSessionMode)" with the proper type]
expected: FAIL

[WebGLRenderingContext includes WebGLRenderingContextOverloads: member names are unique]
expected: FAIL

[WebGLRenderingContext includes WebGLRenderingContextBase: member names are unique]
expected: FAIL

[XR interface: operation isSessionSupported(XRSessionMode)]
expected: FAIL

This file was deleted.

This file was deleted.

This file was deleted.

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.