Bug 1509075 [wpt PR 14166] - Fix test failure caused by inappropriate event sequencing., a=testonly
authorHarald Alvestrand <hta@chromium.org>
Sat, 24 Nov 2018 10:29:04 +0000
changeset 507257 30e78e224e8fc22d66223d1dd2acbe451247716e
parent 507256 22ee27fd6082c2f588e8dc0e518eb1894dddeb38
child 507258 1e89c802587d7859afc78a3de32c1c221bbc7152
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1509075, 14166, 905563, 1346030, 609999
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1509075 [wpt PR 14166] - Fix test failure caused by inappropriate event sequencing., a=testonly Automatic update from web-platform-testsFix 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/1346030 Reviewed-by: Guido Urdaneta <guidou@chromium.org> Commit-Queue: Harald Alvestrand <hta@chromium.org> Cr-Commit-Position: refs/heads/master@{#609999} -- wpt-commits: 5f9f304f6d51c37170bd691432d288505659f7e6 wpt-pr: 14166
testing/web-platform/tests/webrtc/RTCPeerConnection-onnegotiationneeded.html
--- a/testing/web-platform/tests/webrtc/RTCPeerConnection-onnegotiationneeded.html
+++ b/testing/web-platform/tests/webrtc/RTCPeerConnection-onnegotiationneeded.html
@@ -159,20 +159,23 @@
 
   /*
     4.7.3.  Updating the Negotiation-Needed flag
       To update the negotiation-needed flag
       2.  If connection's signaling state is not "stable", abort these steps.
    */
   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');
       pc.createDataChannel('test');
       return nextPromise;
     });
   }, 'negotiationneeded event should not fire if signaling state is not stable');