RTCPeerConnection-perfect-negotiation-stress-glare.https.html (764B)
1 <!doctype html> 2 <meta charset=utf-8> 3 <meta name="timeout" content="long"> 4 <title></title> 5 <script src=/resources/testharness.js></script> 6 <script src=/resources/testharnessreport.js></script> 7 <script src="RTCPeerConnection-perfect-negotiation-helper.js"></script> 8 <script> 9 'use strict'; 10 11 promise_test_both_roles(async (t, pc) => { 12 const ps = []; 13 for (let i = 10; i > 0; i--) { 14 ps.push(runBoth("addTransceiver")); 15 await new Promise(r => t.step_timeout(r, i - 1)); 16 } 17 ps.push(runBoth("addTransceiver")); 18 await Promise.all(ps); 19 const [numA, numB] = await runBoth("getNumTransceivers"); 20 assert_equals(numA, 22, "22 transceivers on side A"); 21 assert_equals(numB, 22, "22 transceivers on side B"); 22 }, "Perfect negotiation stress glare"); 23 </script>