blob: 63ac04eaaeebbca9df3f5dac2b3f883af220db90 [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 src="../../../resources/bluetooth/web-bluetooth-test.js"></script>
<script src="../../../resources/mojo-helpers.js"></script>
<script>
'use strict';
promise_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>