blob: d2edfc66bf7da74a2ece029fc19b0d5e20ed86a3 [file] [log] [blame]
<!DOCTYPE html>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<script src="../../../resources/bluetooth/bluetooth-helpers.js"></script>
<script>
'use strict';
bluetooth_test(() => {
return getDiscoveredHealthThermometerDevice()
.then(({device, fake_peripheral}) => {
return fake_peripheral.setNextGATTConnectionResponse({code: HCI_SUCCESS})
.then(() => {
// Don't return the promise and let |device| go out of scope
// so that it gets garbage collected.
device.gatt.connect();
});
})
.then(runGarbageCollection)
}, 'Garbage Collection ran during a connect call that succeeds. ' +
'Should not crash.');
</script>