mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 1278309
- Test that createOffer immediately followed by close does not settle. r=drno
MozReview-Commit-ID: GzPlWp5nlqZ --HG-- extra : rebase_source : 38af9558d159a0bf5f4834bd875261b957cc4e81
This commit is contained in:
parent
f07be007ab
commit
83550a678d
@ -126,6 +126,14 @@
|
||||
finish();
|
||||
}, 60000);
|
||||
|
||||
var mustNotSettle = (p, ms, msg) => Promise.race([
|
||||
p.then(() => ok(false, msg + " must not settle"),
|
||||
e => ok(false, msg + " must not settle. Got " + e.name)),
|
||||
wait(ms).then(() => ok(true, msg + " must not settle"))
|
||||
]);
|
||||
|
||||
var silence = mustNotSettle(pc.createOffer(), 1000,
|
||||
"createOffer immediately followed by close");
|
||||
try {
|
||||
pc.close();
|
||||
} catch (e) {
|
||||
@ -135,7 +143,7 @@
|
||||
is(pc.signalingState, "closed", "Final signalingState is 'closed'");
|
||||
is(pc.iceConnectionState, "closed", "Final iceConnectionState is 'closed'");
|
||||
|
||||
finished.then(networkTestFinished);
|
||||
Promise.all([finished, silence]).then(networkTestFinished);
|
||||
});
|
||||
</script>
|
||||
</pre>
|
||||
|
Loading…
Reference in New Issue
Block a user