blob: d00b6ea0d5a75253a183217f7e50c176c61d7c38 [file] [log] [blame]
<!DOCTYPE html>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<script src="../../../resources/bluetooth/bluetooth-helpers.js"></script>
<script>
'use strict';
bluetooth_test(() => {
return getTwoHealthThermometerServicesDevice({
filters: [{services: ['health_thermometer']}]})
.then(({device}) => Promise.all([
device.gatt.getPrimaryServices(health_thermometer.alias),
device.gatt.getPrimaryServices(health_thermometer.name),
device.gatt.getPrimaryServices(health_thermometer.uuid)]))
.then(services_arrays => {
services_arrays.forEach(services => {
assert_equals(services.length, 2);
services.forEach(service => {
assert_equals(service.uuid,
BluetoothUUID.getService('health_thermometer'));
assert_true(service.isPrimary);
});
});
});
}, 'Request for services. Should return right number of services.');
</script>