Skip to content

Commit

Permalink
Part 0: Test-case for bug.
Browse files Browse the repository at this point in the history
Differential Revision: https://phabricator.services.mozilla.com/D30990

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1550177
gecko-commit: 1ff47be3226505205ae2357777a80953f56e06bb
gecko-integration-branch: central
gecko-reviewers: jib
  • Loading branch information
docfaraday authored and moz-wptsync-bot committed Jun 24, 2019
1 parent f932a8e commit 28bb3f1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion webrtc/RTCPeerConnection-iceGatheringState.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,21 @@

t.add_cleanup(() => pc.close());

let reachedGathering = false;
const onIceGatheringStateChange = t.step_func(() => {
const { iceGatheringState } = pc;

if(iceGatheringState === 'complete') {
if(iceGatheringState === 'gathering') {
reachedGathering = true;
} else if(iceGatheringState === 'complete') {
assert_true(reachedGathering, 'iceGatheringState should reach gathering before complete');
t.done();
}
});

assert_equals(pc.onicegatheringstatechange, null,
'Expect connection to have icegatheringstatechange event');
assert_equals(pc.iceGatheringState, 'new');

pc.addEventListener('icegatheringstatechange', onIceGatheringStateChange);

Expand Down

0 comments on commit 28bb3f1

Please sign in to comment.