mirror of
https://github.com/servo/servo.git
synced 2025-08-29 00:58:20 +01:00
Update web-platform-tests to revision ddfc95cf0493ae147a4f6a4d7be8eff1a0c23098
This commit is contained in:
parent
1f6a864ab5
commit
7e6290451f
832 changed files with 16026 additions and 2649 deletions
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE html>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/resources/testdriver.js"></script>
|
||||
<script src="/resources/testdriver-vendor.js"></script>
|
||||
<script src="/bluetooth/resources/bluetooth-helpers.js"></script>
|
||||
<script>
|
||||
'use strict';
|
||||
const test_desc = 'Succesful read should update characteristic.value';
|
||||
const EXPECTED_VALUE = [0, 1, 2];
|
||||
let characteristic, fake_characteristic;
|
||||
|
||||
bluetooth_test(() => getMeasurementIntervalCharacteristic()
|
||||
.then(_ => ({characteristic, fake_characteristic} = _))
|
||||
.then(() => assert_equals(characteristic.value, null))
|
||||
.then(() => fake_characteristic.setNextReadResponse(
|
||||
GATT_SUCCESS, EXPECTED_VALUE))
|
||||
.then(() => characteristic.readValue())
|
||||
.then(() => assert_array_equals(
|
||||
new Uint8Array(characteristic.value.buffer),
|
||||
EXPECTED_VALUE)),
|
||||
test_desc);
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue