mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
Add hit test mocking after initialization
This commit is contained in:
parent
d01d9065aa
commit
ef6ee5e2a1
2 changed files with 13 additions and 2 deletions
|
@ -219,6 +219,17 @@ impl FakeXRDeviceMethods for FakeXRDevice {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
/// https://immersive-web.github.io/webxr-test-api/#dom-fakexrdevice-clearworld
|
||||
fn ClearWorld(&self) {
|
||||
let _ = self.sender.send(MockDeviceMsg::ClearWorld);
|
||||
}
|
||||
|
||||
/// https://immersive-web.github.io/webxr-test-api/#dom-fakexrdevice-setworld
|
||||
fn SetWorld(&self, world: &FakeXRWorldInit) -> Fallible<()> {
|
||||
let _ = self.sender.send(MockDeviceMsg::SetWorld(get_world(world)?));
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// https://immersive-web.github.io/webxr-test-api/#dom-fakexrdevice-simulatevisibilitychange
|
||||
fn SimulateVisibilityChange(&self, v: XRVisibilityState) {
|
||||
let v = match v {
|
||||
|
|
|
@ -27,8 +27,8 @@ interface FakeXRDevice {
|
|||
Promise<void> disconnect();
|
||||
|
||||
// Hit test extensions:
|
||||
// void setWorld(FakeXRWorldInit world);
|
||||
// void clearWorld();
|
||||
[Throws] void setWorld(FakeXRWorldInit world);
|
||||
void clearWorld();
|
||||
};
|
||||
|
||||
// https://immersive-web.github.io/webxr/#dom-xrwebgllayer-getviewport
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue