Bug 1225729 - Restore RTCP timestamp tests on Android. r=jib
authorChris Peterson <cpeterson@mozilla.com>
Wed, 03 Oct 2018 23:10:15 -0700
changeset 490740 69d881a7866706d50389e433904d5946106e42d1
parent 490739 f4c2c10af6324ae04b53d18fff97eaec3e5e4396
child 490741 024dfb5b2d676ee40c45c9fb8b85674b8f6a04e1
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
reviewersjib
bugs1225729
milestone65.0a1
Bug 1225729 - Restore RTCP timestamp tests on Android. r=jib Android no longer seems to generate the mysterious 2085978496000 timestamps, so we can run these tests on Android again. Differential Revision: https://phabricator.services.mozilla.com/D9356
dom/media/tests/mochitest/pc.js
--- a/dom/media/tests/mochitest/pc.js
+++ b/dom/media/tests/mochitest/pc.js
@@ -1788,34 +1788,29 @@ PeerConnectionWrapper.prototype = {
       info("Checking stats for " + key + " : " + res);
       // validate stats
       ok(res.id == key, "Coherent stats id");
       var nowish = Date.now() + clockDriftAllowance;
       var minimum = this.whenCreated;
       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) {
-          if (false) {
-            ok(res.timestamp >= minimum,
-               "Valid " + (res.isRemote? "rtcp" : "rtp") + " timestamp " +
-                   res.timestamp + " >= " + minimum + " (" +
-                   (res.timestamp - minimum) + " ms)");
-          } else {
-            info("FIXME bug 1495446: uncomment the timestamp test case " +
-                 "above after RTCP epoch bug 1495446 is fixed.");
-          }
-          ok(res.timestamp <= nowish,
+        if (false) {
+          ok(res.timestamp >= minimum,
              "Valid " + (res.isRemote? "rtcp" : "rtp") + " timestamp " +
-                 res.timestamp + " <= " + nowish + " (" +
-                 (res.timestamp - nowish) + " ms)");
+                 res.timestamp + " >= " + minimum + " (" +
+                 (res.timestamp - minimum) + " ms)");
         } else {
-          info("Bug 1225729: Uninitialized timestamp (" + res.timestamp +
-                "), should be >=" + minimum + " and <= " + nowish);
+          info("FIXME bug 1495446: uncomment the timestamp test case " +
+               "above after RTCP epoch bug 1495446 is fixed.");
         }
+        ok(res.timestamp <= nowish,
+           "Valid " + (res.isRemote? "rtcp" : "rtp") + " timestamp " +
+               res.timestamp + " <= " + nowish + " (" +
+               (res.timestamp - nowish) + " ms)");
       }
       if (res.isRemote) {
         continue;
       }
       counters[res.type] = (counters[res.type] || 0) + 1;
 
       switch (res.type) {
         case "inbound-rtp":