RTCPeerConnection-helper-test.html (712B)
1 <!doctype html> 2 <meta charset=utf-8> 3 <title>RTCPeerConnection-helper tests</title> 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 <script src="RTCPeerConnection-helper.js"></script> 7 <script> 8 'use strict'; 9 10 promise_test(async t => { 11 const pc1 = new RTCPeerConnection(); 12 const pc2 = new RTCPeerConnection(); 13 t.add_cleanup(() => pc1.close()); 14 t.add_cleanup(() => pc2.close()); 15 const transceiver = pc1.addTransceiver('video'); 16 17 exchangeIceCandidates(pc1, pc2); 18 await exchangeOfferAnswer(pc1, pc2); 19 await waitForState(transceiver.sender.transport, 'connected'); 20 }, 'Setting up a connection using helpers and defaults should work'); 21 </script>