Bug 1852740: add tests for the `fetchpriority` attribute in Link headers. r=necko...
[gecko.git] / dom / webidl / VRServiceTest.webidl
blobfec95dba073d0412022005869536e01eabd23c05
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3  * You can obtain one at http://mozilla.org/MPL/2.0/.
4  *
5  * This WebIDL is just for WebVR testing.
6  */
8 [Pref="dom.vr.puppet.enabled",
9  HeaderFile="mozilla/dom/VRServiceTest.h",
10  Exposed=Window]
11 interface VRMockDisplay {
12   undefined create();
13   attribute boolean capPosition;
14   attribute boolean capOrientation;
15   attribute boolean capPresent;
16   attribute boolean capExternal;
17   attribute boolean capAngularAcceleration;
18   attribute boolean capLinearAcceleration;
19   attribute boolean capStageParameters;
20   attribute boolean capMountDetection;
21   attribute boolean capPositionEmulated;
22   undefined setEyeFOV(VREye eye,
23                       double upDegree, double rightDegree,
24                       double downDegree, double leftDegree);
25   undefined setEyeOffset(VREye eye, double offsetX,
26                          double offsetY, double offsetZ);
27   undefined setEyeResolution(unsigned long renderWidth,
28                              unsigned long renderHeight);
29   undefined setConnected(boolean connected);
30   undefined setMounted(boolean mounted);
31   undefined setStageSize(double width, double height);
32   [Throws] undefined setSittingToStandingTransform(Float32Array sittingToStandingTransform);
33   [Throws] undefined setPose(Float32Array? position, Float32Array? linearVelocity,
34                              Float32Array? linearAcceleration, Float32Array? orientation,
35                              Float32Array? angularVelocity, Float32Array? angularAcceleration);
38 [Pref="dom.vr.puppet.enabled",
39  HeaderFile="mozilla/dom/VRServiceTest.h",
40  Exposed=Window]
41 interface VRMockController {
42   undefined create();
43   undefined clear();
44   attribute GamepadHand hand;
45   attribute boolean capPosition;
46   attribute boolean capOrientation;
47   attribute boolean capAngularAcceleration;
48   attribute boolean capLinearAcceleration;
49   attribute unsigned long axisCount;
50   attribute unsigned long buttonCount;
51   attribute unsigned long hapticCount;
52   [Throws] undefined setPose(Float32Array? position, Float32Array? linearVelocity,
53                              Float32Array? linearAcceleration, Float32Array? orientation,
54                              Float32Array? angularVelocity, Float32Array? angularAcceleration);
55   undefined setButtonPressed(unsigned long buttonIdx, boolean pressed);
56   undefined setButtonTouched(unsigned long buttonIdx, boolean touched);
57   undefined setButtonTrigger(unsigned long buttonIdx, double trigger);
58   undefined setAxisValue(unsigned long axisIdx, double value);
61 [Pref="dom.vr.puppet.enabled",
62  HeaderFile="mozilla/dom/VRServiceTest.h",
63  Exposed=Window]
64 interface VRServiceTest {
65   VRMockDisplay getVRDisplay();
66   [Throws] VRMockController getVRController(unsigned long controllerIdx);
67   [NewObject] Promise<undefined> run();
68   [NewObject] Promise<undefined> reset();
69   undefined commit();
70   undefined end();
71   undefined clearAll();
72   undefined timeout(unsigned long duration);
73   undefined wait(unsigned long duration);
74   undefined waitSubmit();
75   undefined waitPresentationStart();
76   undefined waitPresentationEnd();
77   [Throws]
78   undefined waitHapticIntensity(unsigned long controllerIdx, unsigned long hapticIdx, double intensity);
79   undefined captureFrame();
80   undefined acknowledgeFrame();
81   undefined rejectFrame();
82   undefined startTimer();
83   undefined stopTimer();