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(descriptor => { |
| 20 let bad_uuid = blocklist_test_descriptor_uuid; |
| 21 // bad_uuid is a blocklisted UUID. It should never be present |
| 22 // in a getDescriptors() result. |
| 23 assert_true(descriptor.uuid != bad_uuid) |
| 24 }); |
| 25 }) |
| 26 }, 'Making sure no blocklisted descriptors are present. '); |
| 27 |
| 28 |
| 29 </script> |
OLD | NEW |