chromium/third_party/blink/web_tests/wpt_internal/bluetooth/server/connect/garbage-collection-ran-during-error.https.html

<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="/bluetooth/resources/bluetooth-test.js"></script>
<script src="/bluetooth/resources/bluetooth-fake-devices.js"></script>
<script src="/common/gc.js"></script>
<script>
'use strict';
bluetooth_test(t => {
  return setBluetoothFakeAdapter('FailingConnectionsAdapter')
    .then(() => requestDeviceWithTrustedClick({
      filters: [{services: [errorUUID(0x1) /* in progress error */]}]}))
    .then(device => {
      promise_rejects_dom(t, 'NetworkError', device.gatt.connect());
    })
    .then(garbageCollect);
}, 'Garbage collection ran during a connect call that fails. ' +
   'Should not crash.');
</script>