| OLD | NEW |
| (Empty) |
| 1 'use strict'; | |
| 2 promise_test(t => { | |
| 3 return setBluetoothFakeAdapter('DisconnectingHeartRateAdapter') | |
| 4 .then(() => requestDeviceWithKeyDown({ | |
| 5 filters: [{services: ['heart_rate']}], | |
| 6 optionalServices: [request_disconnection_service_uuid] | |
| 7 })) | |
| 8 .then(device => { | |
| 9 return device.gatt.connect() | |
| 10 .then(gattServer => get_request_disconnection(gattServer)) | |
| 11 .then(requestDisconnection => requestDisconnection()) | |
| 12 .then(() => assert_promise_rejects_with_message( | |
| 13 device.gatt.CALLS([ | |
| 14 getPrimaryService('heart_rate')| | |
| 15 getPrimaryServices()| | |
| 16 getPrimaryServices('heart_rate')[UUID]]), | |
| 17 new DOMException( | |
| 18 'GATT Server is disconnected. Cannot retrieve services.', | |
| 19 'NetworkError'))); | |
| 20 }); | |
| 21 }, 'Device disconnects before FUNCTION_NAME. Reject with NetworkError.'); | |
| OLD | NEW |