mirror of
https://github.com/servo/servo.git
synced 2025-08-11 16:35:33 +01:00
Update web-platform-tests to revision e87f38097902e16348d4e17f4fe3bc2d0112bff1
This commit is contained in:
parent
2f8fa32e91
commit
db5631a086
381 changed files with 11610 additions and 4232 deletions
|
@ -65,7 +65,7 @@ class FakeBluetooth {
|
|||
constructor() {
|
||||
this.fake_bluetooth_ptr_ = new bluetooth.mojom.FakeBluetoothPtr();
|
||||
Mojo.bindInterface(bluetooth.mojom.FakeBluetooth.name,
|
||||
mojo.makeRequest(this.fake_bluetooth_ptr_).handle, "process");
|
||||
mojo.makeRequest(this.fake_bluetooth_ptr_).handle, 'process');
|
||||
}
|
||||
|
||||
// Set it to indicate whether the platform supports BLE. For example,
|
||||
|
@ -102,6 +102,15 @@ class FakeBluetooth {
|
|||
let {consumed} = await this.fake_bluetooth_ptr_.allResponsesConsumed();
|
||||
return consumed;
|
||||
}
|
||||
|
||||
// Returns a promise that resolves with a FakeChooser that clients can use to
|
||||
// simulate chooser events.
|
||||
async getManualChooser() {
|
||||
if (typeof this.fake_chooser_ === 'undefined') {
|
||||
this.fake_chooser_ = new FakeChooser();
|
||||
}
|
||||
return this.fake_chooser_;
|
||||
}
|
||||
}
|
||||
|
||||
// FakeCentral allows clients to simulate events that a device in the
|
||||
|
@ -437,6 +446,17 @@ class FakeRemoteGATTDescriptor {
|
|||
}
|
||||
}
|
||||
|
||||
// FakeChooser allows clients to simulate events that a user would trigger when
|
||||
// using the Bluetooth chooser, and monitor the events that are produced.
|
||||
class FakeChooser {
|
||||
constructor() {
|
||||
this.fake_bluetooth_chooser_ptr_ =
|
||||
new content.mojom.FakeBluetoothChooserPtr();
|
||||
Mojo.bindInterface(content.mojom.FakeBluetoothChooser.name,
|
||||
mojo.makeRequest(this.fake_bluetooth_chooser_ptr_).handle, 'process');
|
||||
}
|
||||
}
|
||||
|
||||
// If this line fails, it means that current environment does not support the
|
||||
// Web Bluetooth Test API.
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue