createPeerIframe(
      opt_iframeId, opt_oneSidedHandshake, opt_innerProtocolVersion,
      opt_outerProtocolVersion, opt_randomChannelNames) {
    let expectedIframeId;

    if (opt_iframeId) {
      expectedIframeId = opt_iframeId = opt_iframeId + uniqueId++;
    } else {
      // Have createPeerIframe() generate an ID
      stubs.set(xpc, 'getRandomString', function(length) {
        return '' + length;
      });
      expectedIframeId = 'xpcpeer4';
    }
    assertNull(
        'element[id=' + expectedIframeId + '] exists',
        dom.getElement(expectedIframeId));

    this.setConfiguration_(
        opt_iframeId, opt_oneSidedHandshake, undefined /* opt_channelName */,
        opt_innerProtocolVersion, opt_outerProtocolVersion,
        opt_randomChannelNames);
    const channelName = this.createChannel_();
    this.initialOuterChannelName_ = channelName;
    this.iframe_ = this.channel_.createPeerIframe(document.body);

    assertEquals(expectedIframeId, this.iframe_.id);
  }
Creates the peer iframe.
@param {string=} opt_iframeId If present, the ID of the iframe to create,
    otherwise, generates an iframe ID.
@param {boolean=} opt_oneSidedHandshake Whether a one sided handshake is
    specified.
@param {number=} opt_innerProtocolVersion The native transport protocol
    version used in the inner iframe.
@param {number=} opt_outerProtocolVersion The native transport protocol
    version used in the outer iframe.
@param {boolean=} opt_randomChannelNames Whether the ends of the channel
    should be allowed to pick differing, random names.
@return {!Array<string>} The id of the created iframe and the name of the
    created channel.
@suppress {missingReturn} suppression added to enable type checking