Bug 979649 - Part 2: Re-enable RTCP timestamp test. r=jesup
☠☠ backed out by bd02cc115cb6 ☠ ☠
authorChris Peterson <cpeterson@mozilla.com>
Thu, 27 Sep 2018 22:30:49 +0000
changeset 487022 6777dd18a3d8733bef79a0e82d65cfbfc907f44c
parent 487021 4793bdfd32988aaa98704cdb342fa8ea2df99e8c
child 487023 bd02cc115cb69ec8193ea60be49006b63b9ba8c8
push id246
push userfmarier@mozilla.com
push dateSat, 13 Oct 2018 00:15:40 +0000
reviewersjesup
bugs979649, 1336712, 1325430
milestone64.0a1
Bug 979649 - Part 2: Re-enable RTCP timestamp test. r=jesup Re-enable RTCP timestamp test as per review feedback in bug 1336712 comment 28. Can we resolve RTCP stats bug 1325430? The RTCStats timestamp issue was fixed in 2017: https://github.com/w3c/webrtc-pc/issues/729 Depends on D6120 Differential Revision: https://phabricator.services.mozilla.com/D6121
dom/media/tests/mochitest/pc.js
--- a/dom/media/tests/mochitest/pc.js
+++ b/dom/media/tests/mochitest/pc.js
@@ -1781,18 +1781,17 @@ PeerConnectionWrapper.prototype = {
     // Use spec way of enumerating stats
     var counters = {};
     for (let [key, res] of stats) {
       info("Checking stats for " + key + " : " + res);
       // validate stats
       ok(res.id == key, "Coherent stats id");
       var nowish = Date.now();
       var minimum = this.whenCreated;
-      if (false) { // Bug 1325430 - timestamps aren't working properly in update 49
-      // if (!twoMachines) {
+      if (!twoMachines) {
         // Bug 1225729: On android, sometimes the first RTCP of the first
         // test run gets this value, likely because no RTP has been sent yet.
         if (res.timestamp != 2085978496000) {
           ok(res.timestamp >= minimum,
              "Valid " + (res.isRemote? "rtcp" : "rtp") + " timestamp " +
                  res.timestamp + " >= " + minimum + " (" +
                  (res.timestamp - minimum) + " ms)");
           ok(res.timestamp <= nowish,
@@ -1834,27 +1833,27 @@ PeerConnectionWrapper.prototype = {
             var rem = stats.get(res.remoteId);
             ok(rem.isRemote, "Remote is rtcp");
             ok(rem.remoteId == res.id, "Remote backlink match");
             if(res.type == "outbound-rtp") {
               ok(rem.type == "inbound-rtp", "Rtcp is inbound");
               ok(rem.packetsReceived !== undefined, "Rtcp packetsReceived");
               ok(rem.packetsLost !== undefined, "Rtcp packetsLost");
               ok(rem.bytesReceived >= rem.packetsReceived, "Rtcp bytesReceived");
-	       if (false) { // Bug 1325430 if (!this.disableRtpCountChecking) {
-	       // no guarantee which one is newer!
-	       // Note: this must change when we add a timestamp field to remote RTCP reports
-	       // and make rem.timestamp be the reception time
-		if (res.timestamp >= rem.timestamp) {
-                 ok(rem.packetsReceived <= res.packetsSent, "No more than sent packets");
-		 } else {
+              if (!this.disableRtpCountChecking) {
+                // no guarantee which one is newer!
+                // Note: this must change when we add a timestamp field to remote RTCP reports
+                // and make rem.timestamp be the reception time
+                if (res.timestamp >= rem.timestamp) {
+                  ok(rem.packetsReceived <= res.packetsSent, "No more than sent packets");
+                } else {
                   info("REVERSED timestamps: rec:" +
-		     rem.packetsReceived + " time:" + rem.timestamp + " sent:" + res.packetsSent + " time:" + res.timestamp);
-		 }
-		// Else we may have received more than outdated Rtcp packetsSent
+                    rem.packetsReceived + " time:" + rem.timestamp + " sent:" + res.packetsSent + " time:" + res.timestamp);
+                }
+                // Else we may have received more than outdated Rtcp packetsSent
                 ok(rem.bytesReceived <= res.bytesSent, "No more than sent bytes");
               }
               ok(rem.jitter !== undefined, "Rtcp jitter");
               if (rem.roundTripTime) {
                 ok(rem.roundTripTime > 0,
                    "Rtcp rtt " + rem.roundTripTime + " >= 0");
                 ok(rem.roundTripTime < 60000,
                    "Rtcp rtt " + rem.roundTripTime + " < 1 min");