servo/tests/wpt/web-platform-tests/bluetooth/characteristic/characteristicProperties.https.html

29 lines
1.2 KiB
HTML

<!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 = 'HeartRate device properties';
bluetooth_test(
() => getHealthThermometerService()
.then(({service}) => Promise.all([
service.getCharacteristic('temperature_measurement'),
service.getCharacteristic('measurement_interval')
]))
.then(([temperature_measurement, measurement_interval]) => {
let tm_expected_properties =
new TestCharacteristicProperties(['indicate']);
assert_properties_equal(
temperature_measurement.properties, tm_expected_properties);
let mi_expected_properties = new TestCharacteristicProperties(
['read', 'write', 'indicate']);
assert_properties_equal(
measurement_interval.properties, mi_expected_properties);
}),
test_desc);
</script>