mirror of
https://github.com/servo/servo.git
synced 2025-10-01 09:09:15 +01:00
Auto merge of #15314 - szeged:permissions-api, r=jdm
Permissions API and WebBluetooth integration <!-- Please describe your changes on the following line: --> This implements the [Permissions API](https://w3c.github.io/permissions/) spec. Also includes the WebBluetooth related implementation for this. There are some know issues: - [ ] If the descriptor name is invalid [this](https://gist.github.com/dati91/7a6a0a563d90f49ba5a351e48c5b626b#file-permissionstatusbindings-rs-L323) will throw an error, rather that return it and we could handle it. - [x] The [environment settings object](https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object) is not implemented in servo and the spec rely on it. - [x] There is a popup in the implementation which prevent us to add wpt test, we should figure out a way to make it work - [ ] The allowedDevice's allowed_services attribute is not used in our implementation, because we store these in the lower level, not in the dom side. - [ ] We think the bluetooth revoke function will need some more work, but the problem is the spec needs clarifications on that part. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15314) <!-- Reviewable:end -->
This commit is contained in:
commit
a537cf48b1
30 changed files with 1041 additions and 61 deletions
|
@ -24367,7 +24367,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"mozilla/bluetooth/connect/device-goes-out-of-range.html": [
|
||||
"9e5dc423f92c3f73273d221e7fb7b8d905716db3",
|
||||
"3ade30929f621b7c8c93b87e5392309729d68e42",
|
||||
"testharness"
|
||||
],
|
||||
"mozilla/bluetooth/connect/get-same-gatt-server.html": [
|
||||
|
|
|
@ -1 +1 @@
|
|||
prefs: [dom.bluetooth.enabled:true, dom.bluetooth.testing.enabled:true]
|
||||
prefs: [dom.bluetooth.enabled:true, dom.bluetooth.testing.enabled:true, dom.permissions.testing.allowed_in_nonsecure_contexts:true]
|
||||
|
|
|
@ -51,18 +51,9 @@
|
|||
[BluetoothPermissionResult interface: existence and properties of interface object]
|
||||
expected: FAIL
|
||||
|
||||
[BluetoothPermissionResult interface object length]
|
||||
expected: FAIL
|
||||
|
||||
[BluetoothPermissionResult interface object name]
|
||||
expected: FAIL
|
||||
|
||||
[BluetoothPermissionResult interface: existence and properties of interface prototype object]
|
||||
expected: FAIL
|
||||
|
||||
[BluetoothPermissionResult interface: existence and properties of interface prototype object's "constructor" property]
|
||||
expected: FAIL
|
||||
|
||||
[BluetoothPermissionResult interface: attribute devices]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -10,8 +10,9 @@ promise_test(t => {
|
|||
filters: [{services: [heart_rate.name]}]
|
||||
})
|
||||
.then(device => {
|
||||
var gatt_server = device.gatt;
|
||||
window.testRunner.setBluetoothMockDataSet(adapter_type.empty);
|
||||
return promise_rejects(t, 'NetworkError', device.gatt.connect());
|
||||
return promise_rejects(t, 'NetworkError', gatt_server.connect());
|
||||
});
|
||||
}, 'Device goes out of range. Reject with NetworkError.');
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue