Index: third_party/WebKit/LayoutTests/bluetooth/script-tests/characteristic/descriptor-garbage-collection-ran-during-success.js |
diff --git a/third_party/WebKit/LayoutTests/bluetooth/script-tests/characteristic/descriptor-garbage-collection-ran-during-success.js b/third_party/WebKit/LayoutTests/bluetooth/script-tests/characteristic/descriptor-garbage-collection-ran-during-success.js |
index f72df0abf983cba2f8969042e30bcfaad27eeff3..f81df1a25b8dc1a06b95064b078593482bc21f76 100644 |
--- a/third_party/WebKit/LayoutTests/bluetooth/script-tests/characteristic/descriptor-garbage-collection-ran-during-success.js |
+++ b/third_party/WebKit/LayoutTests/bluetooth/script-tests/characteristic/descriptor-garbage-collection-ran-during-success.js |
@@ -2,26 +2,26 @@ |
promise_test(() => { |
let promise; |
return setBluetoothFakeAdapter('DisconnectingHealthThermometerAdapter') |
- .then(() => requestDeviceWithKeyDown({ |
- filters: [{services: ['health_thermometer']}]})) |
- .then(device => device.gatt.connect()) |
- .then(gattServer => gattServer.getPrimaryService('health_thermometer')) |
- .then(service => service.getCharacteristic('measurement_interval')) |
- .then(characteristic => { |
- promise = assert_promise_rejects_with_message( |
- characteristic.CALLS([ |
- getDescriptor(user_description.name)| |
- getDescriptors()| |
- getDescriptors(user_description.name)[UUID]]), |
- new DOMException( |
- 'GATT Server is disconnected. Cannot perform GATT operations. ' + |
- '(Re)connect first with `device.gatt.connect`.', |
- 'NetworkError')); |
- // Disconnect called to clear attributeInstanceMap and allow the |
- // object to get garbage collected. |
- characteristic.service.device.gatt.disconnect(); |
- }) |
- .then(runGarbageCollection) |
- .then(() => promise); |
+ .then( |
+ () => requestDeviceWithKeyDown( |
+ {filters: [{services: ['health_thermometer']}]})) |
+ .then(device => device.gatt.connect()) |
+ .then(gattServer => gattServer.getPrimaryService('health_thermometer')) |
+ .then(service => service.getCharacteristic('measurement_interval')) |
+ .then(characteristic => { |
+ promise = assert_promise_rejects_with_message( |
+ characteristic.CALLS( |
+ [getDescriptor(user_description.name) | getDescriptors() | |
+ getDescriptors(user_description.name)[UUID]]), |
+ new DOMException( |
+ 'GATT Server is disconnected. Cannot retrieve descriptors. ' + |
+ '(Re)connect first with `device.gatt.connect`.', |
+ 'NetworkError')); |
+ // Disconnect called to clear attributeInstanceMap and allow the |
+ // object to get garbage collected. |
+ characteristic.service.device.gatt.disconnect(); |
+ }) |
+ .then(runGarbageCollection) |
+ .then(() => promise); |
}, 'Garbage Collection ran during a FUNCTION_NAME call that succeeds. ' + |
'Should not crash.'); |