Bug 1557426 [wpt PR 16815] - webrtc wpt: add missing pc.close during cleanup, a=testonly

Automatic update from web-platform-tests
webrtc wpt: add missing pc.close during cleanup

running the html.js/codemod-peerconnection-addcleanup from the tools directory showed some places where a pc.close was missing

BUG=836871

Change-Id: I135db200a4269eccfafc43217b66584603101434
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1610767
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Reviewed-by: Henrik Boström <hbos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#661283}

--

wp5At-commits: fb60c65016f3d83fbb9521d0c154b462d09e4869
wpt-pr: 16815
This commit is contained in:
Philipp Hancke
2019-06-13 10:42:03 +00:00
committed by James Graham
parent 9246983a68
commit 2f50a10b5f
5 changed files with 8 additions and 5 deletions

View File

@@ -42,9 +42,10 @@
iframe.contentWindow.postMessage(certificate, "*");
let certificate2 = await promise;
new RTCPeerConnection({certificates: [certificate]});
new RTCPeerConnection({certificates: [certificate2]});
const pc1 = new RTCPeerConnection({certificates: [certificate]});
t.add_cleanup(() => pc1.close());
const pc2 = new RTCPeerConnection({certificates: [certificate2]});
t.add_cleanup(() => pc2.close());
assert_equals(certificate.expires, certificate2.expires);
for (let fingerprint of certificate2.getFingerprints())

View File

@@ -300,6 +300,7 @@
promise_test(async t => {
let pc1 = new RTCPeerConnection();
t.add_cleanup(() => pc1.close());
let [channel1, channel2] = await createDataChannelPair(pc1);
let message = 'hello888'; // 8 bytes
while (message.length <= pc1.sctp.maxMessageSize) {

View File

@@ -98,7 +98,7 @@ promise_test(async t => {
iceTransport.gather({});
let candidate;
do {
({ candidate } = await watcher.wait_for('icecandidate'));
(({ candidate } = await watcher.wait_for('icecandidate')));
} while (candidate !== null);
assert_equals(iceTransport.gatheringState, 'gathering');
await watcher.wait_for('gatheringstatechange');

View File

@@ -125,6 +125,7 @@
promise_test(async t => {
const pc = new RTCPeerConnection();
t.add_cleanup(() => pc.close());
const offer = await pc.createOffer();
let eventSequence = '';
const signalingstatechangeResolver = new Resolver();

View File

@@ -63,6 +63,7 @@
*/
promise_test(async t => {
const pc = new RTCPeerConnection();
t.add_cleanup(() => pc.close());
const { sender } = pc.addTransceiver('audio');
await doOfferAnswerExchange(t, pc);
@@ -73,7 +74,6 @@
validateSenderRtpParameters(param2);
assert_not_equals(param1.transactionId, param2.transactionId);
}, `sender.getParameters() should return different transaction IDs for each call`);
/*