motePc = new RTCPeerConnection();
    test.add_cleanup(() => remotePc.close());

    const promiseDataChannel = new Promise(resolve => {
        remotePc.addEventListener('datachannel', (event) => {
            resolve(event.channel);
        });
    });

    const localDataChannel = localPc.createDataChannel('test');

    localPc.addEventListener('icecandidate', event => {
        if (event.candidate)
            remotePc.addIceCandidate(event.candidate);
    });
    remotePc.addEventListener('icecandidate