| 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(() => requestDeviceWithKeyDown({ |
| 6 filters: [{services: ['health_thermometer']}]})) | 6 filters: [{services: ['health_thermometer']}]})) |
| 7 .then(device => device.gatt.connect()) | 7 .then(device => device.gatt.connect()) |
| 8 .then(gattServer => { | 8 .then(gattServer => { |
| 9 promise = assert_promise_rejects_with_message( | 9 promise = assert_promise_rejects_with_message( |
| 10 gattServer.CALLS([ | 10 gattServer.CALLS([ |
| 11 getPrimaryService('health_thermometer')| | 11 getPrimaryService('health_thermometer')| |
| 12 getPrimaryServices()| | 12 getPrimaryServices()| |
| 13 getPrimaryServices('health_thermometer')[UUID]]), | 13 getPrimaryServices('health_thermometer')[UUID]]), |
| 14 new DOMException( | 14 new DOMException( |
| 15 'GATT Server disconnected while retrieving services.', | 15 'GATT Server disconnected while retrieving services.', |
| 16 'NetworkError')); | 16 'NetworkError')); |
| 17 gattServer.disconnect(); | 17 gattServer.disconnect(); |
| 18 }) | 18 }) |
| 19 .then(runGarbageCollection) | 19 .then(runGarbageCollection) |
| 20 .then(() => promise); | 20 .then(() => promise); |
| 21 }, 'Garbage Collection ran during a FUNCTION_NAME call that succeeds. ' + | 21 }, 'Garbage Collection ran during a FUNCTION_NAME call that succeeds. ' + |
| 22 'Should not crash.'); | 22 'Should not crash.'); |
| OLD | NEW |