function verifyLocalDescriptionContainsCertificate(certificate) {
  let localDescription = peerConnection_().localDescription;
  if (localDescription == null)
    throw failTest('localDescription is null.');
  for (let i = 0; i < certificate.getFingerprints().length; ++i) {
    let fingerprintSdp = 'a=fingerprint:' +
        certificate.getFingerprints()[i].algorithm + ' ' +
        certificate.getFingerprints()[i].value.toUpperCase();
    if (localDescription.sdp.includes(fingerprintSdp)) {
      returnToTest('ok-verified');
      return;
    }
  }
  if (!localDescription.sdp.includes('a=fingerprint'))
    throw failTest('localDescription does not contain any fingerprints.');
  throw failTest('Certificate fingerprint not found in localDescription.');
}
/**
 * Verifies that the peer connection's local description contains one of
 * |certificate|'s fingerprints.
 *
 * Returns 'ok-verified' on success.
 */
Verifies that the peer connection's local description contains one of
|certificate|'s fingerprints.

Returns 'ok-verified' on success.
Verifies that the peer connection ' s local description contains one of |certificate| ' s fingerprints . Returns ' ok - verified ' on success .
function verifyLocalDescriptionContainsCertificate(certificate) {
  let localDescription = peerConnection_().localDescription;
  if (localDescription == null)
    throw failTest('localDescription is null.');
  for (let i = 0; i < certificate.getFingerprints().length; ++i) {
    let fingerprintSdp = 'a=fingerprint:' +
        certificate.getFingerprints()[i].algorithm + ' ' +
        certificate.getFingerprints()[i].value.toUpperCase();
    if (localDescription.sdp.includes(fingerprintSdp)) {
      returnToTest('ok-verified');
      return;
    }
  }
  if (!localDescription.sdp.includes('a=fingerprint'))
    throw failTest('localDescription does not contain any fingerprints.');
  throw failTest('Certificate fingerprint not found in localDescription.');
}
function verifyLocalDescriptionContainsCertificate ( certificate ) { let localDescription = peerConnection_ ( ) . localDescription ; if ( localDescription == null ) throw failTest ( 'localDescription is null.' ) ; for ( let i = 0 ; i < certificate . getFingerprints ( ) . length ; ++ i ) { let fingerprintSdp = 'a=fingerprint:' + certificate . getFingerprints ( ) [ i ] . algorithm + ' ' + certificate . getFingerprints ( ) [ i ] . value . toUpperCase ( ) ; if ( localDescription . sdp . includes ( fingerprintSdp ) ) { returnToTest ( 'ok-verified' ) ; return ; } } if ( ! localDescription . sdp . includes ( 'a=fingerprint' ) ) throw failTest ( 'localDescription does not contain any fingerprints.' ) ; throw failTest ( 'Certificate fingerprint not found in localDescription.' ) ; }
Verifies that the peer connection's local description contains one of
 |certificate|'s fingerprints.
Verifies that the peer connection ' s local description contains one of |certificate| ' s fingerprints .