blob: 3af9743ae96ab86f86f76a297b3c1995ca16c4f0 [file] [log] [blame]
'use strict';
bluetooth_test(() => {
return setBluetoothFakeAdapter('DelayedServicesDiscoveryAdapter')
.then(() => requestDeviceWithTrustedClick({
filters: [{services: ['heart_rate']}]}))
.then(device => device.gatt.connect())
.then(gatt => gatt.CALLS([
getPrimaryService('heart_rate')|
getPrimaryServices()|
getPrimaryServices('heart_rate')[UUID]]))
.then(services => {
services = [].concat(services);
for (let service of services)
assert_equals(service.uuid, heart_rate.uuid);
});
}, 'Request for service. Must return even when the services are not ' +
'immediately discovered');