| OLD | NEW |
| 1 'use strict'; | 1 'use strict'; |
| 2 promise_test(() => { | 2 promise_test(() => { |
| 3 let promise; | 3 let promise; |
| 4 return setBluetoothFakeAdapter('DisconnectingHealthThermometerAdapter') | 4 return setBluetoothFakeAdapter('DisconnectingHealthThermometerAdapter') |
| 5 .then(() => requestDeviceWithKeyDown({ | 5 .then( |
| 6 filters: [{services: ['health_thermometer']}]})) | 6 () => requestDeviceWithKeyDown( |
| 7 .then(device => device.gatt.connect()) | 7 {filters: [{services: ['health_thermometer']}]})) |
| 8 .then(gattServer => { | 8 .then(device => device.gatt.connect()) |
| 9 promise = assert_promise_rejects_with_message( | 9 .then(gattServer => { |
| 10 gattServer.CALLS([ | 10 promise = assert_promise_rejects_with_message( |
| 11 getPrimaryService('health_thermometer')| | 11 gattServer.CALLS( |
| 12 getPrimaryServices()| | 12 [getPrimaryService('health_thermometer') | |
| 13 getPrimaryServices('health_thermometer')[UUID]]), | 13 getPrimaryServices() | |
| 14 new DOMException( | 14 getPrimaryServices('health_thermometer')[UUID]]), |
| 15 'GATT Server disconnected while retrieving services.', | 15 new DOMException( |
| 16 'NetworkError')); | 16 'GATT Server is disconnected. ' + |
| 17 gattServer.disconnect(); | 17 'Cannot retrieve services. ' + |
| 18 }) | 18 '(Re)connect first with `device.gatt.connect`.', |
| 19 .then(runGarbageCollection) | 19 'NetworkError')); |
| 20 .then(() => promise); | 20 gattServer.disconnect(); |
| 21 }) |
| 22 .then(runGarbageCollection) |
| 23 .then(() => promise); |
| 21 }, 'Garbage Collection ran during a FUNCTION_NAME call that succeeds. ' + | 24 }, 'Garbage Collection ran during a FUNCTION_NAME call that succeeds. ' + |
| 22 'Should not crash.'); | 25 'Should not crash.'); |
| OLD | NEW |