OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <script src="../../../resources/testharness.js"></script> | |
3 <script src="../../../resources/testharnessreport.js"></script> | |
4 <script src="../../../resources/bluetooth/bluetooth-helpers.js"></script> | |
5 <script> | |
6 'use strict'; | |
7 promise_test(() => { | |
8 // DisconnectingHealthThermometerAdapter's measurement_interval contains | |
9 // one blocklisted descriptor. Make sure that it isn't returned in the result | |
10 // of getDescriptors(). | |
11 return setBluetoothFakeAdapter('DisconnectingHealthThermometerAdapter') | |
12 .then(() => requestDeviceWithKeyDown({ | |
13 filters: [{services: ['health_thermometer']}]})) | |
14 .then(device => device.gatt.connect()) | |
15 .then(gattServer => gattServer.getPrimaryService('health_thermometer')) | |
16 .then(service => service.getCharacteristic('measurement_interval')) | |
17 .then(characteristic => characteristic.getDescriptors()) | |
18 .then(descriptors => { | |
19 descriptors.forEach( | |
20 descriptor => { | |
ortuno
2016/12/08 05:42:51
nit: Move to previous line.
dougt
2016/12/08 08:35:58
Done.
| |
21 let bad_uuid = 'bad2ddcf-60db-45cd-bef9-fd72b153cf7c'; | |
ortuno
2016/12/08 05:42:51
nit: Move this to resources. https://cs.chromium.o
dougt
2016/12/08 08:35:58
Done.
| |
22 // bad_uuid is a blocklisted UUID. It should never be present | |
23 // in a getDescriptors() result. | |
24 assert_true(descriptor.uuid != bad_uuid) | |
25 }); | |
26 }) | |
27 }, 'Making sure no blocklisted descriptors are present. '); | |
28 | |
29 | |
30 </script> | |
OLD | NEW |