mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Update web-platform-tests to revision bdb130748e35ceed09c82975e217e07bdabf0bda
This commit is contained in:
parent
ff3a9180a7
commit
3a7bc18f6e
46 changed files with 723 additions and 201 deletions
|
@ -0,0 +1,34 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title>RTCPeerConnection.prototype.onicecandidateerror</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="RTCPeerConnection-helper.js"></script>
|
||||
<script>
|
||||
|
||||
promise_test(async t => {
|
||||
const config = {
|
||||
iceServers: [{urls: "turn:123", username: "123", credential: "123"}]
|
||||
};
|
||||
const pc = new RTCPeerConnection(config);
|
||||
t.add_cleanup(() => pc.close());
|
||||
const onErrorPromise = addEventListenerPromise(t, pc, 'icecandidateerror', event => {
|
||||
assert_true(event instanceof RTCPeerConnectionIceErrorEvent,
|
||||
'Expect event to be instance of RTCPeerConnectionIceErrorEvent');
|
||||
// Do not hardcode any specific errors here. Instead only verify
|
||||
// that all the fields contain something expected.
|
||||
// Testing of event.errorText can be added later once it's content is
|
||||
// specified in spec with more detail.
|
||||
assert_true(event.errorCode >= 300 && event.errorCode <= 799, "errorCode");
|
||||
assert_true(event.hostCandidate.includes(":"), "hostCandidate");
|
||||
assert_true(event.url.includes("123"), "url");
|
||||
});
|
||||
const stream = await getNoiseStream({audio:true});
|
||||
t.add_cleanup(() => stream.getTracks().forEach(track => track.stop()));
|
||||
pc.addTrack(stream.getAudioTracks()[0], stream);
|
||||
|
||||
await pc.setLocalDescription(await pc.createOffer());
|
||||
await onErrorPromise;
|
||||
}, 'Surfacing onicecandidateerror');
|
||||
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue