.add_cleanup(() => pc.close());
    const offer = await pc.createOffer();
    await pc.setLocalDescription(offer);
    const p = Promise.race([
      pc.setRemoteDescription(offer),
      new Promise(r => t.step_timeout(() => r("timeout"), 200))
    ]);
    pc.close();
    assert_equals(await p, "timeout");
    assert_equals(pc.signalingState, "closed", "In closed state");
  }, 'Closing on rollback neither resolves nor rejects');

</script>
