mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Update web-platform-tests to revision cfada7e6cb379699fa94c7ed8fcb97082327e10c
This commit is contained in:
parent
87e7e3d429
commit
06b00da16b
179 changed files with 6103 additions and 1186 deletions
|
@ -78,7 +78,7 @@ class ChromeXRTest {
|
|||
|
||||
// Mocking class definitions
|
||||
|
||||
// Mock service implements both the VRService and XRDevice mojo interfaces.
|
||||
// Mock service implements the VRService mojo interface.
|
||||
class MockVRService {
|
||||
constructor() {
|
||||
this.bindingSet_ = new mojo.BindingSet(device.mojom.VRService);
|
||||
|
@ -122,24 +122,14 @@ class MockVRService {
|
|||
}
|
||||
}
|
||||
|
||||
// VRService implementation.
|
||||
requestDevice() {
|
||||
if (this.runtimes_.length > 0) {
|
||||
let devicePtr = new device.mojom.XRDevicePtr();
|
||||
new mojo.Binding(
|
||||
device.mojom.XRDevice, this, mojo.makeRequest(devicePtr));
|
||||
|
||||
return Promise.resolve({device: devicePtr});
|
||||
} else {
|
||||
return Promise.resolve({device: null});
|
||||
}
|
||||
}
|
||||
|
||||
setClient(client) {
|
||||
if (this.client_) {
|
||||
throw new Error("setClient should only be called once");
|
||||
}
|
||||
|
||||
this.client_ = client;
|
||||
}
|
||||
|
||||
// XRDevice implementation.
|
||||
requestSession(sessionOptions, was_activation) {
|
||||
let requests = [];
|
||||
// Request a session from all the runtimes.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue