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

Various webxr WPT fixes #25259

Merged
merged 11 commits into from Dec 13, 2019
Prev

Allow spawning inline sessions without interaction

  • Loading branch information
Manishearth committed Dec 12, 2019
commit d12f8e31a3f8335b7fceda0d80cc4fd9067a508b
@@ -162,12 +162,12 @@ impl XRMethods for XR {
) -> Rc<Promise> {
let promise = Promise::new_in_current_compartment(&self.global(), comp);

if !ScriptThread::is_user_interacting() {
promise.reject_error(Error::Security);
return promise;
}

if mode != XRSessionMode::Inline {
if !ScriptThread::is_user_interacting() {
promise.reject_error(Error::Security);
return promise;
}

if self.pending_or_active_session() {
promise.reject_error(Error::InvalidState);
return promise;
"testharness"
],
"webxr/xrWebGLLayer_constructor.https.html": [
"0584da79c12def757f951ec53c4c048f18c39b8c",
"dda7ec80310f7ff8aac582a98410886ab4d1b81d",
"testharness"
],
"webxr/xrWebGLLayer_framebuffer_draw.https.html": [

This file was deleted.

@@ -1,4 +1,5 @@
[xrWebGLLayer_constructor.https.html]
expected: ERROR
[Ensure that XRWebGLLayer's constructor throws appropriate errors]
expected: FAIL
expected: TIMEOUT
@@ -31,12 +31,14 @@
navigator.xr.test.simulateUserActivation(() => {
navigator.xr.requestSession('immersive-vr')
.then((session) => {
try {
let webglLayerIncompatible = new XRWebGLLayer(session, gl);
assert_unreached("XRWebGLLayer should fail when created with a context that is not XRCompatible")
} catch (err) {
assert_equals(err.name, "InvalidStateError");
}
t.step_func(() => {
try {
let webglLayerIncompatible = new XRWebGLLayer(session, gl);
assert_unreached("XRWebGLLayer should fail when created with a context that is not XRCompatible")
} catch (err) {
assert_equals(err.name, "InvalidStateError");
}
})

gl.makeXRCompatible();

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