Skip to content

Commit

Permalink
Fix test failure caused by inappropriate event sequencing.
Browse files Browse the repository at this point in the history
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/1346030
Reviewed-by: Guido Urdaneta <[email protected]>
Commit-Queue: Harald Alvestrand <[email protected]>
Cr-Commit-Position: refs/heads/master@{#609999}
  • Loading branch information
alvestrand authored and chromium-wpt-export-bot committed Nov 21, 2018
1 parent 36d62b4 commit 5f9f304
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions webrtc/RTCPeerConnection-onnegotiationneeded.html
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,13 @@
*/
test_never_resolve(t => {
const pc = new RTCPeerConnection();
const negotiated = awaitNegotiation(pc);
let negotiated;

return generateAudioReceiveOnlyOffer(pc)
.then(offer => pc.setLocalDescription(offer))
.then(offer => {
pc.setLocalDescription(offer);
negotiated = awaitNegotiation(pc);
})
.then(() => negotiated)
.then(({nextPromise}) => {
assert_equals(pc.signalingState, 'have-local-offer');
Expand Down

0 comments on commit 5f9f304

Please sign in to comment.