function verifyRtpSenders(expectedNumTracks = null) {
  if (expectedNumTracks != null &&
      peerConnection_().getSenders().length != expectedNumTracks) {
    throw failTest('getSenders().length != expectedNumTracks');
  }
  if (!arrayEquals_(peerConnection_().getSenders(),
                    peerConnection_().getSenders())) {
    throw failTest('One getSenders() call is not equal to the next.');
  }

  let senders = new Set();
  let senderTracks = new Set();
  peerConnection_().getSenders().forEach(function(sender) {
    if (sender == null)
      throw failTest('sender is null or undefined.');
    if (sender.track == null)
      throw failTest('sender.track is null or undefined.');
    senders.add(sender);
    senderTracks.add(sender.track);
  });
  if (senderTracks.size != senders.size)
    throw failTest('senderTracks.size != senders.size');

  returnToTest('ok-senders-verified');
}
/**
 * Verifies that the peer connection's getSenders() returns one sender per local
 * track, that there are no duplicates and that object identity is preserved.
 *
 * Returns "ok-senders-verified" on success.
 */
Verifies that the peer connection's getSenders() returns one sender per local
track, that there are no duplicates and that object identity is preserved.

Returns "ok-senders-verified" on success.
Verifies that the peer connection ' s getSenders () returns one sender per local track that there are no duplicates and that object identity is preserved . Returns " ok - senders - verified " on success .
function verifyRtpSenders(expectedNumTracks = null) {
  if (expectedNumTracks != null &&
      peerConnection_().getSenders().length != expectedNumTracks) {
    throw failTest('getSenders().length != expectedNumTracks');
  }
  if (!arrayEquals_(peerConnection_().getSenders(),
                    peerConnection_().getSenders())) {
    throw failTest('One getSenders() call is not equal to the next.');
  }
  let senders = new Set();
  let senderTracks = new Set();
  peerConnection_().getSenders().forEach(function(sender) {
    if (sender == null)
      throw failTest('sender is null or undefined.');
    if (sender.track == null)
      throw failTest('sender.track is null or undefined.');
    senders.add(sender);
    senderTracks.add(sender.track);
  });
  if (senderTracks.size != senders.size)
    throw failTest('senderTracks.size != senders.size');
  returnToTest('ok-senders-verified');
}
function verifyRtpSenders ( expectedNumTracks = null ) { if ( expectedNumTracks != null && peerConnection_ ( ) . getSenders ( ) . length != expectedNumTracks ) { throw failTest ( 'getSenders().length != expectedNumTracks' ) ; } if ( ! arrayEquals_ ( peerConnection_ ( ) . getSenders ( ) , peerConnection_ ( ) . getSenders ( ) ) ) { throw failTest ( 'One getSenders() call is not equal to the next.' ) ; } let senders = new Set ( ) ; let senderTracks = new Set ( ) ; peerConnection_ ( ) . getSenders ( ) . forEach ( function ( sender ) { if ( sender == null ) throw failTest ( 'sender is null or undefined.' ) ; if ( sender . track == null ) throw failTest ( 'sender.track is null or undefined.' ) ; senders . add ( sender ) ; senderTracks . add ( sender . track ) ; } ) ; if ( senderTracks . size != senders . size ) throw failTest ( 'senderTracks.size != senders.size' ) ; returnToTest ( 'ok-senders-verified' ) ; }
Verifies that the peer connection's getSenders() returns one sender per local
 track, that there are no duplicates and that object identity is preserved.
Verifies that the peer connection ' s getSenders () returns one sender per local track that there are no duplicates and that object identity is preserved .