Commit 3b33b6fc authored by Harald Alvestrand's avatar Harald Alvestrand Committed by Commit Bot

Fix test failure caused by inappropriate event sequencing.

This is a minimal fix - move the generation of the track (which
causes onnegotiationneeded) to before we set the expectation that
no event will be fired.

Bug: chromium:905563
Change-Id: I879f6eb6130d719d7eaad71fed85044b690f0cb9
Reviewed-on: https://chromium-review.googlesource.com/c/1346030Reviewed-by: default avatarGuido Urdaneta <guidou@chromium.org>
Commit-Queue: Harald Alvestrand <hta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609999}
parent fa2d589a
...@@ -164,10 +164,13 @@ ...@@ -164,10 +164,13 @@
*/ */
test_never_resolve(t => { test_never_resolve(t => {
const pc = new RTCPeerConnection(); const pc = new RTCPeerConnection();
const negotiated = awaitNegotiation(pc); let negotiated;
return generateAudioReceiveOnlyOffer(pc) return generateAudioReceiveOnlyOffer(pc)
.then(offer => pc.setLocalDescription(offer)) .then(offer => {
pc.setLocalDescription(offer);
negotiated = awaitNegotiation(pc);
})
.then(() => negotiated) .then(() => negotiated)
.then(({nextPromise}) => { .then(({nextPromise}) => {
assert_equals(pc.signalingState, 'have-local-offer'); assert_equals(pc.signalingState, 'have-local-offer');
......
...@@ -4,7 +4,7 @@ PASS calling createDataChannel twice should fire negotiationneeded event once ...@@ -4,7 +4,7 @@ PASS calling createDataChannel twice should fire negotiationneeded event once
PASS addTransceiver() should fire negotiationneeded event PASS addTransceiver() should fire negotiationneeded event
FAIL Calling addTransceiver() twice should fire negotiationneeded event once assert_unreached: Pending promise should never be resolved. Instead it is fulfilled with: [object Object] Reached unreachable code FAIL Calling addTransceiver() twice should fire negotiationneeded event once assert_unreached: Pending promise should never be resolved. Instead it is fulfilled with: [object Object] Reached unreachable code
FAIL Calling both addTransceiver() and createDataChannel() should fire negotiationneeded event once assert_unreached: Pending promise should never be resolved. Instead it is fulfilled with: [object Object] Reached unreachable code FAIL Calling both addTransceiver() and createDataChannel() should fire negotiationneeded event once assert_unreached: Pending promise should never be resolved. Instead it is fulfilled with: [object Object] Reached unreachable code
FAIL negotiationneeded event should not fire if signaling state is not stable assert_unreached: Pending promise should never be resolved. Instead it is fulfilled with: [object Object] Reached unreachable code PASS negotiationneeded event should not fire if signaling state is not stable
FAIL negotiationneeded event should fire only after signaling state go back to stable assert_unreached: Expect negotiationneeded promise to resolve after pc has set remote answer and go back to stable state Reached unreachable code FAIL negotiationneeded event should fire only after signaling state go back to stable assert_unreached: Expect negotiationneeded promise to resolve after pc has set remote answer and go back to stable state Reached unreachable code
Harness: the test ran to completion. Harness: the test ran to completion.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment