blob: 2a5995c188813351e94347a41091bbc0e5fbbfbd [file] [log] [blame]
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Testing closing peer connection</title>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
</head>
<body>
<script>
promise_test((test) => {
return new Promise((resolve, reject) => {
var pc = new RTCPeerConnection();
pc.onicegatheringstatechange = (event) => {
if (pc.iceGatheringState == "gathering") {
pc.close();
if (window.internals)
internals.stopPeerConnection(pc);
resolve();
}
}
pc.createDataChannel("test");
pc.createOffer().then((desc) => pc.setLocalDescription(desc));
});
}, "closing and stopping peer connection in the middle of gathering candidates");
</script>
</body>
</html>