OLD | NEW |
(Empty) | |
| 1 'use strict'; |
| 2 promise_test(() => { |
| 3 let val = new Uint8Array([1]); |
| 4 return setBluetoothFakeAdapter('HeartRateAdapter') |
| 5 .then(() => requestDeviceWithKeyDown({ |
| 6 filters: [{services: ['heart_rate']}], |
| 7 optionalServices: ['generic_access']})) |
| 8 .then(device => device.gatt.connect()) |
| 9 .then(gattServer => gattServer.getPrimaryService('generic_access')) |
| 10 .then(service => service.getCharacteristic('gap.device_name')) |
| 11 .then(characteristic => { |
| 12 return setBluetoothFakeAdapter('MissingCharacteristicHeartRateAdapter') |
| 13 .then(() => assert_promise_rejects_with_message( |
| 14 characteristic.CALLS([ |
| 15 getDescriptor(user_description.name)| |
| 16 getDescriptors(user_description.name)[UUID]| |
| 17 getDescriptors()| |
| 18 readValue()| |
| 19 writeValue(val)| |
| 20 startNotifications()]), |
| 21 new DOMException( |
| 22 'GATT Characteristic no longer exists.', |
| 23 'InvalidStateError'), |
| 24 'Characteristic got removed.')); |
| 25 }); |
| 26 }, 'Characteristic gets removed. Reject with InvalidStateError.'); |
| 27 |
OLD | NEW |