Files
tubestation/testing/web-platform/tests/webrtc/RTCPeerConnection-candidate-in-sdp.https.html
moz-wptsync-bot 401bb9e0dd Bug 1664225 - [wpt-sync] Update web-platform-tests to 55e3f8d27d6be17fa75bebe426c39cc51b3b26d4, a=testonly, r=karlcow
A bug in the wptsync caused us to miss some pushes during recent
updates. This commit copies the head of wpt at the specified revision
over and re-applies local patches that weren't in that revision. That
means we should be able to resume normal syncs after fixing the bug.

wpt-head: 55e3f8d27d6be17fa75bebe426c39cc51b3b26d4
wpt-type: landing

Differential Revision: https://phabricator.services.mozilla.com/D90823
2020-09-21 12:53:13 +00:00

27 lines
1.0 KiB
HTML

<!doctype html>
<meta charset=utf-8>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
'use strict';
promise_test(async t => {
const pc = new RTCPeerConnection();
t.add_cleanup(() => pc.close());
let resolveIceCandidatePromise = null;
const iceCandidatePromise = new Promise(r => resolveIceCandidatePromise = r);
pc.onicecandidate = e => {
resolveIceCandidatePromise(pc.localDescription.sdp);
pc.onicecandidate = null;
}
pc.addTransceiver("audio");
await pc.setLocalDescription(await pc.createOffer());
assert_false(pc.localDescription.sdp.includes("a=candidate:"),
"localDescription is missing candidate before onicecandidate");
// The localDescription at the time of the onicecandidate event.
const localDescriptionSdp = await iceCandidatePromise;
assert_true(localDescriptionSdp.includes("a=candidate:"),
"localDescription contains candidate after onicecandidate");
}, 'localDescription contains candidates');
</script>