| <title>Testing closing peer connection</title> |
| <script src="../resources/testharness.js"></script> |
| <script src="../resources/testharnessreport.js"></script> |
| return new Promise((resolve, reject) => { |
| var pc = new RTCPeerConnection(); |
| pc.onicegatheringstatechange = (event) => { |
| if (pc.iceGatheringState == "gathering") { |
| internals.stopPeerConnection(pc); |
| pc.createDataChannel("test"); |
| pc.createOffer().then((desc) => pc.setLocalDescription(desc)); |
| }, "closing and stopping peer connection in the middle of gathering candidates"); |