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

Enable XR WPT tests #23786

Merged
merged 7 commits into from Jul 17, 2019
Merged
Next

Add simulateUserActivation

  • Loading branch information
Manishearth committed Jul 17, 2019
commit 73f1bdac06407f36db4511430df0b45f165eea91
@@ -13,7 +13,7 @@ interface XRTest {
// // Simulates a user activation (aka user gesture) for the current scope.
// // The activation is only guaranteed to be valid in the provided function and only applies to WebXR
// // Device API methods.
// void simulateUserActivation(Function);
void simulateUserActivation(Function f);

// // Disconnect all fake devices
// Promise<void> disconnectAllDevices();
@@ -6,6 +6,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */

use crate::dom::bindings::callback::ExceptionHandling;
use crate::dom::bindings::codegen::Bindings::FunctionBinding::Function;
use crate::dom::bindings::codegen::Bindings::XRTestBinding::{
self, FakeXRDeviceInit, XRTestMethods,
};
@@ -162,4 +164,10 @@ impl XRTestMethods for XRTest {

p
}

/// https://github.com/immersive-web/webxr-test-api/blob/master/explainer.md
fn SimulateUserActivation(&self, f: Rc<Function>) {
// XXXManishearth actually check for activation in XRSession
let _ = f.Call__(vec![], ExceptionHandling::Rethrow);
}
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.