mirror of
https://github.com/servo/servo.git
synced 2025-08-25 23:28:21 +01:00
Update web-platform-tests to revision 4a5223502fa660ce03e470af6a61c8bc26c5a8ee
This commit is contained in:
parent
c5f7c9ccf3
commit
e891345f26
1328 changed files with 36632 additions and 20588 deletions
|
@ -14,7 +14,7 @@ const expected = new DOMException(
|
|||
'requestDevice() options. https://goo.gl/HxfxSQ',
|
||||
'SecurityError');
|
||||
|
||||
bluetooth_test(() => getHealthThermometerDevice({acceptAllDevices: true})
|
||||
bluetooth_test(() => getConnectedHealthThermometerDevice({acceptAllDevices: true})
|
||||
.then(({device}) => assert_promise_rejects_with_message(
|
||||
device.gatt.getPrimaryServices(),
|
||||
expected)),
|
||||
|
|
|
@ -22,8 +22,6 @@ bluetooth_test(() => getDiscoveredHealthThermometerDevice({
|
|||
.then(() =>
|
||||
fake_peripheral.setNextGATTConnectionResponse({code: HCI_SUCCESS}))
|
||||
.then(() => device.gatt.connect())
|
||||
.then(() =>
|
||||
fake_peripheral.setNextGATTDiscoveryResponse({code: HCI_SUCCESS}))
|
||||
.then(() => Promise.all([
|
||||
assert_promise_rejects_with_message(
|
||||
device.gatt.getPrimaryService('human_interface_device'),
|
||||
|
|
|
@ -13,7 +13,7 @@ const cross_origin_src = 'https://{{domains[www]}}:{{ports[https][0]}}' +
|
|||
'/bluetooth/resources/health-thermometer-iframe.html'
|
||||
let iframe = document.createElement('iframe');
|
||||
|
||||
bluetooth_test(() => setUpConnectableHealthThermometerDevice()
|
||||
bluetooth_test(() => setUpHealthThermometerDevice()
|
||||
// 1. Load the iframe.
|
||||
.then(() => new Promise(resolve => {
|
||||
iframe.src = cross_origin_src;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
'use strict';
|
||||
const test_desc = 'Discover a device using alias, name, or UUID.';
|
||||
|
||||
bluetooth_test(() => getHealthThermometerDevice()
|
||||
bluetooth_test(() => getConnectedHealthThermometerDevice()
|
||||
// Chrome will always close the previous chooser in the process of handling
|
||||
// a user gesture for the next request, so these need to be done
|
||||
// sequentially.
|
||||
|
|
|
@ -6,10 +6,7 @@
|
|||
<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
|
||||
<script>
|
||||
'use strict';
|
||||
const test_desc = 'Consumes a user gesture.';
|
||||
const expected = new DOMException(
|
||||
'Must be handling a user gesture to show a permission request.',
|
||||
'SecurityError');
|
||||
const test_desc = 'requestDevice calls do not consume user gestures.';
|
||||
|
||||
bluetooth_test(() => setUpHealthThermometerAndHeartRateDevices()
|
||||
.then(() => callWithTrustedClick(() => {
|
||||
|
@ -20,8 +17,8 @@ bluetooth_test(() => setUpHealthThermometerAndHeartRateDevices()
|
|||
return Promise.all([
|
||||
first.then(device => assert_equals(
|
||||
device.constructor.name, 'BluetoothDevice')),
|
||||
assert_promise_rejects_with_message(second,
|
||||
expected, 'A request should consume a user gesture')
|
||||
second.then(device => assert_equals(
|
||||
device.constructor.name, 'BluetoothDevice')),
|
||||
]);
|
||||
})), test_desc);
|
||||
</script>
|
|
@ -14,7 +14,7 @@ const expected = 'SecurityError: requestDevice() called from cross-origin ' +
|
|||
|
||||
let iframe = document.createElement('iframe');
|
||||
|
||||
bluetooth_test(() => getHealthThermometerDevice()
|
||||
bluetooth_test(() => getConnectedHealthThermometerDevice()
|
||||
// 1. Load the iframe.
|
||||
.then(() => new Promise(resolve => {
|
||||
iframe.sandbox.add('allow-scripts');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue