[iOS] Switching cameras in a WebRTC call makes black frames being sent
[WebKit-https.git] / LayoutTests / webrtc / closing-peerconnection.html
1 <!doctype html>
2 <html>
3     <head>
4         <meta charset="utf-8">
5         <title>Testing closing peer connection</title>
6         <script src="../resources/testharness.js"></script>
7         <script src="../resources/testharnessreport.js"></script>
8     </head>
9     <body>
10         <script>
11 promise_test((test) => {
12   return new Promise((resolve, reject) => {
13     var pc = new RTCPeerConnection();
14     pc.onicegatheringstatechange = (event) => {
15         if (pc.iceGatheringState == "gathering") {
16             pc.close();
17             if (window.internals)
18                 internals.stopPeerConnection(pc);
19             resolve();
20         }
21     }
22     pc.createDataChannel("test");
23     pc.createOffer().then((desc) => pc.setLocalDescription(desc));
24   });
25 }, "closing and stopping peer connection in the middle of gathering candidates");
26         </script>
27     </body>
28 </html>