mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +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(())
|
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
|
/// https://immersive-web.github.io/webxr-test-api/#dom-fakexrdevice-simulatevisibilitychange
|
||||||
fn SimulateVisibilityChange(&self, v: XRVisibilityState) {
|
fn SimulateVisibilityChange(&self, v: XRVisibilityState) {
|
||||||
let v = match v {
|
let v = match v {
|
||||||
|
|
|
@ -27,8 +27,8 @@ interface FakeXRDevice {
|
||||||
Promise<void> disconnect();
|
Promise<void> disconnect();
|
||||||
|
|
||||||
// Hit test extensions:
|
// Hit test extensions:
|
||||||
// void setWorld(FakeXRWorldInit world);
|
[Throws] void setWorld(FakeXRWorldInit world);
|
||||||
// void clearWorld();
|
void clearWorld();
|
||||||
};
|
};
|
||||||
|
|
||||||
// https://immersive-web.github.io/webxr/#dom-xrwebgllayer-getviewport
|
// https://immersive-web.github.io/webxr/#dom-xrwebgllayer-getviewport
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue