n(offer);
    assert_state('have-local-offer');
    await pc2.setRemoteDescription(offer);
    await exchangeAnswer(pc, pc2);
    assert_state('stable');
    await exchangeOffer(pc2, pc);
    assert_state('have-remote-offer');
  }, 'Negotiation should fire signalingsstate events');

  /* Operations after returning to stable state */

  promise_test(async t => {
    const pc = new RTCPeerConnection();
    const pc2 = new RTCPeerConnection();
    t.add_cleanup(() => pc.close());
    t.add_cleanup(() => pc2.cl