Bug 1646679 [wpt PR 24233] - Fix timeout on RTCRtpTransceiver test., a=testonly
authorHarald Alvestrand <hta@chromium.org>
Mon, 22 Jun 2020 10:44:16 +0000
changeset 600931 fb8880027ccc3461bfc050029fc16353b47c5c6d
parent 600930 d55974431473f1bb534fbd4d20dc4e3c8004c39b
child 600932 eae3eced148f41177408b1949e9f7c4707f26271
push id13310
push userffxbld-merge
push dateMon, 29 Jun 2020 14:50:06 +0000
treeherdermozilla-beta@15a59a0afa5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1646679, 24233, 869126, 2250065, 779810
milestone79.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 1646679 [wpt PR 24233] - Fix timeout on RTCRtpTransceiver test., a=testonly Automatic update from web-platform-tests Fix timeout on RTCRtpTransceiver test. This CL should make the test run consistently and always finish; we break out early from the test that was failing rather than waiting forever. Bug: chromium:869126 Change-Id: Ic52fbf0dea69a03645165a073354f61a3d28ad81 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2250065 Commit-Queue: Harald Alvestrand <hta@chromium.org> Reviewed-by: Guido Urdaneta <guidou@chromium.org> Cr-Commit-Position: refs/heads/master@{#779810} -- wpt-commits: e3b772cdc0498672231311012995a6a1c7d9fbff wpt-pr: 24233
testing/web-platform/tests/webrtc/RTCRtpTransceiver.https.html
--- a/testing/web-platform/tests/webrtc/RTCRtpTransceiver.https.html
+++ b/testing/web-platform/tests/webrtc/RTCRtpTransceiver.https.html
@@ -395,18 +395,19 @@
     t.add_cleanup(() => pc2.close());
     const stream = await getNoiseStream({audio: true});
     t.add_cleanup(() => stopTracks(stream));
     const track = stream.getAudioTracks()[0];
     pc1.addTrack(track, stream);
     const offer = await pc1.createOffer();
     await pc1.setLocalDescription(offer);
     // Remove track-id from msid
-    offer.sdp = offer.sdp.replace(/(a=msid:[^ \t]+).*\r\n/g, "$1\r\n");
-    assert_true(offer.sdp.includes(`a=msid:${stream.id}\r\n`));
+    // Fixate stream-id so that error message is consistent.
+    offer.sdp = offer.sdp.replace(/(a=msid:[^ \t]+).*\r\n/g,
+                                  "a=msid:fake-stream-id\r\n");
     await pc2.setRemoteDescription(offer);
     const answer = await pc2.createAnswer();
     await pc1.setRemoteDescription(answer);
     await pc2.setLocalDescription(answer);
   };
 
   const checkNoMidOffer = async t => {
     const pc1 = new RTCPeerConnection();
@@ -1141,20 +1142,26 @@
     trickle(t, pc2, pc1);
     await pc2.setLocalDescription(answer);
 
     let gotUnmuteAudio1 = gotUnmuteEvent(pc1.getTransceivers()[0].receiver.track);
     let gotUnmuteVideo1 = gotUnmuteEvent(pc1.getTransceivers()[1].receiver.track);
 
     let gotUnmuteAudio2 = gotUnmuteEvent(pc2.getTransceivers()[0].receiver.track);
     let gotUnmuteVideo2 = gotUnmuteEvent(pc2.getTransceivers()[1].receiver.track);
+    // Jump out before waiting if a track is unmuted before RTP starts flowing.
+    assert_true(pc1.getTransceivers()[0].receiver.track.muted);
+    assert_true(pc1.getTransceivers()[1].receiver.track.muted);
+    assert_true(pc2.getTransceivers()[0].receiver.track.muted);
+    assert_true(pc2.getTransceivers()[1].receiver.track.muted);
 
     await iceConnected(pc1);
     await iceConnected(pc2);
 
+
     // Check that receive tracks are unmuted when RTP starts flowing
     await gotUnmuteAudio1;
     await gotUnmuteVideo1;
     await gotUnmuteAudio2;
     await gotUnmuteVideo2;
 
     // Check whether disabling recv locally causes onmute
     pc1.getTransceivers()[0].direction = "sendonly";